@tennac-booking/sdk 1.0.12 → 1.0.13

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/docs/UsersApi.md CHANGED
@@ -4,15 +4,78 @@ All URIs are relative to *https://api.mon-domaine.com*
4
4
 
5
5
  |Method | HTTP request | Description|
6
6
  |------------- | ------------- | -------------|
7
+ |[**cancelSubscription**](#cancelsubscription) | **DELETE** /api/users/me/subscriptions/{clubId}/{subscriptionId} | Annule un abonnement utilisateur|
7
8
  |[**changePassword**](#changepassword) | **PUT** /api/users/me/password | Modifie le mot de passe de l\'utilisateur connecté|
8
- |[**getAllUsers**](#getallusers) | **GET** /api/users | Récupère la liste des utilisateurs|
9
+ |[**getAllUsers**](#getallusers) | **GET** /api/users | Récupère la liste des utilisateurs avec filtres et pagination|
9
10
  |[**getUserInfo**](#getuserinfo) | **GET** /api/users/me | Récupère les informations de l\'utilisateur connecté|
10
11
  |[**getUserRolesInClubs**](#getuserrolesinclubs) | **GET** /api/users/me/roles | Récupère les rôles de l\'utilisateur dans les clubs|
12
+ |[**getUserSubscriptions**](#getusersubscriptions) | **GET** /api/users/me/subscriptions | Récupère les abonnements de l\'utilisateur connecté|
13
+ |[**initiateSubscriptionSession**](#initiatesubscriptionsession) | **POST** /api/users/me/subscription-session | Initie une session d\'abonnement Stripe|
11
14
  |[**login**](#login) | **POST** /api/users/login | Authentifie un utilisateur|
12
15
  |[**refreshToken**](#refreshtoken) | **POST** /api/users/refresh-token | Rafraîchit le token d\'accès|
13
16
  |[**register**](#register) | **POST** /api/users | Crée un nouvel utilisateur|
17
+ |[**resumeSubscription**](#resumesubscription) | **POST** /api/users/me/subscriptions/{clubId}/{subscriptionId}/resume | Réactive un abonnement utilisateur|
18
+ |[**signInOrSignUpWithGoogle**](#signinorsignupwithgoogle) | **POST** /api/users/googleSignin | Authentifie ou crée un utilisateur via Google OAuth|
19
+ |[**subscribeToClub**](#subscribetoclub) | **POST** /api/users/me/subscribe | Abonne l\'utilisateur connecté à un club|
20
+ |[**updateCustomer**](#updatecustomer) | **PUT** /api/users/me/customer | Met à jour le Customer Stripe de l\'utilisateur|
14
21
  |[**updateUser**](#updateuser) | **PUT** /api/users/me | Met à jour les données de l\'utilisateur connecté|
15
22
 
23
+ # **cancelSubscription**
24
+ > SubscriptionResponse cancelSubscription()
25
+
26
+
27
+ ### Example
28
+
29
+ ```typescript
30
+ import {
31
+ UsersApi,
32
+ Configuration
33
+ } from '@tennac-booking/sdk';
34
+
35
+ const configuration = new Configuration();
36
+ const apiInstance = new UsersApi(configuration);
37
+
38
+ let clubId: string; //ID du club (default to undefined)
39
+ let subscriptionId: string; //ID de l\'abonnement à annuler (default to undefined)
40
+
41
+ const { status, data } = await apiInstance.cancelSubscription(
42
+ clubId,
43
+ subscriptionId
44
+ );
45
+ ```
46
+
47
+ ### Parameters
48
+
49
+ |Name | Type | Description | Notes|
50
+ |------------- | ------------- | ------------- | -------------|
51
+ | **clubId** | [**string**] | ID du club | defaults to undefined|
52
+ | **subscriptionId** | [**string**] | ID de l\'abonnement à annuler | defaults to undefined|
53
+
54
+
55
+ ### Return type
56
+
57
+ **SubscriptionResponse**
58
+
59
+ ### Authorization
60
+
61
+ [bearerAuth](../README.md#bearerAuth)
62
+
63
+ ### HTTP request headers
64
+
65
+ - **Content-Type**: Not defined
66
+ - **Accept**: application/json
67
+
68
+
69
+ ### HTTP response details
70
+ | Status code | Description | Response headers |
71
+ |-------------|-------------|------------------|
72
+ |**200** | Abonnement annulé | - |
73
+ |**400** | Requête invalide | - |
74
+ |**401** | Non autorisé | - |
75
+ |**500** | Erreur serveur interne | - |
76
+
77
+ [[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)
78
+
16
79
  # **changePassword**
17
80
  > ChangePasswordResponse changePassword(changePasswordRequestBody)
18
81
 
@@ -63,6 +126,7 @@ const { status, data } = await apiInstance.changePassword(
63
126
  |**200** | Mot de passe modifié | - |
64
127
  |**400** | Requête invalide | - |
65
128
  |**401** | Non autorisé | - |
129
+ |**404** | Ressource non trouvée | - |
66
130
  |**500** | Erreur serveur interne | - |
67
131
 
68
132
  [[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)
@@ -82,11 +146,51 @@ import {
82
146
  const configuration = new Configuration();
83
147
  const apiInstance = new UsersApi(configuration);
84
148
 
85
- const { status, data } = await apiInstance.getAllUsers();
149
+ let limit: number; //Nombre maximum d\'utilisateurs à retourner (optional) (default to 20)
150
+ let skip: number; //Nombre d\'utilisateurs à ignorer (pagination) (optional) (default to 0)
151
+ let search: string; //Recherche dans firstName, lastName, email (optional) (default to undefined)
152
+ let sport: string; //Filtre par sport (optional) (default to undefined)
153
+ let matchType: string; //Filtre par type de match (optional) (default to undefined)
154
+ let niveau: string; //Filtre par niveau (optional) (default to undefined)
155
+ let rank: string; //Filtre par rang (optional) (default to undefined)
156
+ let isLookingForPartner: 'true' | 'false'; //Filtre par disponibilité pour partenaire (optional) (default to undefined)
157
+ let username: string; //Filtre par nom d\'utilisateur (optional) (default to undefined)
158
+ let email: string; //Filtre par email (optional) (default to undefined)
159
+ let description: string; //Filtre par description (optional) (default to undefined)
160
+ let gender: string; //Filtre par genre (optional) (default to undefined)
161
+
162
+ const { status, data } = await apiInstance.getAllUsers(
163
+ limit,
164
+ skip,
165
+ search,
166
+ sport,
167
+ matchType,
168
+ niveau,
169
+ rank,
170
+ isLookingForPartner,
171
+ username,
172
+ email,
173
+ description,
174
+ gender
175
+ );
86
176
  ```
87
177
 
88
178
  ### Parameters
89
- This endpoint does not have any parameters.
179
+
180
+ |Name | Type | Description | Notes|
181
+ |------------- | ------------- | ------------- | -------------|
182
+ | **limit** | [**number**] | Nombre maximum d\'utilisateurs à retourner | (optional) defaults to 20|
183
+ | **skip** | [**number**] | Nombre d\'utilisateurs à ignorer (pagination) | (optional) defaults to 0|
184
+ | **search** | [**string**] | Recherche dans firstName, lastName, email | (optional) defaults to undefined|
185
+ | **sport** | [**string**] | Filtre par sport | (optional) defaults to undefined|
186
+ | **matchType** | [**string**] | Filtre par type de match | (optional) defaults to undefined|
187
+ | **niveau** | [**string**] | Filtre par niveau | (optional) defaults to undefined|
188
+ | **rank** | [**string**] | Filtre par rang | (optional) defaults to undefined|
189
+ | **isLookingForPartner** | [**&#39;true&#39; | &#39;false&#39;**]**Array<&#39;true&#39; &#124; &#39;false&#39;>** | Filtre par disponibilité pour partenaire | (optional) defaults to undefined|
190
+ | **username** | [**string**] | Filtre par nom d\&#39;utilisateur | (optional) defaults to undefined|
191
+ | **email** | [**string**] | Filtre par email | (optional) defaults to undefined|
192
+ | **description** | [**string**] | Filtre par description | (optional) defaults to undefined|
193
+ | **gender** | [**string**] | Filtre par genre | (optional) defaults to undefined|
90
194
 
91
195
 
92
196
  ### Return type
@@ -153,12 +257,13 @@ This endpoint does not have any parameters.
153
257
  |-------------|-------------|------------------|
154
258
  |**200** | Informations de l\&#39;utilisateur | - |
155
259
  |**401** | Non autorisé | - |
260
+ |**404** | Ressource non trouvée | - |
156
261
  |**500** | Erreur serveur interne | - |
157
262
 
158
263
  [[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)
159
264
 
160
265
  # **getUserRolesInClubs**
161
- > GetUserRolesInClubs200Response getUserRolesInClubs()
266
+ > GetUserRolesResponse getUserRolesInClubs()
162
267
 
163
268
 
164
269
  ### Example
@@ -181,7 +286,7 @@ This endpoint does not have any parameters.
181
286
 
182
287
  ### Return type
183
288
 
184
- **GetUserRolesInClubs200Response**
289
+ **GetUserRolesResponse**
185
290
 
186
291
  ### Authorization
187
292
 
@@ -203,6 +308,105 @@ This endpoint does not have any parameters.
203
308
 
204
309
  [[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)
205
310
 
311
+ # **getUserSubscriptions**
312
+ > GetUserSubscriptionsResponse getUserSubscriptions()
313
+
314
+
315
+ ### Example
316
+
317
+ ```typescript
318
+ import {
319
+ UsersApi,
320
+ Configuration
321
+ } from '@tennac-booking/sdk';
322
+
323
+ const configuration = new Configuration();
324
+ const apiInstance = new UsersApi(configuration);
325
+
326
+ const { status, data } = await apiInstance.getUserSubscriptions();
327
+ ```
328
+
329
+ ### Parameters
330
+ This endpoint does not have any parameters.
331
+
332
+
333
+ ### Return type
334
+
335
+ **GetUserSubscriptionsResponse**
336
+
337
+ ### Authorization
338
+
339
+ [bearerAuth](../README.md#bearerAuth)
340
+
341
+ ### HTTP request headers
342
+
343
+ - **Content-Type**: Not defined
344
+ - **Accept**: application/json
345
+
346
+
347
+ ### HTTP response details
348
+ | Status code | Description | Response headers |
349
+ |-------------|-------------|------------------|
350
+ |**200** | Liste des abonnements | - |
351
+ |**401** | Non autorisé | - |
352
+ |**500** | Erreur serveur interne | - |
353
+
354
+ [[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)
355
+
356
+ # **initiateSubscriptionSession**
357
+ > InitiateSubscriptionSessionResponse initiateSubscriptionSession(initiateSubscriptionSessionRequestBody)
358
+
359
+
360
+ ### Example
361
+
362
+ ```typescript
363
+ import {
364
+ UsersApi,
365
+ Configuration,
366
+ InitiateSubscriptionSessionRequestBody
367
+ } from '@tennac-booking/sdk';
368
+
369
+ const configuration = new Configuration();
370
+ const apiInstance = new UsersApi(configuration);
371
+
372
+ let initiateSubscriptionSessionRequestBody: InitiateSubscriptionSessionRequestBody; //
373
+
374
+ const { status, data } = await apiInstance.initiateSubscriptionSession(
375
+ initiateSubscriptionSessionRequestBody
376
+ );
377
+ ```
378
+
379
+ ### Parameters
380
+
381
+ |Name | Type | Description | Notes|
382
+ |------------- | ------------- | ------------- | -------------|
383
+ | **initiateSubscriptionSessionRequestBody** | **InitiateSubscriptionSessionRequestBody**| | |
384
+
385
+
386
+ ### Return type
387
+
388
+ **InitiateSubscriptionSessionResponse**
389
+
390
+ ### Authorization
391
+
392
+ [bearerAuth](../README.md#bearerAuth)
393
+
394
+ ### HTTP request headers
395
+
396
+ - **Content-Type**: application/json
397
+ - **Accept**: application/json
398
+
399
+
400
+ ### HTTP response details
401
+ | Status code | Description | Response headers |
402
+ |-------------|-------------|------------------|
403
+ |**200** | Session d\&#39;abonnement créée | - |
404
+ |**400** | Requête invalide | - |
405
+ |**401** | Non autorisé | - |
406
+ |**500** | Erreur serveur interne | - |
407
+
408
+ [[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)
409
+
206
410
  # **login**
207
411
  > LoginResponse login(loginRequestBody)
208
412
 
@@ -365,6 +569,225 @@ const { status, data } = await apiInstance.register(
365
569
 
366
570
  [[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)
367
571
 
572
+ # **resumeSubscription**
573
+ > SubscriptionResponse resumeSubscription()
574
+
575
+
576
+ ### Example
577
+
578
+ ```typescript
579
+ import {
580
+ UsersApi,
581
+ Configuration
582
+ } from '@tennac-booking/sdk';
583
+
584
+ const configuration = new Configuration();
585
+ const apiInstance = new UsersApi(configuration);
586
+
587
+ let clubId: string; //ID du club (default to undefined)
588
+ let subscriptionId: string; //ID de l\'abonnement à réactiver (default to undefined)
589
+
590
+ const { status, data } = await apiInstance.resumeSubscription(
591
+ clubId,
592
+ subscriptionId
593
+ );
594
+ ```
595
+
596
+ ### Parameters
597
+
598
+ |Name | Type | Description | Notes|
599
+ |------------- | ------------- | ------------- | -------------|
600
+ | **clubId** | [**string**] | ID du club | defaults to undefined|
601
+ | **subscriptionId** | [**string**] | ID de l\&#39;abonnement à réactiver | defaults to undefined|
602
+
603
+
604
+ ### Return type
605
+
606
+ **SubscriptionResponse**
607
+
608
+ ### Authorization
609
+
610
+ [bearerAuth](../README.md#bearerAuth)
611
+
612
+ ### HTTP request headers
613
+
614
+ - **Content-Type**: Not defined
615
+ - **Accept**: application/json
616
+
617
+
618
+ ### HTTP response details
619
+ | Status code | Description | Response headers |
620
+ |-------------|-------------|------------------|
621
+ |**200** | Abonnement réactivé | - |
622
+ |**400** | Requête invalide | - |
623
+ |**401** | Non autorisé | - |
624
+ |**500** | Erreur serveur interne | - |
625
+
626
+ [[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)
627
+
628
+ # **signInOrSignUpWithGoogle**
629
+ > GoogleSignInResponse signInOrSignUpWithGoogle(googleSignInRequestBody)
630
+
631
+
632
+ ### Example
633
+
634
+ ```typescript
635
+ import {
636
+ UsersApi,
637
+ Configuration,
638
+ GoogleSignInRequestBody
639
+ } from '@tennac-booking/sdk';
640
+
641
+ const configuration = new Configuration();
642
+ const apiInstance = new UsersApi(configuration);
643
+
644
+ let googleSignInRequestBody: GoogleSignInRequestBody; //
645
+
646
+ const { status, data } = await apiInstance.signInOrSignUpWithGoogle(
647
+ googleSignInRequestBody
648
+ );
649
+ ```
650
+
651
+ ### Parameters
652
+
653
+ |Name | Type | Description | Notes|
654
+ |------------- | ------------- | ------------- | -------------|
655
+ | **googleSignInRequestBody** | **GoogleSignInRequestBody**| | |
656
+
657
+
658
+ ### Return type
659
+
660
+ **GoogleSignInResponse**
661
+
662
+ ### Authorization
663
+
664
+ [bearerAuth](../README.md#bearerAuth)
665
+
666
+ ### HTTP request headers
667
+
668
+ - **Content-Type**: application/json
669
+ - **Accept**: application/json
670
+
671
+
672
+ ### HTTP response details
673
+ | Status code | Description | Response headers |
674
+ |-------------|-------------|------------------|
675
+ |**200** | Authentification Google réussie | - |
676
+ |**400** | Requête invalide | - |
677
+ |**500** | Erreur serveur interne | - |
678
+
679
+ [[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)
680
+
681
+ # **subscribeToClub**
682
+ > SubscriptionResponse subscribeToClub(subscribeToClubRequestBody)
683
+
684
+
685
+ ### Example
686
+
687
+ ```typescript
688
+ import {
689
+ UsersApi,
690
+ Configuration,
691
+ SubscribeToClubRequestBody
692
+ } from '@tennac-booking/sdk';
693
+
694
+ const configuration = new Configuration();
695
+ const apiInstance = new UsersApi(configuration);
696
+
697
+ let subscribeToClubRequestBody: SubscribeToClubRequestBody; //
698
+
699
+ const { status, data } = await apiInstance.subscribeToClub(
700
+ subscribeToClubRequestBody
701
+ );
702
+ ```
703
+
704
+ ### Parameters
705
+
706
+ |Name | Type | Description | Notes|
707
+ |------------- | ------------- | ------------- | -------------|
708
+ | **subscribeToClubRequestBody** | **SubscribeToClubRequestBody**| | |
709
+
710
+
711
+ ### Return type
712
+
713
+ **SubscriptionResponse**
714
+
715
+ ### Authorization
716
+
717
+ [bearerAuth](../README.md#bearerAuth)
718
+
719
+ ### HTTP request headers
720
+
721
+ - **Content-Type**: application/json
722
+ - **Accept**: application/json
723
+
724
+
725
+ ### HTTP response details
726
+ | Status code | Description | Response headers |
727
+ |-------------|-------------|------------------|
728
+ |**201** | Abonnement créé | - |
729
+ |**400** | Requête invalide | - |
730
+ |**401** | Non autorisé | - |
731
+ |**404** | Ressource non trouvée | - |
732
+ |**500** | Erreur serveur interne | - |
733
+
734
+ [[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)
735
+
736
+ # **updateCustomer**
737
+ > UpdateCustomerResponse updateCustomer(updateCustomerRequestBody)
738
+
739
+
740
+ ### Example
741
+
742
+ ```typescript
743
+ import {
744
+ UsersApi,
745
+ Configuration,
746
+ UpdateCustomerRequestBody
747
+ } from '@tennac-booking/sdk';
748
+
749
+ const configuration = new Configuration();
750
+ const apiInstance = new UsersApi(configuration);
751
+
752
+ let updateCustomerRequestBody: UpdateCustomerRequestBody; //
753
+
754
+ const { status, data } = await apiInstance.updateCustomer(
755
+ updateCustomerRequestBody
756
+ );
757
+ ```
758
+
759
+ ### Parameters
760
+
761
+ |Name | Type | Description | Notes|
762
+ |------------- | ------------- | ------------- | -------------|
763
+ | **updateCustomerRequestBody** | **UpdateCustomerRequestBody**| | |
764
+
765
+
766
+ ### Return type
767
+
768
+ **UpdateCustomerResponse**
769
+
770
+ ### Authorization
771
+
772
+ [bearerAuth](../README.md#bearerAuth)
773
+
774
+ ### HTTP request headers
775
+
776
+ - **Content-Type**: application/json
777
+ - **Accept**: application/json
778
+
779
+
780
+ ### HTTP response details
781
+ | Status code | Description | Response headers |
782
+ |-------------|-------------|------------------|
783
+ |**200** | Customer mis à jour | - |
784
+ |**400** | Requête invalide | - |
785
+ |**401** | Non autorisé | - |
786
+ |**404** | Ressource non trouvée | - |
787
+ |**500** | Erreur serveur interne | - |
788
+
789
+ [[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)
790
+
368
791
  # **updateUser**
369
792
  > UserResponse updateUser(updateUserRequestBody)
370
793
 
package/package.json CHANGED
@@ -1 +1 @@
1
- { "name": "@tennac-booking/sdk", "version": "1.0.12", "description": "OpenAPI client for @tennac-booking/sdk", "author": "OpenAPI-Generator Contributors", "publishConfig": { "access": "public" }, "keywords": [ "axios", "typescript", "openapi-client", "openapi-generator", "@tennac-booking/sdk" ], "license": "Unlicense", "main": "./dist/index.js", "typings": "./dist/index.d.ts", "module": "./dist/esm/index.js", "sideEffects": false, "scripts": { "build": "tsc && tsc -p tsconfig.esm.json", "prepare": "npm run build" }, "dependencies": { "axios": "^1.6.1" }, "devDependencies": { "@types/node": "12.11.5 - 12.20.42", "typescript": "^4.0 || ^5.0" }}
1
+ { "name": "@tennac-booking/sdk", "version": "1.0.13", "description": "OpenAPI client for @tennac-booking/sdk", "author": "OpenAPI-Generator Contributors", "publishConfig": { "access": "public" }, "keywords": [ "axios", "typescript", "openapi-client", "openapi-generator", "@tennac-booking/sdk" ], "license": "Unlicense", "main": "./dist/index.js", "typings": "./dist/index.d.ts", "module": "./dist/esm/index.js", "sideEffects": false, "scripts": { "build": "tsc && tsc -p tsconfig.esm.json", "prepare": "npm run build" }, "dependencies": { "axios": "^1.6.1" }, "devDependencies": { "@types/node": "12.11.5 - 12.20.42", "typescript": "^4.0 || ^5.0" }}