@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.
Files changed (130) hide show
  1. package/.openapi-generator/FILES +1 -1
  2. package/README.md +1 -2
  3. package/api.ts +8 -273
  4. package/dist/api.d.ts +4 -156
  5. package/dist/api.js +9 -174
  6. package/dist/esm/api.d.ts +4 -156
  7. package/dist/esm/api.js +9 -170
  8. package/docs/UsersApi.md +4 -4
  9. package/package.json +4 -4
  10. package/apis/AuthApi.ts +0 -157
  11. package/apis/UsersApi.ts +0 -56
  12. package/apis/index.ts +0 -4
  13. package/dist/apis/AuthApi.d.ts +0 -39
  14. package/dist/apis/AuthApi.js +0 -117
  15. package/dist/apis/UsersApi.d.ts +0 -26
  16. package/dist/apis/UsersApi.js +0 -58
  17. package/dist/apis/index.d.ts +0 -2
  18. package/dist/apis/index.js +0 -20
  19. package/dist/esm/apis/AuthApi.d.ts +0 -39
  20. package/dist/esm/apis/AuthApi.js +0 -113
  21. package/dist/esm/apis/UsersApi.d.ts +0 -26
  22. package/dist/esm/apis/UsersApi.js +0 -54
  23. package/dist/esm/apis/index.d.ts +0 -2
  24. package/dist/esm/apis/index.js +0 -4
  25. package/dist/esm/models/Booking.d.ts +0 -87
  26. package/dist/esm/models/Booking.js +0 -82
  27. package/dist/esm/models/Court.d.ts +0 -76
  28. package/dist/esm/models/Court.js +0 -72
  29. package/dist/esm/models/Slot.d.ts +0 -44
  30. package/dist/esm/models/Slot.js +0 -51
  31. package/dist/esm/models/SlotException.d.ts +0 -50
  32. package/dist/esm/models/SlotException.js +0 -55
  33. package/dist/esm/models/User.d.ts +0 -92
  34. package/dist/esm/models/User.js +0 -69
  35. package/dist/esm/models/index.d.ts +0 -5
  36. package/dist/esm/models/index.js +0 -7
  37. package/dist/esm/runtime.d.ts +0 -184
  38. package/dist/esm/runtime.js +0 -334
  39. package/dist/esm/src/apis/AuthApi.d.ts +0 -39
  40. package/dist/esm/src/apis/AuthApi.js +0 -113
  41. package/dist/esm/src/apis/UsersApi.d.ts +0 -26
  42. package/dist/esm/src/apis/UsersApi.js +0 -54
  43. package/dist/esm/src/apis/index.d.ts +0 -2
  44. package/dist/esm/src/apis/index.js +0 -4
  45. package/dist/esm/src/index.d.ts +0 -3
  46. package/dist/esm/src/index.js +0 -5
  47. package/dist/esm/src/models/Booking.d.ts +0 -87
  48. package/dist/esm/src/models/Booking.js +0 -82
  49. package/dist/esm/src/models/BookingStatus.d.ts +0 -25
  50. package/dist/esm/src/models/BookingStatus.js +0 -43
  51. package/dist/esm/src/models/Court.d.ts +0 -76
  52. package/dist/esm/src/models/Court.js +0 -72
  53. package/dist/esm/src/models/CourtStatus.d.ts +0 -25
  54. package/dist/esm/src/models/CourtStatus.js +0 -43
  55. package/dist/esm/src/models/Slot.d.ts +0 -44
  56. package/dist/esm/src/models/Slot.js +0 -51
  57. package/dist/esm/src/models/SlotException.d.ts +0 -50
  58. package/dist/esm/src/models/SlotException.js +0 -55
  59. package/dist/esm/src/models/StripeStatus.d.ts +0 -28
  60. package/dist/esm/src/models/StripeStatus.js +0 -46
  61. package/dist/esm/src/models/User.d.ts +0 -92
  62. package/dist/esm/src/models/User.js +0 -69
  63. package/dist/esm/src/models/index.d.ts +0 -5
  64. package/dist/esm/src/models/index.js +0 -7
  65. package/dist/esm/src/runtime.d.ts +0 -184
  66. package/dist/esm/src/runtime.js +0 -334
  67. package/dist/models/Booking.d.ts +0 -87
  68. package/dist/models/Booking.js +0 -90
  69. package/dist/models/Court.d.ts +0 -76
  70. package/dist/models/Court.js +0 -80
  71. package/dist/models/Slot.d.ts +0 -44
  72. package/dist/models/Slot.js +0 -58
  73. package/dist/models/SlotException.d.ts +0 -50
  74. package/dist/models/SlotException.js +0 -62
  75. package/dist/models/User.d.ts +0 -92
  76. package/dist/models/User.js +0 -76
  77. package/dist/models/index.d.ts +0 -5
  78. package/dist/models/index.js +0 -23
  79. package/dist/runtime.d.ts +0 -184
  80. package/dist/runtime.js +0 -350
  81. package/dist/src/apis/AuthApi.d.ts +0 -39
  82. package/dist/src/apis/AuthApi.js +0 -117
  83. package/dist/src/apis/UsersApi.d.ts +0 -26
  84. package/dist/src/apis/UsersApi.js +0 -58
  85. package/dist/src/apis/index.d.ts +0 -2
  86. package/dist/src/apis/index.js +0 -20
  87. package/dist/src/index.d.ts +0 -3
  88. package/dist/src/index.js +0 -21
  89. package/dist/src/models/Booking.d.ts +0 -87
  90. package/dist/src/models/Booking.js +0 -90
  91. package/dist/src/models/BookingStatus.d.ts +0 -25
  92. package/dist/src/models/BookingStatus.js +0 -51
  93. package/dist/src/models/Court.d.ts +0 -76
  94. package/dist/src/models/Court.js +0 -80
  95. package/dist/src/models/CourtStatus.d.ts +0 -25
  96. package/dist/src/models/CourtStatus.js +0 -51
  97. package/dist/src/models/Slot.d.ts +0 -44
  98. package/dist/src/models/Slot.js +0 -58
  99. package/dist/src/models/SlotException.d.ts +0 -50
  100. package/dist/src/models/SlotException.js +0 -62
  101. package/dist/src/models/StripeStatus.d.ts +0 -28
  102. package/dist/src/models/StripeStatus.js +0 -54
  103. package/dist/src/models/User.d.ts +0 -92
  104. package/dist/src/models/User.js +0 -76
  105. package/dist/src/models/index.d.ts +0 -5
  106. package/dist/src/models/index.js +0 -23
  107. package/dist/src/runtime.d.ts +0 -184
  108. package/dist/src/runtime.js +0 -350
  109. package/docs/AuthApi.md +0 -88
  110. package/models/Booking.ts +0 -142
  111. package/models/Court.ts +0 -130
  112. package/models/Slot.ts +0 -84
  113. package/models/SlotException.ts +0 -93
  114. package/models/User.ts +0 -149
  115. package/models/index.ts +0 -7
  116. package/runtime.ts +0 -432
  117. package/src/apis/AuthApi.ts +0 -157
  118. package/src/apis/UsersApi.ts +0 -56
  119. package/src/apis/index.ts +0 -4
  120. package/src/index.ts +0 -5
  121. package/src/models/Booking.ts +0 -142
  122. package/src/models/BookingStatus.ts +0 -53
  123. package/src/models/Court.ts +0 -130
  124. package/src/models/CourtStatus.ts +0 -53
  125. package/src/models/Slot.ts +0 -84
  126. package/src/models/SlotException.ts +0 -93
  127. package/src/models/StripeStatus.ts +0 -56
  128. package/src/models/User.ts +0 -149
  129. package/src/models/index.ts +0 -7
  130. package/src/runtime.ts +0 -432
package/dist/api.js CHANGED
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.UsersApi = exports.UsersApiFactory = exports.UsersApiFp = exports.UsersApiAxiosParamCreator = exports.AuthApi = exports.AuthApiFactory = exports.AuthApiFp = exports.AuthApiAxiosParamCreator = exports.StripeStatus = exports.CourtStatus = exports.BookingStatus = void 0;
25
+ exports.UsersApi = exports.UsersApiFactory = exports.UsersApiFp = exports.UsersApiAxiosParamCreator = exports.StripeStatus = exports.CourtStatus = exports.BookingStatus = void 0;
26
26
  const axios_1 = require("axios");
27
27
  // Some imports not used depending on template conditions
28
28
  // @ts-ignore
@@ -59,171 +59,6 @@ exports.StripeStatus = {
59
59
  Refunded: 'refunded',
60
60
  Canceled: 'canceled'
61
61
  };
62
- /**
63
- * AuthApi - axios parameter creator
64
- * @export
65
- */
66
- const AuthApiAxiosParamCreator = function (configuration) {
67
- return {
68
- /**
69
- *
70
- * @summary Register a new user
71
- * @param {string} firstName
72
- * @param {string} lastName
73
- * @param {string} email
74
- * @param {string} password
75
- * @param {string} [username]
76
- * @param {boolean} [isAccountVerified]
77
- * @param {string} [level]
78
- * @param {string} [stripeCustomerId]
79
- * @param {string} [phone]
80
- * @param {string} [profilePicture]
81
- * @param {boolean} [isAdmin]
82
- * @param {*} [options] Override http request option.
83
- * @throws {RequiredError}
84
- */
85
- 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 = {}) {
86
- // verify required parameter 'firstName' is not null or undefined
87
- (0, common_1.assertParamExists)('apiAuthRegisterPost', 'firstName', firstName);
88
- // verify required parameter 'lastName' is not null or undefined
89
- (0, common_1.assertParamExists)('apiAuthRegisterPost', 'lastName', lastName);
90
- // verify required parameter 'email' is not null or undefined
91
- (0, common_1.assertParamExists)('apiAuthRegisterPost', 'email', email);
92
- // verify required parameter 'password' is not null or undefined
93
- (0, common_1.assertParamExists)('apiAuthRegisterPost', 'password', password);
94
- const localVarPath = `/api/auth/register`;
95
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
96
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
97
- let baseOptions;
98
- if (configuration) {
99
- baseOptions = configuration.baseOptions;
100
- }
101
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
102
- const localVarHeaderParameter = {};
103
- const localVarQueryParameter = {};
104
- const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
105
- if (username !== undefined) {
106
- localVarFormParams.append('username', username);
107
- }
108
- if (firstName !== undefined) {
109
- localVarFormParams.append('firstName', firstName);
110
- }
111
- if (lastName !== undefined) {
112
- localVarFormParams.append('lastName', lastName);
113
- }
114
- if (email !== undefined) {
115
- localVarFormParams.append('email', email);
116
- }
117
- if (isAccountVerified !== undefined) {
118
- localVarFormParams.append('isAccountVerified', String(isAccountVerified));
119
- }
120
- if (level !== undefined) {
121
- localVarFormParams.append('level', level);
122
- }
123
- if (stripeCustomerId !== undefined) {
124
- localVarFormParams.append('stripeCustomerId', stripeCustomerId);
125
- }
126
- if (phone !== undefined) {
127
- localVarFormParams.append('phone', phone);
128
- }
129
- if (password !== undefined) {
130
- localVarFormParams.append('password', password);
131
- }
132
- if (profilePicture !== undefined) {
133
- localVarFormParams.append('profilePicture', profilePicture);
134
- }
135
- if (isAdmin !== undefined) {
136
- localVarFormParams.append('isAdmin', String(isAdmin));
137
- }
138
- localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
139
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
140
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
141
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
142
- localVarRequestOptions.data = localVarFormParams;
143
- return {
144
- url: (0, common_1.toPathString)(localVarUrlObj),
145
- options: localVarRequestOptions,
146
- };
147
- }),
148
- };
149
- };
150
- exports.AuthApiAxiosParamCreator = AuthApiAxiosParamCreator;
151
- /**
152
- * AuthApi - functional programming interface
153
- * @export
154
- */
155
- const AuthApiFp = function (configuration) {
156
- const localVarAxiosParamCreator = (0, exports.AuthApiAxiosParamCreator)(configuration);
157
- return {
158
- /**
159
- *
160
- * @summary Register a new user
161
- * @param {string} firstName
162
- * @param {string} lastName
163
- * @param {string} email
164
- * @param {string} password
165
- * @param {string} [username]
166
- * @param {boolean} [isAccountVerified]
167
- * @param {string} [level]
168
- * @param {string} [stripeCustomerId]
169
- * @param {string} [phone]
170
- * @param {string} [profilePicture]
171
- * @param {boolean} [isAdmin]
172
- * @param {*} [options] Override http request option.
173
- * @throws {RequiredError}
174
- */
175
- apiAuthRegisterPost(firstName, lastName, email, password, username, isAccountVerified, level, stripeCustomerId, phone, profilePicture, isAdmin, options) {
176
- return __awaiter(this, void 0, void 0, function* () {
177
- var _a, _b, _c;
178
- const localVarAxiosArgs = yield localVarAxiosParamCreator.apiAuthRegisterPost(firstName, lastName, email, password, username, isAccountVerified, level, stripeCustomerId, phone, profilePicture, isAdmin, options);
179
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
180
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AuthApi.apiAuthRegisterPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
181
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
182
- });
183
- },
184
- };
185
- };
186
- exports.AuthApiFp = AuthApiFp;
187
- /**
188
- * AuthApi - factory interface
189
- * @export
190
- */
191
- const AuthApiFactory = function (configuration, basePath, axios) {
192
- const localVarFp = (0, exports.AuthApiFp)(configuration);
193
- return {
194
- /**
195
- *
196
- * @summary Register a new user
197
- * @param {AuthApiApiAuthRegisterPostRequest} requestParameters Request parameters.
198
- * @param {*} [options] Override http request option.
199
- * @throws {RequiredError}
200
- */
201
- apiAuthRegisterPost(requestParameters, options) {
202
- 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));
203
- },
204
- };
205
- };
206
- exports.AuthApiFactory = AuthApiFactory;
207
- /**
208
- * AuthApi - object-oriented interface
209
- * @export
210
- * @class AuthApi
211
- * @extends {BaseAPI}
212
- */
213
- class AuthApi extends base_1.BaseAPI {
214
- /**
215
- *
216
- * @summary Register a new user
217
- * @param {AuthApiApiAuthRegisterPostRequest} requestParameters Request parameters.
218
- * @param {*} [options] Override http request option.
219
- * @throws {RequiredError}
220
- * @memberof AuthApi
221
- */
222
- apiAuthRegisterPost(requestParameters, options) {
223
- return (0, exports.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));
224
- }
225
- }
226
- exports.AuthApi = AuthApi;
227
62
  /**
228
63
  * UsersApi - axios parameter creator
229
64
  * @export
@@ -236,7 +71,7 @@ const UsersApiAxiosParamCreator = function (configuration) {
236
71
  * @param {*} [options] Override http request option.
237
72
  * @throws {RequiredError}
238
73
  */
239
- apiUsersGet: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
74
+ getAllUsers: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
240
75
  const localVarPath = `/api/users`;
241
76
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
242
77
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -271,12 +106,12 @@ const UsersApiFp = function (configuration) {
271
106
  * @param {*} [options] Override http request option.
272
107
  * @throws {RequiredError}
273
108
  */
274
- apiUsersGet(options) {
109
+ getAllUsers(options) {
275
110
  return __awaiter(this, void 0, void 0, function* () {
276
111
  var _a, _b, _c;
277
- const localVarAxiosArgs = yield localVarAxiosParamCreator.apiUsersGet(options);
112
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllUsers(options);
278
113
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
279
- const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.apiUsersGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
114
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UsersApi.getAllUsers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
280
115
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
281
116
  });
282
117
  },
@@ -296,8 +131,8 @@ const UsersApiFactory = function (configuration, basePath, axios) {
296
131
  * @param {*} [options] Override http request option.
297
132
  * @throws {RequiredError}
298
133
  */
299
- apiUsersGet(options) {
300
- return localVarFp.apiUsersGet(options).then((request) => request(axios, basePath));
134
+ getAllUsers(options) {
135
+ return localVarFp.getAllUsers(options).then((request) => request(axios, basePath));
301
136
  },
302
137
  };
303
138
  };
@@ -316,8 +151,8 @@ class UsersApi extends base_1.BaseAPI {
316
151
  * @throws {RequiredError}
317
152
  * @memberof UsersApi
318
153
  */
319
- apiUsersGet(options) {
320
- return (0, exports.UsersApiFp)(this.configuration).apiUsersGet(options).then((request) => request(this.axios, this.basePath));
154
+ getAllUsers(options) {
155
+ return (0, exports.UsersApiFp)(this.configuration).getAllUsers(options).then((request) => request(this.axios, this.basePath));
321
156
  }
322
157
  }
323
158
  exports.UsersApi = UsersApi;
package/dist/esm/api.d.ts CHANGED
@@ -273,158 +273,6 @@ export interface User {
273
273
  */
274
274
  'isAdmin'?: boolean;
275
275
  }
276
- /**
277
- * AuthApi - axios parameter creator
278
- * @export
279
- */
280
- export declare const AuthApiAxiosParamCreator: (configuration?: Configuration) => {
281
- /**
282
- *
283
- * @summary Register a new user
284
- * @param {string} firstName
285
- * @param {string} lastName
286
- * @param {string} email
287
- * @param {string} password
288
- * @param {string} [username]
289
- * @param {boolean} [isAccountVerified]
290
- * @param {string} [level]
291
- * @param {string} [stripeCustomerId]
292
- * @param {string} [phone]
293
- * @param {string} [profilePicture]
294
- * @param {boolean} [isAdmin]
295
- * @param {*} [options] Override http request option.
296
- * @throws {RequiredError}
297
- */
298
- 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>;
299
- };
300
- /**
301
- * AuthApi - functional programming interface
302
- * @export
303
- */
304
- export declare const AuthApiFp: (configuration?: Configuration) => {
305
- /**
306
- *
307
- * @summary Register a new user
308
- * @param {string} firstName
309
- * @param {string} lastName
310
- * @param {string} email
311
- * @param {string} password
312
- * @param {string} [username]
313
- * @param {boolean} [isAccountVerified]
314
- * @param {string} [level]
315
- * @param {string} [stripeCustomerId]
316
- * @param {string} [phone]
317
- * @param {string} [profilePicture]
318
- * @param {boolean} [isAdmin]
319
- * @param {*} [options] Override http request option.
320
- * @throws {RequiredError}
321
- */
322
- 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>>;
323
- };
324
- /**
325
- * AuthApi - factory interface
326
- * @export
327
- */
328
- export declare const AuthApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
329
- /**
330
- *
331
- * @summary Register a new user
332
- * @param {AuthApiApiAuthRegisterPostRequest} requestParameters Request parameters.
333
- * @param {*} [options] Override http request option.
334
- * @throws {RequiredError}
335
- */
336
- apiAuthRegisterPost(requestParameters: AuthApiApiAuthRegisterPostRequest, options?: RawAxiosRequestConfig): AxiosPromise<User>;
337
- };
338
- /**
339
- * Request parameters for apiAuthRegisterPost operation in AuthApi.
340
- * @export
341
- * @interface AuthApiApiAuthRegisterPostRequest
342
- */
343
- export interface AuthApiApiAuthRegisterPostRequest {
344
- /**
345
- *
346
- * @type {string}
347
- * @memberof AuthApiApiAuthRegisterPost
348
- */
349
- readonly firstName: string;
350
- /**
351
- *
352
- * @type {string}
353
- * @memberof AuthApiApiAuthRegisterPost
354
- */
355
- readonly lastName: string;
356
- /**
357
- *
358
- * @type {string}
359
- * @memberof AuthApiApiAuthRegisterPost
360
- */
361
- readonly email: string;
362
- /**
363
- *
364
- * @type {string}
365
- * @memberof AuthApiApiAuthRegisterPost
366
- */
367
- readonly password: string;
368
- /**
369
- *
370
- * @type {string}
371
- * @memberof AuthApiApiAuthRegisterPost
372
- */
373
- readonly username?: string;
374
- /**
375
- *
376
- * @type {boolean}
377
- * @memberof AuthApiApiAuthRegisterPost
378
- */
379
- readonly isAccountVerified?: boolean;
380
- /**
381
- *
382
- * @type {string}
383
- * @memberof AuthApiApiAuthRegisterPost
384
- */
385
- readonly level?: string;
386
- /**
387
- *
388
- * @type {string}
389
- * @memberof AuthApiApiAuthRegisterPost
390
- */
391
- readonly stripeCustomerId?: string;
392
- /**
393
- *
394
- * @type {string}
395
- * @memberof AuthApiApiAuthRegisterPost
396
- */
397
- readonly phone?: string;
398
- /**
399
- *
400
- * @type {string}
401
- * @memberof AuthApiApiAuthRegisterPost
402
- */
403
- readonly profilePicture?: string;
404
- /**
405
- *
406
- * @type {boolean}
407
- * @memberof AuthApiApiAuthRegisterPost
408
- */
409
- readonly isAdmin?: boolean;
410
- }
411
- /**
412
- * AuthApi - object-oriented interface
413
- * @export
414
- * @class AuthApi
415
- * @extends {BaseAPI}
416
- */
417
- export declare class AuthApi extends BaseAPI {
418
- /**
419
- *
420
- * @summary Register a new user
421
- * @param {AuthApiApiAuthRegisterPostRequest} requestParameters Request parameters.
422
- * @param {*} [options] Override http request option.
423
- * @throws {RequiredError}
424
- * @memberof AuthApi
425
- */
426
- apiAuthRegisterPost(requestParameters: AuthApiApiAuthRegisterPostRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<User, any>>;
427
- }
428
276
  /**
429
277
  * UsersApi - axios parameter creator
430
278
  * @export
@@ -436,7 +284,7 @@ export declare const UsersApiAxiosParamCreator: (configuration?: Configuration)
436
284
  * @param {*} [options] Override http request option.
437
285
  * @throws {RequiredError}
438
286
  */
439
- apiUsersGet: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
287
+ getAllUsers: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
440
288
  };
441
289
  /**
442
290
  * UsersApi - functional programming interface
@@ -449,7 +297,7 @@ export declare const UsersApiFp: (configuration?: Configuration) => {
449
297
  * @param {*} [options] Override http request option.
450
298
  * @throws {RequiredError}
451
299
  */
452
- apiUsersGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<User>>>;
300
+ getAllUsers(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<User>>>;
453
301
  };
454
302
  /**
455
303
  * UsersApi - factory interface
@@ -462,7 +310,7 @@ export declare const UsersApiFactory: (configuration?: Configuration, basePath?:
462
310
  * @param {*} [options] Override http request option.
463
311
  * @throws {RequiredError}
464
312
  */
465
- apiUsersGet(options?: RawAxiosRequestConfig): AxiosPromise<Array<User>>;
313
+ getAllUsers(options?: RawAxiosRequestConfig): AxiosPromise<Array<User>>;
466
314
  };
467
315
  /**
468
316
  * UsersApi - object-oriented interface
@@ -478,5 +326,5 @@ export declare class UsersApi extends BaseAPI {
478
326
  * @throws {RequiredError}
479
327
  * @memberof UsersApi
480
328
  */
481
- apiUsersGet(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<User[], any>>;
329
+ getAllUsers(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<User[], any>>;
482
330
  }
package/dist/esm/api.js CHANGED
@@ -23,7 +23,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
23
23
  import globalAxios from 'axios';
24
24
  // Some imports not used depending on template conditions
25
25
  // @ts-ignore
26
- import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from './common';
26
+ import { DUMMY_BASE_URL, setSearchParams, toPathString, createRequestFunction } from './common';
27
27
  // @ts-ignore
28
28
  import { BASE_PATH, BaseAPI, operationServerMap } from './base';
29
29
  /**
@@ -56,167 +56,6 @@ export const StripeStatus = {
56
56
  Refunded: 'refunded',
57
57
  Canceled: 'canceled'
58
58
  };
59
- /**
60
- * AuthApi - axios parameter creator
61
- * @export
62
- */
63
- export const AuthApiAxiosParamCreator = function (configuration) {
64
- return {
65
- /**
66
- *
67
- * @summary Register a new user
68
- * @param {string} firstName
69
- * @param {string} lastName
70
- * @param {string} email
71
- * @param {string} password
72
- * @param {string} [username]
73
- * @param {boolean} [isAccountVerified]
74
- * @param {string} [level]
75
- * @param {string} [stripeCustomerId]
76
- * @param {string} [phone]
77
- * @param {string} [profilePicture]
78
- * @param {boolean} [isAdmin]
79
- * @param {*} [options] Override http request option.
80
- * @throws {RequiredError}
81
- */
82
- 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 = {}) {
83
- // verify required parameter 'firstName' is not null or undefined
84
- assertParamExists('apiAuthRegisterPost', 'firstName', firstName);
85
- // verify required parameter 'lastName' is not null or undefined
86
- assertParamExists('apiAuthRegisterPost', 'lastName', lastName);
87
- // verify required parameter 'email' is not null or undefined
88
- assertParamExists('apiAuthRegisterPost', 'email', email);
89
- // verify required parameter 'password' is not null or undefined
90
- assertParamExists('apiAuthRegisterPost', 'password', password);
91
- const localVarPath = `/api/auth/register`;
92
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
93
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
94
- let baseOptions;
95
- if (configuration) {
96
- baseOptions = configuration.baseOptions;
97
- }
98
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
99
- const localVarHeaderParameter = {};
100
- const localVarQueryParameter = {};
101
- const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
102
- if (username !== undefined) {
103
- localVarFormParams.append('username', username);
104
- }
105
- if (firstName !== undefined) {
106
- localVarFormParams.append('firstName', firstName);
107
- }
108
- if (lastName !== undefined) {
109
- localVarFormParams.append('lastName', lastName);
110
- }
111
- if (email !== undefined) {
112
- localVarFormParams.append('email', email);
113
- }
114
- if (isAccountVerified !== undefined) {
115
- localVarFormParams.append('isAccountVerified', String(isAccountVerified));
116
- }
117
- if (level !== undefined) {
118
- localVarFormParams.append('level', level);
119
- }
120
- if (stripeCustomerId !== undefined) {
121
- localVarFormParams.append('stripeCustomerId', stripeCustomerId);
122
- }
123
- if (phone !== undefined) {
124
- localVarFormParams.append('phone', phone);
125
- }
126
- if (password !== undefined) {
127
- localVarFormParams.append('password', password);
128
- }
129
- if (profilePicture !== undefined) {
130
- localVarFormParams.append('profilePicture', profilePicture);
131
- }
132
- if (isAdmin !== undefined) {
133
- localVarFormParams.append('isAdmin', String(isAdmin));
134
- }
135
- localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
136
- setSearchParams(localVarUrlObj, localVarQueryParameter);
137
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
139
- localVarRequestOptions.data = localVarFormParams;
140
- return {
141
- url: toPathString(localVarUrlObj),
142
- options: localVarRequestOptions,
143
- };
144
- }),
145
- };
146
- };
147
- /**
148
- * AuthApi - functional programming interface
149
- * @export
150
- */
151
- export const AuthApiFp = function (configuration) {
152
- const localVarAxiosParamCreator = AuthApiAxiosParamCreator(configuration);
153
- return {
154
- /**
155
- *
156
- * @summary Register a new user
157
- * @param {string} firstName
158
- * @param {string} lastName
159
- * @param {string} email
160
- * @param {string} password
161
- * @param {string} [username]
162
- * @param {boolean} [isAccountVerified]
163
- * @param {string} [level]
164
- * @param {string} [stripeCustomerId]
165
- * @param {string} [phone]
166
- * @param {string} [profilePicture]
167
- * @param {boolean} [isAdmin]
168
- * @param {*} [options] Override http request option.
169
- * @throws {RequiredError}
170
- */
171
- apiAuthRegisterPost(firstName, lastName, email, password, username, isAccountVerified, level, stripeCustomerId, phone, profilePicture, isAdmin, options) {
172
- return __awaiter(this, void 0, void 0, function* () {
173
- var _a, _b, _c;
174
- const localVarAxiosArgs = yield localVarAxiosParamCreator.apiAuthRegisterPost(firstName, lastName, email, password, username, isAccountVerified, level, stripeCustomerId, phone, profilePicture, isAdmin, options);
175
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
176
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthApi.apiAuthRegisterPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
177
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
178
- });
179
- },
180
- };
181
- };
182
- /**
183
- * AuthApi - factory interface
184
- * @export
185
- */
186
- export const AuthApiFactory = function (configuration, basePath, axios) {
187
- const localVarFp = AuthApiFp(configuration);
188
- return {
189
- /**
190
- *
191
- * @summary Register a new user
192
- * @param {AuthApiApiAuthRegisterPostRequest} requestParameters Request parameters.
193
- * @param {*} [options] Override http request option.
194
- * @throws {RequiredError}
195
- */
196
- apiAuthRegisterPost(requestParameters, options) {
197
- 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));
198
- },
199
- };
200
- };
201
- /**
202
- * AuthApi - object-oriented interface
203
- * @export
204
- * @class AuthApi
205
- * @extends {BaseAPI}
206
- */
207
- export class AuthApi extends BaseAPI {
208
- /**
209
- *
210
- * @summary Register a new user
211
- * @param {AuthApiApiAuthRegisterPostRequest} requestParameters Request parameters.
212
- * @param {*} [options] Override http request option.
213
- * @throws {RequiredError}
214
- * @memberof AuthApi
215
- */
216
- apiAuthRegisterPost(requestParameters, options) {
217
- 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));
218
- }
219
- }
220
59
  /**
221
60
  * UsersApi - axios parameter creator
222
61
  * @export
@@ -229,7 +68,7 @@ export const UsersApiAxiosParamCreator = function (configuration) {
229
68
  * @param {*} [options] Override http request option.
230
69
  * @throws {RequiredError}
231
70
  */
232
- apiUsersGet: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
71
+ getAllUsers: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
233
72
  const localVarPath = `/api/users`;
234
73
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
235
74
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -263,12 +102,12 @@ export const UsersApiFp = function (configuration) {
263
102
  * @param {*} [options] Override http request option.
264
103
  * @throws {RequiredError}
265
104
  */
266
- apiUsersGet(options) {
105
+ getAllUsers(options) {
267
106
  return __awaiter(this, void 0, void 0, function* () {
268
107
  var _a, _b, _c;
269
- const localVarAxiosArgs = yield localVarAxiosParamCreator.apiUsersGet(options);
108
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllUsers(options);
270
109
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
271
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.apiUsersGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
110
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.getAllUsers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
272
111
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
273
112
  });
274
113
  },
@@ -287,8 +126,8 @@ export const UsersApiFactory = function (configuration, basePath, axios) {
287
126
  * @param {*} [options] Override http request option.
288
127
  * @throws {RequiredError}
289
128
  */
290
- apiUsersGet(options) {
291
- return localVarFp.apiUsersGet(options).then((request) => request(axios, basePath));
129
+ getAllUsers(options) {
130
+ return localVarFp.getAllUsers(options).then((request) => request(axios, basePath));
292
131
  },
293
132
  };
294
133
  };
@@ -306,7 +145,7 @@ export class UsersApi extends BaseAPI {
306
145
  * @throws {RequiredError}
307
146
  * @memberof UsersApi
308
147
  */
309
- apiUsersGet(options) {
310
- return UsersApiFp(this.configuration).apiUsersGet(options).then((request) => request(this.axios, this.basePath));
148
+ getAllUsers(options) {
149
+ return UsersApiFp(this.configuration).getAllUsers(options).then((request) => request(this.axios, this.basePath));
311
150
  }
312
151
  }
package/docs/UsersApi.md CHANGED
@@ -4,10 +4,10 @@ All URIs are relative to *https://api.mon-domaine.com*
4
4
 
5
5
  |Method | HTTP request | Description|
6
6
  |------------- | ------------- | -------------|
7
- |[**apiUsersGet**](#apiusersget) | **GET** /api/users | Retrieve all users|
7
+ |[**getAllUsers**](#getallusers) | **GET** /api/users | Retrieve all users|
8
8
 
9
- # **apiUsersGet**
10
- > Array<User> apiUsersGet()
9
+ # **getAllUsers**
10
+ > Array<User> getAllUsers()
11
11
 
12
12
 
13
13
  ### Example
@@ -21,7 +21,7 @@ import {
21
21
  const configuration = new Configuration();
22
22
  const apiInstance = new UsersApi(configuration);
23
23
 
24
- const { status, data } = await apiInstance.apiUsersGet();
24
+ const { status, data } = await apiInstance.getAllUsers();
25
25
  ```
26
26
 
27
27
  ### Parameters