@tennac-booking/sdk 1.0.5 → 1.0.8
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 +1 -1
- package/README.md +1 -2
- package/api.ts +8 -273
- package/dist/api.d.ts +4 -156
- package/dist/api.js +9 -174
- package/dist/esm/api.d.ts +4 -156
- package/dist/esm/api.js +9 -170
- package/docs/UsersApi.md +4 -4
- package/package.json +4 -4
- package/apis/AuthApi.ts +0 -157
- package/apis/UsersApi.ts +0 -56
- package/apis/index.ts +0 -4
- package/dist/apis/AuthApi.d.ts +0 -39
- package/dist/apis/AuthApi.js +0 -117
- package/dist/apis/UsersApi.d.ts +0 -26
- package/dist/apis/UsersApi.js +0 -58
- package/dist/apis/index.d.ts +0 -2
- package/dist/apis/index.js +0 -20
- package/dist/esm/apis/AuthApi.d.ts +0 -39
- package/dist/esm/apis/AuthApi.js +0 -113
- package/dist/esm/apis/UsersApi.d.ts +0 -26
- package/dist/esm/apis/UsersApi.js +0 -54
- package/dist/esm/apis/index.d.ts +0 -2
- package/dist/esm/apis/index.js +0 -4
- package/dist/esm/models/Booking.d.ts +0 -87
- package/dist/esm/models/Booking.js +0 -82
- package/dist/esm/models/Court.d.ts +0 -76
- package/dist/esm/models/Court.js +0 -72
- package/dist/esm/models/Slot.d.ts +0 -44
- package/dist/esm/models/Slot.js +0 -51
- package/dist/esm/models/SlotException.d.ts +0 -50
- package/dist/esm/models/SlotException.js +0 -55
- package/dist/esm/models/User.d.ts +0 -92
- package/dist/esm/models/User.js +0 -69
- package/dist/esm/models/index.d.ts +0 -5
- package/dist/esm/models/index.js +0 -7
- package/dist/esm/runtime.d.ts +0 -184
- package/dist/esm/runtime.js +0 -334
- package/dist/esm/src/apis/AuthApi.d.ts +0 -39
- package/dist/esm/src/apis/AuthApi.js +0 -113
- package/dist/esm/src/apis/UsersApi.d.ts +0 -26
- package/dist/esm/src/apis/UsersApi.js +0 -54
- package/dist/esm/src/apis/index.d.ts +0 -2
- package/dist/esm/src/apis/index.js +0 -4
- package/dist/esm/src/index.d.ts +0 -3
- package/dist/esm/src/index.js +0 -5
- package/dist/esm/src/models/Booking.d.ts +0 -87
- package/dist/esm/src/models/Booking.js +0 -82
- package/dist/esm/src/models/BookingStatus.d.ts +0 -25
- package/dist/esm/src/models/BookingStatus.js +0 -43
- package/dist/esm/src/models/Court.d.ts +0 -76
- package/dist/esm/src/models/Court.js +0 -72
- package/dist/esm/src/models/CourtStatus.d.ts +0 -25
- package/dist/esm/src/models/CourtStatus.js +0 -43
- package/dist/esm/src/models/Slot.d.ts +0 -44
- package/dist/esm/src/models/Slot.js +0 -51
- package/dist/esm/src/models/SlotException.d.ts +0 -50
- package/dist/esm/src/models/SlotException.js +0 -55
- package/dist/esm/src/models/StripeStatus.d.ts +0 -28
- package/dist/esm/src/models/StripeStatus.js +0 -46
- package/dist/esm/src/models/User.d.ts +0 -92
- package/dist/esm/src/models/User.js +0 -69
- package/dist/esm/src/models/index.d.ts +0 -5
- package/dist/esm/src/models/index.js +0 -7
- package/dist/esm/src/runtime.d.ts +0 -184
- package/dist/esm/src/runtime.js +0 -334
- package/dist/models/Booking.d.ts +0 -87
- package/dist/models/Booking.js +0 -90
- package/dist/models/Court.d.ts +0 -76
- package/dist/models/Court.js +0 -80
- package/dist/models/Slot.d.ts +0 -44
- package/dist/models/Slot.js +0 -58
- package/dist/models/SlotException.d.ts +0 -50
- package/dist/models/SlotException.js +0 -62
- package/dist/models/User.d.ts +0 -92
- package/dist/models/User.js +0 -76
- package/dist/models/index.d.ts +0 -5
- package/dist/models/index.js +0 -23
- package/dist/runtime.d.ts +0 -184
- package/dist/runtime.js +0 -350
- package/dist/src/apis/AuthApi.d.ts +0 -39
- package/dist/src/apis/AuthApi.js +0 -117
- package/dist/src/apis/UsersApi.d.ts +0 -26
- package/dist/src/apis/UsersApi.js +0 -58
- package/dist/src/apis/index.d.ts +0 -2
- package/dist/src/apis/index.js +0 -20
- package/dist/src/index.d.ts +0 -3
- package/dist/src/index.js +0 -21
- package/dist/src/models/Booking.d.ts +0 -87
- package/dist/src/models/Booking.js +0 -90
- package/dist/src/models/BookingStatus.d.ts +0 -25
- package/dist/src/models/BookingStatus.js +0 -51
- package/dist/src/models/Court.d.ts +0 -76
- package/dist/src/models/Court.js +0 -80
- package/dist/src/models/CourtStatus.d.ts +0 -25
- package/dist/src/models/CourtStatus.js +0 -51
- package/dist/src/models/Slot.d.ts +0 -44
- package/dist/src/models/Slot.js +0 -58
- package/dist/src/models/SlotException.d.ts +0 -50
- package/dist/src/models/SlotException.js +0 -62
- package/dist/src/models/StripeStatus.d.ts +0 -28
- package/dist/src/models/StripeStatus.js +0 -54
- package/dist/src/models/User.d.ts +0 -92
- package/dist/src/models/User.js +0 -76
- package/dist/src/models/index.d.ts +0 -5
- package/dist/src/models/index.js +0 -23
- package/dist/src/runtime.d.ts +0 -184
- package/dist/src/runtime.js +0 -350
- package/docs/AuthApi.md +0 -88
- package/models/Booking.ts +0 -142
- package/models/Court.ts +0 -130
- package/models/Slot.ts +0 -84
- package/models/SlotException.ts +0 -93
- package/models/User.ts +0 -149
- package/models/index.ts +0 -7
- package/runtime.ts +0 -432
- package/src/apis/AuthApi.ts +0 -157
- package/src/apis/UsersApi.ts +0 -56
- package/src/apis/index.ts +0 -4
- package/src/index.ts +0 -5
- package/src/models/Booking.ts +0 -142
- package/src/models/BookingStatus.ts +0 -53
- package/src/models/Court.ts +0 -130
- package/src/models/CourtStatus.ts +0 -53
- package/src/models/Slot.ts +0 -84
- package/src/models/SlotException.ts +0 -93
- package/src/models/StripeStatus.ts +0 -56
- package/src/models/User.ts +0 -149
- package/src/models/index.ts +0 -7
- package/src/runtime.ts +0 -432
package/dist/src/runtime.js
DELETED
|
@@ -1,350 +0,0 @@
|
|
|
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
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.TextApiResponse = exports.BlobApiResponse = exports.VoidApiResponse = exports.JSONApiResponse = exports.COLLECTION_FORMATS = exports.RequiredError = exports.FetchError = exports.ResponseError = exports.BaseAPI = exports.DefaultConfig = exports.Configuration = exports.BASE_PATH = void 0;
|
|
26
|
-
exports.querystring = querystring;
|
|
27
|
-
exports.exists = exists;
|
|
28
|
-
exports.mapValues = mapValues;
|
|
29
|
-
exports.canConsumeForm = canConsumeForm;
|
|
30
|
-
exports.BASE_PATH = "https://api.mon-domaine.com".replace(/\/+$/, "");
|
|
31
|
-
class Configuration {
|
|
32
|
-
constructor(configuration = {}) {
|
|
33
|
-
this.configuration = configuration;
|
|
34
|
-
}
|
|
35
|
-
set config(configuration) {
|
|
36
|
-
this.configuration = configuration;
|
|
37
|
-
}
|
|
38
|
-
get basePath() {
|
|
39
|
-
return this.configuration.basePath != null ? this.configuration.basePath : exports.BASE_PATH;
|
|
40
|
-
}
|
|
41
|
-
get fetchApi() {
|
|
42
|
-
return this.configuration.fetchApi;
|
|
43
|
-
}
|
|
44
|
-
get middleware() {
|
|
45
|
-
return this.configuration.middleware || [];
|
|
46
|
-
}
|
|
47
|
-
get queryParamsStringify() {
|
|
48
|
-
return this.configuration.queryParamsStringify || querystring;
|
|
49
|
-
}
|
|
50
|
-
get username() {
|
|
51
|
-
return this.configuration.username;
|
|
52
|
-
}
|
|
53
|
-
get password() {
|
|
54
|
-
return this.configuration.password;
|
|
55
|
-
}
|
|
56
|
-
get apiKey() {
|
|
57
|
-
const apiKey = this.configuration.apiKey;
|
|
58
|
-
if (apiKey) {
|
|
59
|
-
return typeof apiKey === 'function' ? apiKey : () => apiKey;
|
|
60
|
-
}
|
|
61
|
-
return undefined;
|
|
62
|
-
}
|
|
63
|
-
get accessToken() {
|
|
64
|
-
const accessToken = this.configuration.accessToken;
|
|
65
|
-
if (accessToken) {
|
|
66
|
-
return typeof accessToken === 'function' ? accessToken : () => __awaiter(this, void 0, void 0, function* () { return accessToken; });
|
|
67
|
-
}
|
|
68
|
-
return undefined;
|
|
69
|
-
}
|
|
70
|
-
get headers() {
|
|
71
|
-
return this.configuration.headers;
|
|
72
|
-
}
|
|
73
|
-
get credentials() {
|
|
74
|
-
return this.configuration.credentials;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
exports.Configuration = Configuration;
|
|
78
|
-
exports.DefaultConfig = new Configuration();
|
|
79
|
-
/**
|
|
80
|
-
* This is the base class for all generated API classes.
|
|
81
|
-
*/
|
|
82
|
-
class BaseAPI {
|
|
83
|
-
constructor(configuration = exports.DefaultConfig) {
|
|
84
|
-
this.configuration = configuration;
|
|
85
|
-
this.fetchApi = (url, init) => __awaiter(this, void 0, void 0, function* () {
|
|
86
|
-
let fetchParams = { url, init };
|
|
87
|
-
for (const middleware of this.middleware) {
|
|
88
|
-
if (middleware.pre) {
|
|
89
|
-
fetchParams = (yield middleware.pre(Object.assign({ fetch: this.fetchApi }, fetchParams))) || fetchParams;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
let response = undefined;
|
|
93
|
-
try {
|
|
94
|
-
response = yield (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
|
|
95
|
-
}
|
|
96
|
-
catch (e) {
|
|
97
|
-
for (const middleware of this.middleware) {
|
|
98
|
-
if (middleware.onError) {
|
|
99
|
-
response = (yield middleware.onError({
|
|
100
|
-
fetch: this.fetchApi,
|
|
101
|
-
url: fetchParams.url,
|
|
102
|
-
init: fetchParams.init,
|
|
103
|
-
error: e,
|
|
104
|
-
response: response ? response.clone() : undefined,
|
|
105
|
-
})) || response;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
if (response === undefined) {
|
|
109
|
-
if (e instanceof Error) {
|
|
110
|
-
throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response');
|
|
111
|
-
}
|
|
112
|
-
else {
|
|
113
|
-
throw e;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
for (const middleware of this.middleware) {
|
|
118
|
-
if (middleware.post) {
|
|
119
|
-
response = (yield middleware.post({
|
|
120
|
-
fetch: this.fetchApi,
|
|
121
|
-
url: fetchParams.url,
|
|
122
|
-
init: fetchParams.init,
|
|
123
|
-
response: response.clone(),
|
|
124
|
-
})) || response;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
return response;
|
|
128
|
-
});
|
|
129
|
-
this.middleware = configuration.middleware;
|
|
130
|
-
}
|
|
131
|
-
withMiddleware(...middlewares) {
|
|
132
|
-
const next = this.clone();
|
|
133
|
-
next.middleware = next.middleware.concat(...middlewares);
|
|
134
|
-
return next;
|
|
135
|
-
}
|
|
136
|
-
withPreMiddleware(...preMiddlewares) {
|
|
137
|
-
const middlewares = preMiddlewares.map((pre) => ({ pre }));
|
|
138
|
-
return this.withMiddleware(...middlewares);
|
|
139
|
-
}
|
|
140
|
-
withPostMiddleware(...postMiddlewares) {
|
|
141
|
-
const middlewares = postMiddlewares.map((post) => ({ post }));
|
|
142
|
-
return this.withMiddleware(...middlewares);
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Check if the given MIME is a JSON MIME.
|
|
146
|
-
* JSON MIME examples:
|
|
147
|
-
* application/json
|
|
148
|
-
* application/json; charset=UTF8
|
|
149
|
-
* APPLICATION/JSON
|
|
150
|
-
* application/vnd.company+json
|
|
151
|
-
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
152
|
-
* @return True if the given MIME is JSON, false otherwise.
|
|
153
|
-
*/
|
|
154
|
-
isJsonMime(mime) {
|
|
155
|
-
if (!mime) {
|
|
156
|
-
return false;
|
|
157
|
-
}
|
|
158
|
-
return BaseAPI.jsonRegex.test(mime);
|
|
159
|
-
}
|
|
160
|
-
request(context, initOverrides) {
|
|
161
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
162
|
-
const { url, init } = yield this.createFetchParams(context, initOverrides);
|
|
163
|
-
const response = yield this.fetchApi(url, init);
|
|
164
|
-
if (response && (response.status >= 200 && response.status < 300)) {
|
|
165
|
-
return response;
|
|
166
|
-
}
|
|
167
|
-
throw new ResponseError(response, 'Response returned an error code');
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
createFetchParams(context, initOverrides) {
|
|
171
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
172
|
-
let url = this.configuration.basePath + context.path;
|
|
173
|
-
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
|
|
174
|
-
// only add the querystring to the URL if there are query parameters.
|
|
175
|
-
// this is done to avoid urls ending with a "?" character which buggy webservers
|
|
176
|
-
// do not handle correctly sometimes.
|
|
177
|
-
url += '?' + this.configuration.queryParamsStringify(context.query);
|
|
178
|
-
}
|
|
179
|
-
const headers = Object.assign({}, this.configuration.headers, context.headers);
|
|
180
|
-
Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {});
|
|
181
|
-
const initOverrideFn = typeof initOverrides === "function"
|
|
182
|
-
? initOverrides
|
|
183
|
-
: () => __awaiter(this, void 0, void 0, function* () { return initOverrides; });
|
|
184
|
-
const initParams = {
|
|
185
|
-
method: context.method,
|
|
186
|
-
headers,
|
|
187
|
-
body: context.body,
|
|
188
|
-
credentials: this.configuration.credentials,
|
|
189
|
-
};
|
|
190
|
-
const overriddenInit = Object.assign(Object.assign({}, initParams), (yield initOverrideFn({
|
|
191
|
-
init: initParams,
|
|
192
|
-
context,
|
|
193
|
-
})));
|
|
194
|
-
let body;
|
|
195
|
-
if (isFormData(overriddenInit.body)
|
|
196
|
-
|| (overriddenInit.body instanceof URLSearchParams)
|
|
197
|
-
|| isBlob(overriddenInit.body)) {
|
|
198
|
-
body = overriddenInit.body;
|
|
199
|
-
}
|
|
200
|
-
else if (this.isJsonMime(headers['Content-Type'])) {
|
|
201
|
-
body = JSON.stringify(overriddenInit.body);
|
|
202
|
-
}
|
|
203
|
-
else {
|
|
204
|
-
body = overriddenInit.body;
|
|
205
|
-
}
|
|
206
|
-
const init = Object.assign(Object.assign({}, overriddenInit), { body });
|
|
207
|
-
return { url, init };
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* Create a shallow clone of `this` by constructing a new instance
|
|
212
|
-
* and then shallow cloning data members.
|
|
213
|
-
*/
|
|
214
|
-
clone() {
|
|
215
|
-
const constructor = this.constructor;
|
|
216
|
-
const next = new constructor(this.configuration);
|
|
217
|
-
next.middleware = this.middleware.slice();
|
|
218
|
-
return next;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
exports.BaseAPI = BaseAPI;
|
|
222
|
-
BaseAPI.jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i');
|
|
223
|
-
;
|
|
224
|
-
function isBlob(value) {
|
|
225
|
-
return typeof Blob !== 'undefined' && value instanceof Blob;
|
|
226
|
-
}
|
|
227
|
-
function isFormData(value) {
|
|
228
|
-
return typeof FormData !== "undefined" && value instanceof FormData;
|
|
229
|
-
}
|
|
230
|
-
class ResponseError extends Error {
|
|
231
|
-
constructor(response, msg) {
|
|
232
|
-
super(msg);
|
|
233
|
-
this.response = response;
|
|
234
|
-
this.name = "ResponseError";
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
exports.ResponseError = ResponseError;
|
|
238
|
-
class FetchError extends Error {
|
|
239
|
-
constructor(cause, msg) {
|
|
240
|
-
super(msg);
|
|
241
|
-
this.cause = cause;
|
|
242
|
-
this.name = "FetchError";
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
exports.FetchError = FetchError;
|
|
246
|
-
class RequiredError extends Error {
|
|
247
|
-
constructor(field, msg) {
|
|
248
|
-
super(msg);
|
|
249
|
-
this.field = field;
|
|
250
|
-
this.name = "RequiredError";
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
exports.RequiredError = RequiredError;
|
|
254
|
-
exports.COLLECTION_FORMATS = {
|
|
255
|
-
csv: ",",
|
|
256
|
-
ssv: " ",
|
|
257
|
-
tsv: "\t",
|
|
258
|
-
pipes: "|",
|
|
259
|
-
};
|
|
260
|
-
function querystring(params, prefix = '') {
|
|
261
|
-
return Object.keys(params)
|
|
262
|
-
.map(key => querystringSingleKey(key, params[key], prefix))
|
|
263
|
-
.filter(part => part.length > 0)
|
|
264
|
-
.join('&');
|
|
265
|
-
}
|
|
266
|
-
function querystringSingleKey(key, value, keyPrefix = '') {
|
|
267
|
-
const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
|
|
268
|
-
if (value instanceof Array) {
|
|
269
|
-
const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue)))
|
|
270
|
-
.join(`&${encodeURIComponent(fullKey)}=`);
|
|
271
|
-
return `${encodeURIComponent(fullKey)}=${multiValue}`;
|
|
272
|
-
}
|
|
273
|
-
if (value instanceof Set) {
|
|
274
|
-
const valueAsArray = Array.from(value);
|
|
275
|
-
return querystringSingleKey(key, valueAsArray, keyPrefix);
|
|
276
|
-
}
|
|
277
|
-
if (value instanceof Date) {
|
|
278
|
-
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
|
|
279
|
-
}
|
|
280
|
-
if (value instanceof Object) {
|
|
281
|
-
return querystring(value, fullKey);
|
|
282
|
-
}
|
|
283
|
-
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
|
284
|
-
}
|
|
285
|
-
function exists(json, key) {
|
|
286
|
-
const value = json[key];
|
|
287
|
-
return value !== null && value !== undefined;
|
|
288
|
-
}
|
|
289
|
-
function mapValues(data, fn) {
|
|
290
|
-
const result = {};
|
|
291
|
-
for (const key of Object.keys(data)) {
|
|
292
|
-
result[key] = fn(data[key]);
|
|
293
|
-
}
|
|
294
|
-
return result;
|
|
295
|
-
}
|
|
296
|
-
function canConsumeForm(consumes) {
|
|
297
|
-
for (const consume of consumes) {
|
|
298
|
-
if ('multipart/form-data' === consume.contentType) {
|
|
299
|
-
return true;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
return false;
|
|
303
|
-
}
|
|
304
|
-
class JSONApiResponse {
|
|
305
|
-
constructor(raw, transformer = (jsonValue) => jsonValue) {
|
|
306
|
-
this.raw = raw;
|
|
307
|
-
this.transformer = transformer;
|
|
308
|
-
}
|
|
309
|
-
value() {
|
|
310
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
311
|
-
return this.transformer(yield this.raw.json());
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
exports.JSONApiResponse = JSONApiResponse;
|
|
316
|
-
class VoidApiResponse {
|
|
317
|
-
constructor(raw) {
|
|
318
|
-
this.raw = raw;
|
|
319
|
-
}
|
|
320
|
-
value() {
|
|
321
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
322
|
-
return undefined;
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
exports.VoidApiResponse = VoidApiResponse;
|
|
327
|
-
class BlobApiResponse {
|
|
328
|
-
constructor(raw) {
|
|
329
|
-
this.raw = raw;
|
|
330
|
-
}
|
|
331
|
-
value() {
|
|
332
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
333
|
-
return yield this.raw.blob();
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
;
|
|
337
|
-
}
|
|
338
|
-
exports.BlobApiResponse = BlobApiResponse;
|
|
339
|
-
class TextApiResponse {
|
|
340
|
-
constructor(raw) {
|
|
341
|
-
this.raw = raw;
|
|
342
|
-
}
|
|
343
|
-
value() {
|
|
344
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
345
|
-
return yield this.raw.text();
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
;
|
|
349
|
-
}
|
|
350
|
-
exports.TextApiResponse = TextApiResponse;
|
package/docs/AuthApi.md
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
# AuthApi
|
|
2
|
-
|
|
3
|
-
All URIs are relative to *https://api.mon-domaine.com*
|
|
4
|
-
|
|
5
|
-
|Method | HTTP request | Description|
|
|
6
|
-
|------------- | ------------- | -------------|
|
|
7
|
-
|[**apiAuthRegisterPost**](#apiauthregisterpost) | **POST** /api/auth/register | Register a new user|
|
|
8
|
-
|
|
9
|
-
# **apiAuthRegisterPost**
|
|
10
|
-
> User apiAuthRegisterPost()
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
### Example
|
|
14
|
-
|
|
15
|
-
```typescript
|
|
16
|
-
import {
|
|
17
|
-
AuthApi,
|
|
18
|
-
Configuration
|
|
19
|
-
} from '@tennac-booking/sdk';
|
|
20
|
-
|
|
21
|
-
const configuration = new Configuration();
|
|
22
|
-
const apiInstance = new AuthApi(configuration);
|
|
23
|
-
|
|
24
|
-
let firstName: string; // (default to undefined)
|
|
25
|
-
let lastName: string; // (default to undefined)
|
|
26
|
-
let email: string; // (default to undefined)
|
|
27
|
-
let password: string; // (default to undefined)
|
|
28
|
-
let username: string; // (optional) (default to undefined)
|
|
29
|
-
let isAccountVerified: boolean; // (optional) (default to false)
|
|
30
|
-
let level: string; // (optional) (default to undefined)
|
|
31
|
-
let stripeCustomerId: string; // (optional) (default to undefined)
|
|
32
|
-
let phone: string; // (optional) (default to undefined)
|
|
33
|
-
let profilePicture: string; // (optional) (default to undefined)
|
|
34
|
-
let isAdmin: boolean; // (optional) (default to false)
|
|
35
|
-
|
|
36
|
-
const { status, data } = await apiInstance.apiAuthRegisterPost(
|
|
37
|
-
firstName,
|
|
38
|
-
lastName,
|
|
39
|
-
email,
|
|
40
|
-
password,
|
|
41
|
-
username,
|
|
42
|
-
isAccountVerified,
|
|
43
|
-
level,
|
|
44
|
-
stripeCustomerId,
|
|
45
|
-
phone,
|
|
46
|
-
profilePicture,
|
|
47
|
-
isAdmin
|
|
48
|
-
);
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Parameters
|
|
52
|
-
|
|
53
|
-
|Name | Type | Description | Notes|
|
|
54
|
-
|------------- | ------------- | ------------- | -------------|
|
|
55
|
-
| **firstName** | [**string**] | | defaults to undefined|
|
|
56
|
-
| **lastName** | [**string**] | | defaults to undefined|
|
|
57
|
-
| **email** | [**string**] | | defaults to undefined|
|
|
58
|
-
| **password** | [**string**] | | defaults to undefined|
|
|
59
|
-
| **username** | [**string**] | | (optional) defaults to undefined|
|
|
60
|
-
| **isAccountVerified** | [**boolean**] | | (optional) defaults to false|
|
|
61
|
-
| **level** | [**string**] | | (optional) defaults to undefined|
|
|
62
|
-
| **stripeCustomerId** | [**string**] | | (optional) defaults to undefined|
|
|
63
|
-
| **phone** | [**string**] | | (optional) defaults to undefined|
|
|
64
|
-
| **profilePicture** | [**string**] | | (optional) defaults to undefined|
|
|
65
|
-
| **isAdmin** | [**boolean**] | | (optional) defaults to false|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
### Return type
|
|
69
|
-
|
|
70
|
-
**User**
|
|
71
|
-
|
|
72
|
-
### Authorization
|
|
73
|
-
|
|
74
|
-
No authorization required
|
|
75
|
-
|
|
76
|
-
### HTTP request headers
|
|
77
|
-
|
|
78
|
-
- **Content-Type**: multipart/form-data
|
|
79
|
-
- **Accept**: application/json
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
### HTTP response details
|
|
83
|
-
| Status code | Description | Response headers |
|
|
84
|
-
|-------------|-------------|------------------|
|
|
85
|
-
|**201** | Created user object | - |
|
|
86
|
-
|
|
87
|
-
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
88
|
-
|
package/models/Booking.ts
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
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
|
-
|
|
15
|
-
import { mapValues } from '../runtime';
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* @export
|
|
69
|
-
*/
|
|
70
|
-
export const BookingStatusEnum = {
|
|
71
|
-
Active: 'active',
|
|
72
|
-
Inactive: 'inactive'
|
|
73
|
-
} as const;
|
|
74
|
-
export type BookingStatusEnum = typeof BookingStatusEnum[keyof typeof BookingStatusEnum];
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* @export
|
|
78
|
-
*/
|
|
79
|
-
export const BookingStripeStatusEnum = {
|
|
80
|
-
Pending: 'pending',
|
|
81
|
-
Paid: 'paid',
|
|
82
|
-
Failed: 'failed',
|
|
83
|
-
Refunded: 'refunded',
|
|
84
|
-
Canceled: 'canceled'
|
|
85
|
-
} as const;
|
|
86
|
-
export type BookingStripeStatusEnum = typeof BookingStripeStatusEnum[keyof typeof BookingStripeStatusEnum];
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Check if a given object implements the Booking interface.
|
|
91
|
-
*/
|
|
92
|
-
export function instanceOfBooking(value: object): value is Booking {
|
|
93
|
-
if (!('userId' in value) || value['userId'] === undefined) return false;
|
|
94
|
-
if (!('status' in value) || value['status'] === undefined) return false;
|
|
95
|
-
if (!('stripeStatus' in value) || value['stripeStatus'] === undefined) return false;
|
|
96
|
-
if (!('stripePaymentIntentId' in value) || value['stripePaymentIntentId'] === undefined) return false;
|
|
97
|
-
if (!('totalPrice' in value) || value['totalPrice'] === undefined) return false;
|
|
98
|
-
if (!('slotId' in value) || value['slotId'] === undefined) return false;
|
|
99
|
-
return true;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export function BookingFromJSON(json: any): Booking {
|
|
103
|
-
return BookingFromJSONTyped(json, false);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export function BookingFromJSONTyped(json: any, ignoreDiscriminator: boolean): Booking {
|
|
107
|
-
if (json == null) {
|
|
108
|
-
return json;
|
|
109
|
-
}
|
|
110
|
-
return {
|
|
111
|
-
|
|
112
|
-
'userId': json['userId'],
|
|
113
|
-
'playersIds': json['playersIds'] == null ? undefined : json['playersIds'],
|
|
114
|
-
'status': json['status'],
|
|
115
|
-
'stripeStatus': json['stripeStatus'],
|
|
116
|
-
'stripePaymentIntentId': json['stripePaymentIntentId'],
|
|
117
|
-
'totalPrice': json['totalPrice'],
|
|
118
|
-
'slotId': json['slotId'],
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export function BookingToJSON(json: any): Booking {
|
|
123
|
-
return BookingToJSONTyped(json, false);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export function BookingToJSONTyped(value?: Booking | null, ignoreDiscriminator: boolean = false): any {
|
|
127
|
-
if (value == null) {
|
|
128
|
-
return value;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
return {
|
|
132
|
-
|
|
133
|
-
'userId': value['userId'],
|
|
134
|
-
'playersIds': value['playersIds'],
|
|
135
|
-
'status': value['status'],
|
|
136
|
-
'stripeStatus': value['stripeStatus'],
|
|
137
|
-
'stripePaymentIntentId': value['stripePaymentIntentId'],
|
|
138
|
-
'totalPrice': value['totalPrice'],
|
|
139
|
-
'slotId': value['slotId'],
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
|
package/models/Court.ts
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
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
|
-
|
|
15
|
-
import { mapValues } from '../runtime';
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @export
|
|
19
|
-
* @interface Court
|
|
20
|
-
*/
|
|
21
|
-
export interface Court {
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @type {string}
|
|
25
|
-
* @memberof Court
|
|
26
|
-
*/
|
|
27
|
-
name: string;
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @type {string}
|
|
31
|
-
* @memberof Court
|
|
32
|
-
*/
|
|
33
|
-
status: CourtStatusEnum;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* @type {string}
|
|
37
|
-
* @memberof Court
|
|
38
|
-
*/
|
|
39
|
-
comments?: string;
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* @type {number}
|
|
43
|
-
* @memberof Court
|
|
44
|
-
*/
|
|
45
|
-
pricePerSlot: number;
|
|
46
|
-
/**
|
|
47
|
-
*
|
|
48
|
-
* @type {number}
|
|
49
|
-
* @memberof Court
|
|
50
|
-
*/
|
|
51
|
-
slotDefaultDuration: number;
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
* @type {number}
|
|
55
|
-
* @memberof Court
|
|
56
|
-
*/
|
|
57
|
-
startTimeInTheDayInMinutes: number;
|
|
58
|
-
/**
|
|
59
|
-
*
|
|
60
|
-
* @type {number}
|
|
61
|
-
* @memberof Court
|
|
62
|
-
*/
|
|
63
|
-
endTimeInTheDayInMinutes: number;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* @export
|
|
69
|
-
*/
|
|
70
|
-
export const CourtStatusEnum = {
|
|
71
|
-
Available: 'available',
|
|
72
|
-
Unavailable: 'unavailable'
|
|
73
|
-
} as const;
|
|
74
|
-
export type CourtStatusEnum = typeof CourtStatusEnum[keyof typeof CourtStatusEnum];
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Check if a given object implements the Court interface.
|
|
79
|
-
*/
|
|
80
|
-
export function instanceOfCourt(value: object): value is Court {
|
|
81
|
-
if (!('name' in value) || value['name'] === undefined) return false;
|
|
82
|
-
if (!('status' in value) || value['status'] === undefined) return false;
|
|
83
|
-
if (!('pricePerSlot' in value) || value['pricePerSlot'] === undefined) return false;
|
|
84
|
-
if (!('slotDefaultDuration' in value) || value['slotDefaultDuration'] === undefined) return false;
|
|
85
|
-
if (!('startTimeInTheDayInMinutes' in value) || value['startTimeInTheDayInMinutes'] === undefined) return false;
|
|
86
|
-
if (!('endTimeInTheDayInMinutes' in value) || value['endTimeInTheDayInMinutes'] === undefined) return false;
|
|
87
|
-
return true;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export function CourtFromJSON(json: any): Court {
|
|
91
|
-
return CourtFromJSONTyped(json, false);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export function CourtFromJSONTyped(json: any, ignoreDiscriminator: boolean): Court {
|
|
95
|
-
if (json == null) {
|
|
96
|
-
return json;
|
|
97
|
-
}
|
|
98
|
-
return {
|
|
99
|
-
|
|
100
|
-
'name': json['name'],
|
|
101
|
-
'status': json['status'],
|
|
102
|
-
'comments': json['comments'] == null ? undefined : json['comments'],
|
|
103
|
-
'pricePerSlot': json['pricePerSlot'],
|
|
104
|
-
'slotDefaultDuration': json['slotDefaultDuration'],
|
|
105
|
-
'startTimeInTheDayInMinutes': json['startTimeInTheDayInMinutes'],
|
|
106
|
-
'endTimeInTheDayInMinutes': json['endTimeInTheDayInMinutes'],
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export function CourtToJSON(json: any): Court {
|
|
111
|
-
return CourtToJSONTyped(json, false);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export function CourtToJSONTyped(value?: Court | null, ignoreDiscriminator: boolean = false): any {
|
|
115
|
-
if (value == null) {
|
|
116
|
-
return value;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
return {
|
|
120
|
-
|
|
121
|
-
'name': value['name'],
|
|
122
|
-
'status': value['status'],
|
|
123
|
-
'comments': value['comments'],
|
|
124
|
-
'pricePerSlot': value['pricePerSlot'],
|
|
125
|
-
'slotDefaultDuration': value['slotDefaultDuration'],
|
|
126
|
-
'startTimeInTheDayInMinutes': value['startTimeInTheDayInMinutes'],
|
|
127
|
-
'endTimeInTheDayInMinutes': value['endTimeInTheDayInMinutes'],
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
|