@tennac-booking/sdk 1.0.96 → 1.0.98

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 (48) hide show
  1. package/.openapi-generator/FILES +14 -0
  2. package/README.md +29 -2
  3. package/api.ts +6211 -4937
  4. package/base.ts +1 -1
  5. package/common.ts +1 -1
  6. package/configuration.ts +1 -1
  7. package/dist/api.d.ts +875 -15
  8. package/dist/api.js +694 -4
  9. package/dist/base.d.ts +1 -1
  10. package/dist/base.js +1 -1
  11. package/dist/common.d.ts +1 -1
  12. package/dist/common.js +1 -1
  13. package/dist/configuration.d.ts +1 -1
  14. package/dist/configuration.js +1 -1
  15. package/dist/esm/api.d.ts +875 -15
  16. package/dist/esm/api.js +682 -1
  17. package/dist/esm/base.d.ts +1 -1
  18. package/dist/esm/base.js +1 -1
  19. package/dist/esm/common.d.ts +1 -1
  20. package/dist/esm/common.js +1 -1
  21. package/dist/esm/configuration.d.ts +1 -1
  22. package/dist/esm/configuration.js +1 -1
  23. package/dist/esm/index.d.ts +1 -1
  24. package/dist/esm/index.js +1 -1
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.js +1 -1
  27. package/docs/ActiveSubscriptionResponse.md +22 -0
  28. package/docs/BookingPriceBody.md +2 -0
  29. package/docs/BookingPriceResponse.md +2 -0
  30. package/docs/ClientAccountOnboardingRequest.md +29 -0
  31. package/docs/ClientAccountOnboardingResponse.md +34 -0
  32. package/docs/ClientAccountResponse.md +44 -0
  33. package/docs/ClientAccountsApi.md +408 -0
  34. package/docs/ClientApi.md +109 -0
  35. package/docs/ClientMeResponse.md +28 -0
  36. package/docs/ClientOnboardingRequestBody.md +33 -0
  37. package/docs/ClientOnboardingResponse.md +27 -0
  38. package/docs/ClientRegisterRequestBody.md +26 -0
  39. package/docs/ClientRegisterResponse.md +22 -0
  40. package/docs/ClientSubscriptionResponse.md +34 -0
  41. package/docs/CreateBookingRequest.md +0 -2
  42. package/docs/GetSubscriptionsHistory200Response.md +22 -0
  43. package/docs/IUserAttributes.md +2 -0
  44. package/docs/ManagedClubsResponse.md +23 -0
  45. package/docs/StaffUserProfileResponse.md +2 -0
  46. package/docs/UserProfileResponse.md +2 -0
  47. package/index.ts +1 -1
  48. package/package.json +1 -1
package/dist/esm/api.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * openapi.json
5
5
  * Pandook API Documentation
6
6
  *
7
- * The version of the OpenAPI document: 1.0.96
7
+ * The version of the OpenAPI document: 1.0.98
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -53,6 +53,14 @@ export const CaptureResultStatusEnum = {
53
53
  Captured: 'captured',
54
54
  Failed: 'failed'
55
55
  };
56
+ export const ClientAccountOnboardingRequestBusinessTypeEnum = {
57
+ Individual: 'individual',
58
+ Company: 'company'
59
+ };
60
+ export const ClientAccountOnboardingRequestSubscriptionTypeEnum = {
61
+ Basic: 'basic',
62
+ PlatformWithConnect: 'platform_with_connect'
63
+ };
56
64
  export const ClubRoleResponseRoleEnum = {
57
65
  Admin: 'admin',
58
66
  Manager: 'manager',
@@ -1384,6 +1392,679 @@ export class BookingsUserApi extends BaseAPI {
1384
1392
  return BookingsUserApiFp(this.configuration).createBooking(requestParameters.createBookingRequest, options).then((request) => request(this.axios, this.basePath));
1385
1393
  }
1386
1394
  }
1395
+ /**
1396
+ * ClientApi - axios parameter creator
1397
+ * @export
1398
+ */
1399
+ export const ClientApiAxiosParamCreator = function (configuration) {
1400
+ return {
1401
+ /**
1402
+ * Récupère la liste des clubs gérés par l\'utilisateur authentifié
1403
+ * @param {*} [options] Override http request option.
1404
+ * @throws {RequiredError}
1405
+ */
1406
+ getManagedClubs: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
1407
+ const localVarPath = `/clients/managed-clubs`;
1408
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1409
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1410
+ let baseOptions;
1411
+ if (configuration) {
1412
+ baseOptions = configuration.baseOptions;
1413
+ }
1414
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1415
+ const localVarHeaderParameter = {};
1416
+ const localVarQueryParameter = {};
1417
+ // authentication bearerAuth required
1418
+ // http bearer authentication required
1419
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1420
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1421
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1422
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1423
+ return {
1424
+ url: toPathString(localVarUrlObj),
1425
+ options: localVarRequestOptions,
1426
+ };
1427
+ }),
1428
+ /**
1429
+ * Enregistre un nouveau club pour la plateforme - Crée un compte Stripe Connect Express - Crée le club dans la base de données - Assigne l\'utilisateur comme manager du club - Crée les paramètres par défaut du club - Envoie le lien d\'onboarding Stripe par email
1430
+ * @param {ClientOnboardingRequestBody} clientOnboardingRequestBody Les données du club à créer
1431
+ * @param {*} [options] Override http request option.
1432
+ * @throws {RequiredError}
1433
+ */
1434
+ onboardClub: (clientOnboardingRequestBody_1, ...args_1) => __awaiter(this, [clientOnboardingRequestBody_1, ...args_1], void 0, function* (clientOnboardingRequestBody, options = {}) {
1435
+ // verify required parameter 'clientOnboardingRequestBody' is not null or undefined
1436
+ assertParamExists('onboardClub', 'clientOnboardingRequestBody', clientOnboardingRequestBody);
1437
+ const localVarPath = `/clients/onboarding`;
1438
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1439
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1440
+ let baseOptions;
1441
+ if (configuration) {
1442
+ baseOptions = configuration.baseOptions;
1443
+ }
1444
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1445
+ const localVarHeaderParameter = {};
1446
+ const localVarQueryParameter = {};
1447
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1448
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1449
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1450
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1451
+ localVarRequestOptions.data = serializeDataIfNeeded(clientOnboardingRequestBody, localVarRequestOptions, configuration);
1452
+ return {
1453
+ url: toPathString(localVarUrlObj),
1454
+ options: localVarRequestOptions,
1455
+ };
1456
+ }),
1457
+ };
1458
+ };
1459
+ /**
1460
+ * ClientApi - functional programming interface
1461
+ * @export
1462
+ */
1463
+ export const ClientApiFp = function (configuration) {
1464
+ const localVarAxiosParamCreator = ClientApiAxiosParamCreator(configuration);
1465
+ return {
1466
+ /**
1467
+ * Récupère la liste des clubs gérés par l\'utilisateur authentifié
1468
+ * @param {*} [options] Override http request option.
1469
+ * @throws {RequiredError}
1470
+ */
1471
+ getManagedClubs(options) {
1472
+ return __awaiter(this, void 0, void 0, function* () {
1473
+ var _a, _b, _c;
1474
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getManagedClubs(options);
1475
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1476
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClientApi.getManagedClubs']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1477
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1478
+ });
1479
+ },
1480
+ /**
1481
+ * Enregistre un nouveau club pour la plateforme - Crée un compte Stripe Connect Express - Crée le club dans la base de données - Assigne l\'utilisateur comme manager du club - Crée les paramètres par défaut du club - Envoie le lien d\'onboarding Stripe par email
1482
+ * @param {ClientOnboardingRequestBody} clientOnboardingRequestBody Les données du club à créer
1483
+ * @param {*} [options] Override http request option.
1484
+ * @throws {RequiredError}
1485
+ */
1486
+ onboardClub(clientOnboardingRequestBody, options) {
1487
+ return __awaiter(this, void 0, void 0, function* () {
1488
+ var _a, _b, _c;
1489
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.onboardClub(clientOnboardingRequestBody, options);
1490
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1491
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClientApi.onboardClub']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1492
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1493
+ });
1494
+ },
1495
+ };
1496
+ };
1497
+ /**
1498
+ * ClientApi - factory interface
1499
+ * @export
1500
+ */
1501
+ export const ClientApiFactory = function (configuration, basePath, axios) {
1502
+ const localVarFp = ClientApiFp(configuration);
1503
+ return {
1504
+ /**
1505
+ * Récupère la liste des clubs gérés par l\'utilisateur authentifié
1506
+ * @param {*} [options] Override http request option.
1507
+ * @throws {RequiredError}
1508
+ */
1509
+ getManagedClubs(options) {
1510
+ return localVarFp.getManagedClubs(options).then((request) => request(axios, basePath));
1511
+ },
1512
+ /**
1513
+ * Enregistre un nouveau club pour la plateforme - Crée un compte Stripe Connect Express - Crée le club dans la base de données - Assigne l\'utilisateur comme manager du club - Crée les paramètres par défaut du club - Envoie le lien d\'onboarding Stripe par email
1514
+ * @param {ClientApiOnboardClubRequest} requestParameters Request parameters.
1515
+ * @param {*} [options] Override http request option.
1516
+ * @throws {RequiredError}
1517
+ */
1518
+ onboardClub(requestParameters, options) {
1519
+ return localVarFp.onboardClub(requestParameters.clientOnboardingRequestBody, options).then((request) => request(axios, basePath));
1520
+ },
1521
+ };
1522
+ };
1523
+ /**
1524
+ * ClientApi - object-oriented interface
1525
+ * @export
1526
+ * @class ClientApi
1527
+ * @extends {BaseAPI}
1528
+ */
1529
+ export class ClientApi extends BaseAPI {
1530
+ /**
1531
+ * Récupère la liste des clubs gérés par l\'utilisateur authentifié
1532
+ * @param {*} [options] Override http request option.
1533
+ * @throws {RequiredError}
1534
+ * @memberof ClientApi
1535
+ */
1536
+ getManagedClubs(options) {
1537
+ return ClientApiFp(this.configuration).getManagedClubs(options).then((request) => request(this.axios, this.basePath));
1538
+ }
1539
+ /**
1540
+ * Enregistre un nouveau club pour la plateforme - Crée un compte Stripe Connect Express - Crée le club dans la base de données - Assigne l\'utilisateur comme manager du club - Crée les paramètres par défaut du club - Envoie le lien d\'onboarding Stripe par email
1541
+ * @param {ClientApiOnboardClubRequest} requestParameters Request parameters.
1542
+ * @param {*} [options] Override http request option.
1543
+ * @throws {RequiredError}
1544
+ * @memberof ClientApi
1545
+ */
1546
+ onboardClub(requestParameters, options) {
1547
+ return ClientApiFp(this.configuration).onboardClub(requestParameters.clientOnboardingRequestBody, options).then((request) => request(this.axios, this.basePath));
1548
+ }
1549
+ }
1550
+ /**
1551
+ * ClientAccountsApi - axios parameter creator
1552
+ * @export
1553
+ */
1554
+ export const ClientAccountsApiAxiosParamCreator = function (configuration) {
1555
+ return {
1556
+ /**
1557
+ * Informations de l\'utilisateur client authentifié (token clientAuth)
1558
+ * @param {*} [options] Override http request option.
1559
+ * @throws {RequiredError}
1560
+ */
1561
+ clientAuthMe: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
1562
+ const localVarPath = `/client-accounts/client-auth/me`;
1563
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1564
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1565
+ let baseOptions;
1566
+ if (configuration) {
1567
+ baseOptions = configuration.baseOptions;
1568
+ }
1569
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1570
+ const localVarHeaderParameter = {};
1571
+ const localVarQueryParameter = {};
1572
+ // authentication clientAuth required
1573
+ // http bearer authentication required
1574
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1575
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1576
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1577
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1578
+ return {
1579
+ url: toPathString(localVarUrlObj),
1580
+ options: localVarRequestOptions,
1581
+ };
1582
+ }),
1583
+ /**
1584
+ * Récupère le compte client par son ID
1585
+ * @param {string} accountId L\'ID du compte client
1586
+ * @param {*} [options] Override http request option.
1587
+ * @throws {RequiredError}
1588
+ */
1589
+ getClientAccountById: (accountId_1, ...args_1) => __awaiter(this, [accountId_1, ...args_1], void 0, function* (accountId, options = {}) {
1590
+ // verify required parameter 'accountId' is not null or undefined
1591
+ assertParamExists('getClientAccountById', 'accountId', accountId);
1592
+ const localVarPath = `/client-accounts/{accountId}`
1593
+ .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
1594
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1595
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1596
+ let baseOptions;
1597
+ if (configuration) {
1598
+ baseOptions = configuration.baseOptions;
1599
+ }
1600
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1601
+ const localVarHeaderParameter = {};
1602
+ const localVarQueryParameter = {};
1603
+ // authentication bearerAuth required
1604
+ // http bearer authentication required
1605
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1606
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1607
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1608
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1609
+ return {
1610
+ url: toPathString(localVarUrlObj),
1611
+ options: localVarRequestOptions,
1612
+ };
1613
+ }),
1614
+ /**
1615
+ * Récupère l\'abonnement actif du compte client authentifié
1616
+ * @param {*} [options] Override http request option.
1617
+ * @throws {RequiredError}
1618
+ */
1619
+ getMyActiveSubscription: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
1620
+ const localVarPath = `/client-accounts/me/subscription`;
1621
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1622
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1623
+ let baseOptions;
1624
+ if (configuration) {
1625
+ baseOptions = configuration.baseOptions;
1626
+ }
1627
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1628
+ const localVarHeaderParameter = {};
1629
+ const localVarQueryParameter = {};
1630
+ // authentication bearerAuth required
1631
+ // http bearer authentication required
1632
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1633
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1634
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1635
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1636
+ return {
1637
+ url: toPathString(localVarUrlObj),
1638
+ options: localVarRequestOptions,
1639
+ };
1640
+ }),
1641
+ /**
1642
+ * Récupère le compte client de l\'utilisateur authentifié
1643
+ * @param {*} [options] Override http request option.
1644
+ * @throws {RequiredError}
1645
+ */
1646
+ getMyClientAccount: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
1647
+ const localVarPath = `/client-accounts/me`;
1648
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1649
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1650
+ let baseOptions;
1651
+ if (configuration) {
1652
+ baseOptions = configuration.baseOptions;
1653
+ }
1654
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1655
+ const localVarHeaderParameter = {};
1656
+ const localVarQueryParameter = {};
1657
+ // authentication bearerAuth required
1658
+ // http bearer authentication required
1659
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1660
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1661
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1662
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1663
+ return {
1664
+ url: toPathString(localVarUrlObj),
1665
+ options: localVarRequestOptions,
1666
+ };
1667
+ }),
1668
+ /**
1669
+ * Récupère l\'historique des abonnements du compte client authentifié
1670
+ * @param {*} [options] Override http request option.
1671
+ * @throws {RequiredError}
1672
+ */
1673
+ getSubscriptionsHistory: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
1674
+ const localVarPath = `/client-accounts/me/subscriptions-history`;
1675
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1676
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1677
+ let baseOptions;
1678
+ if (configuration) {
1679
+ baseOptions = configuration.baseOptions;
1680
+ }
1681
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1682
+ const localVarHeaderParameter = {};
1683
+ const localVarQueryParameter = {};
1684
+ // authentication bearerAuth required
1685
+ // http bearer authentication required
1686
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1687
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1688
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1689
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1690
+ return {
1691
+ url: toPathString(localVarUrlObj),
1692
+ options: localVarRequestOptions,
1693
+ };
1694
+ }),
1695
+ /**
1696
+ * Liste les prix Stripe disponibles pour les abonnements client
1697
+ * @param {*} [options] Override http request option.
1698
+ * @throws {RequiredError}
1699
+ */
1700
+ listAvailablePrices: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
1701
+ const localVarPath = `/client-accounts/available-prices`;
1702
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1703
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1704
+ let baseOptions;
1705
+ if (configuration) {
1706
+ baseOptions = configuration.baseOptions;
1707
+ }
1708
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1709
+ const localVarHeaderParameter = {};
1710
+ const localVarQueryParameter = {};
1711
+ // authentication bearerAuth required
1712
+ // http bearer authentication required
1713
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1714
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1715
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1716
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1717
+ return {
1718
+ url: toPathString(localVarUrlObj),
1719
+ options: localVarRequestOptions,
1720
+ };
1721
+ }),
1722
+ /**
1723
+ * Crée un nouveau compte client avec onboarding Stripe
1724
+ * @param {ClientAccountOnboardingRequest} clientAccountOnboardingRequest Les données du compte à créer
1725
+ * @param {*} [options] Override http request option.
1726
+ * @throws {RequiredError}
1727
+ */
1728
+ onboardClientAccount: (clientAccountOnboardingRequest_1, ...args_1) => __awaiter(this, [clientAccountOnboardingRequest_1, ...args_1], void 0, function* (clientAccountOnboardingRequest, options = {}) {
1729
+ // verify required parameter 'clientAccountOnboardingRequest' is not null or undefined
1730
+ assertParamExists('onboardClientAccount', 'clientAccountOnboardingRequest', clientAccountOnboardingRequest);
1731
+ const localVarPath = `/client-accounts/onboarding`;
1732
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1733
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1734
+ let baseOptions;
1735
+ if (configuration) {
1736
+ baseOptions = configuration.baseOptions;
1737
+ }
1738
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1739
+ const localVarHeaderParameter = {};
1740
+ const localVarQueryParameter = {};
1741
+ // authentication clientAuth required
1742
+ // http bearer authentication required
1743
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1744
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1745
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1746
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1747
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1748
+ localVarRequestOptions.data = serializeDataIfNeeded(clientAccountOnboardingRequest, localVarRequestOptions, configuration);
1749
+ return {
1750
+ url: toPathString(localVarUrlObj),
1751
+ options: localVarRequestOptions,
1752
+ };
1753
+ }),
1754
+ /**
1755
+ * Route d\'inscription d\'un utilisateur client (publique)
1756
+ * @param {ClientRegisterRequestBody} clientRegisterRequestBody
1757
+ * @param {*} [options] Override http request option.
1758
+ * @throws {RequiredError}
1759
+ */
1760
+ registerClientUser: (clientRegisterRequestBody_1, ...args_1) => __awaiter(this, [clientRegisterRequestBody_1, ...args_1], void 0, function* (clientRegisterRequestBody, options = {}) {
1761
+ // verify required parameter 'clientRegisterRequestBody' is not null or undefined
1762
+ assertParamExists('registerClientUser', 'clientRegisterRequestBody', clientRegisterRequestBody);
1763
+ const localVarPath = `/client-accounts/register-client-user`;
1764
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1765
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1766
+ let baseOptions;
1767
+ if (configuration) {
1768
+ baseOptions = configuration.baseOptions;
1769
+ }
1770
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1771
+ const localVarHeaderParameter = {};
1772
+ const localVarQueryParameter = {};
1773
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1774
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1775
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1776
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1777
+ localVarRequestOptions.data = serializeDataIfNeeded(clientRegisterRequestBody, localVarRequestOptions, configuration);
1778
+ return {
1779
+ url: toPathString(localVarUrlObj),
1780
+ options: localVarRequestOptions,
1781
+ };
1782
+ }),
1783
+ };
1784
+ };
1785
+ /**
1786
+ * ClientAccountsApi - functional programming interface
1787
+ * @export
1788
+ */
1789
+ export const ClientAccountsApiFp = function (configuration) {
1790
+ const localVarAxiosParamCreator = ClientAccountsApiAxiosParamCreator(configuration);
1791
+ return {
1792
+ /**
1793
+ * Informations de l\'utilisateur client authentifié (token clientAuth)
1794
+ * @param {*} [options] Override http request option.
1795
+ * @throws {RequiredError}
1796
+ */
1797
+ clientAuthMe(options) {
1798
+ return __awaiter(this, void 0, void 0, function* () {
1799
+ var _a, _b, _c;
1800
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.clientAuthMe(options);
1801
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1802
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClientAccountsApi.clientAuthMe']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1803
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1804
+ });
1805
+ },
1806
+ /**
1807
+ * Récupère le compte client par son ID
1808
+ * @param {string} accountId L\'ID du compte client
1809
+ * @param {*} [options] Override http request option.
1810
+ * @throws {RequiredError}
1811
+ */
1812
+ getClientAccountById(accountId, options) {
1813
+ return __awaiter(this, void 0, void 0, function* () {
1814
+ var _a, _b, _c;
1815
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getClientAccountById(accountId, options);
1816
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1817
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClientAccountsApi.getClientAccountById']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1818
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1819
+ });
1820
+ },
1821
+ /**
1822
+ * Récupère l\'abonnement actif du compte client authentifié
1823
+ * @param {*} [options] Override http request option.
1824
+ * @throws {RequiredError}
1825
+ */
1826
+ getMyActiveSubscription(options) {
1827
+ return __awaiter(this, void 0, void 0, function* () {
1828
+ var _a, _b, _c;
1829
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getMyActiveSubscription(options);
1830
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1831
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClientAccountsApi.getMyActiveSubscription']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1832
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1833
+ });
1834
+ },
1835
+ /**
1836
+ * Récupère le compte client de l\'utilisateur authentifié
1837
+ * @param {*} [options] Override http request option.
1838
+ * @throws {RequiredError}
1839
+ */
1840
+ getMyClientAccount(options) {
1841
+ return __awaiter(this, void 0, void 0, function* () {
1842
+ var _a, _b, _c;
1843
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getMyClientAccount(options);
1844
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1845
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClientAccountsApi.getMyClientAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1846
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1847
+ });
1848
+ },
1849
+ /**
1850
+ * Récupère l\'historique des abonnements du compte client authentifié
1851
+ * @param {*} [options] Override http request option.
1852
+ * @throws {RequiredError}
1853
+ */
1854
+ getSubscriptionsHistory(options) {
1855
+ return __awaiter(this, void 0, void 0, function* () {
1856
+ var _a, _b, _c;
1857
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getSubscriptionsHistory(options);
1858
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1859
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClientAccountsApi.getSubscriptionsHistory']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1860
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1861
+ });
1862
+ },
1863
+ /**
1864
+ * Liste les prix Stripe disponibles pour les abonnements client
1865
+ * @param {*} [options] Override http request option.
1866
+ * @throws {RequiredError}
1867
+ */
1868
+ listAvailablePrices(options) {
1869
+ return __awaiter(this, void 0, void 0, function* () {
1870
+ var _a, _b, _c;
1871
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listAvailablePrices(options);
1872
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1873
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClientAccountsApi.listAvailablePrices']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1874
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1875
+ });
1876
+ },
1877
+ /**
1878
+ * Crée un nouveau compte client avec onboarding Stripe
1879
+ * @param {ClientAccountOnboardingRequest} clientAccountOnboardingRequest Les données du compte à créer
1880
+ * @param {*} [options] Override http request option.
1881
+ * @throws {RequiredError}
1882
+ */
1883
+ onboardClientAccount(clientAccountOnboardingRequest, options) {
1884
+ return __awaiter(this, void 0, void 0, function* () {
1885
+ var _a, _b, _c;
1886
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.onboardClientAccount(clientAccountOnboardingRequest, options);
1887
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1888
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClientAccountsApi.onboardClientAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1889
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1890
+ });
1891
+ },
1892
+ /**
1893
+ * Route d\'inscription d\'un utilisateur client (publique)
1894
+ * @param {ClientRegisterRequestBody} clientRegisterRequestBody
1895
+ * @param {*} [options] Override http request option.
1896
+ * @throws {RequiredError}
1897
+ */
1898
+ registerClientUser(clientRegisterRequestBody, options) {
1899
+ return __awaiter(this, void 0, void 0, function* () {
1900
+ var _a, _b, _c;
1901
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.registerClientUser(clientRegisterRequestBody, options);
1902
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1903
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClientAccountsApi.registerClientUser']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1904
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1905
+ });
1906
+ },
1907
+ };
1908
+ };
1909
+ /**
1910
+ * ClientAccountsApi - factory interface
1911
+ * @export
1912
+ */
1913
+ export const ClientAccountsApiFactory = function (configuration, basePath, axios) {
1914
+ const localVarFp = ClientAccountsApiFp(configuration);
1915
+ return {
1916
+ /**
1917
+ * Informations de l\'utilisateur client authentifié (token clientAuth)
1918
+ * @param {*} [options] Override http request option.
1919
+ * @throws {RequiredError}
1920
+ */
1921
+ clientAuthMe(options) {
1922
+ return localVarFp.clientAuthMe(options).then((request) => request(axios, basePath));
1923
+ },
1924
+ /**
1925
+ * Récupère le compte client par son ID
1926
+ * @param {ClientAccountsApiGetClientAccountByIdRequest} requestParameters Request parameters.
1927
+ * @param {*} [options] Override http request option.
1928
+ * @throws {RequiredError}
1929
+ */
1930
+ getClientAccountById(requestParameters, options) {
1931
+ return localVarFp.getClientAccountById(requestParameters.accountId, options).then((request) => request(axios, basePath));
1932
+ },
1933
+ /**
1934
+ * Récupère l\'abonnement actif du compte client authentifié
1935
+ * @param {*} [options] Override http request option.
1936
+ * @throws {RequiredError}
1937
+ */
1938
+ getMyActiveSubscription(options) {
1939
+ return localVarFp.getMyActiveSubscription(options).then((request) => request(axios, basePath));
1940
+ },
1941
+ /**
1942
+ * Récupère le compte client de l\'utilisateur authentifié
1943
+ * @param {*} [options] Override http request option.
1944
+ * @throws {RequiredError}
1945
+ */
1946
+ getMyClientAccount(options) {
1947
+ return localVarFp.getMyClientAccount(options).then((request) => request(axios, basePath));
1948
+ },
1949
+ /**
1950
+ * Récupère l\'historique des abonnements du compte client authentifié
1951
+ * @param {*} [options] Override http request option.
1952
+ * @throws {RequiredError}
1953
+ */
1954
+ getSubscriptionsHistory(options) {
1955
+ return localVarFp.getSubscriptionsHistory(options).then((request) => request(axios, basePath));
1956
+ },
1957
+ /**
1958
+ * Liste les prix Stripe disponibles pour les abonnements client
1959
+ * @param {*} [options] Override http request option.
1960
+ * @throws {RequiredError}
1961
+ */
1962
+ listAvailablePrices(options) {
1963
+ return localVarFp.listAvailablePrices(options).then((request) => request(axios, basePath));
1964
+ },
1965
+ /**
1966
+ * Crée un nouveau compte client avec onboarding Stripe
1967
+ * @param {ClientAccountsApiOnboardClientAccountRequest} requestParameters Request parameters.
1968
+ * @param {*} [options] Override http request option.
1969
+ * @throws {RequiredError}
1970
+ */
1971
+ onboardClientAccount(requestParameters, options) {
1972
+ return localVarFp.onboardClientAccount(requestParameters.clientAccountOnboardingRequest, options).then((request) => request(axios, basePath));
1973
+ },
1974
+ /**
1975
+ * Route d\'inscription d\'un utilisateur client (publique)
1976
+ * @param {ClientAccountsApiRegisterClientUserRequest} requestParameters Request parameters.
1977
+ * @param {*} [options] Override http request option.
1978
+ * @throws {RequiredError}
1979
+ */
1980
+ registerClientUser(requestParameters, options) {
1981
+ return localVarFp.registerClientUser(requestParameters.clientRegisterRequestBody, options).then((request) => request(axios, basePath));
1982
+ },
1983
+ };
1984
+ };
1985
+ /**
1986
+ * ClientAccountsApi - object-oriented interface
1987
+ * @export
1988
+ * @class ClientAccountsApi
1989
+ * @extends {BaseAPI}
1990
+ */
1991
+ export class ClientAccountsApi extends BaseAPI {
1992
+ /**
1993
+ * Informations de l\'utilisateur client authentifié (token clientAuth)
1994
+ * @param {*} [options] Override http request option.
1995
+ * @throws {RequiredError}
1996
+ * @memberof ClientAccountsApi
1997
+ */
1998
+ clientAuthMe(options) {
1999
+ return ClientAccountsApiFp(this.configuration).clientAuthMe(options).then((request) => request(this.axios, this.basePath));
2000
+ }
2001
+ /**
2002
+ * Récupère le compte client par son ID
2003
+ * @param {ClientAccountsApiGetClientAccountByIdRequest} requestParameters Request parameters.
2004
+ * @param {*} [options] Override http request option.
2005
+ * @throws {RequiredError}
2006
+ * @memberof ClientAccountsApi
2007
+ */
2008
+ getClientAccountById(requestParameters, options) {
2009
+ return ClientAccountsApiFp(this.configuration).getClientAccountById(requestParameters.accountId, options).then((request) => request(this.axios, this.basePath));
2010
+ }
2011
+ /**
2012
+ * Récupère l\'abonnement actif du compte client authentifié
2013
+ * @param {*} [options] Override http request option.
2014
+ * @throws {RequiredError}
2015
+ * @memberof ClientAccountsApi
2016
+ */
2017
+ getMyActiveSubscription(options) {
2018
+ return ClientAccountsApiFp(this.configuration).getMyActiveSubscription(options).then((request) => request(this.axios, this.basePath));
2019
+ }
2020
+ /**
2021
+ * Récupère le compte client de l\'utilisateur authentifié
2022
+ * @param {*} [options] Override http request option.
2023
+ * @throws {RequiredError}
2024
+ * @memberof ClientAccountsApi
2025
+ */
2026
+ getMyClientAccount(options) {
2027
+ return ClientAccountsApiFp(this.configuration).getMyClientAccount(options).then((request) => request(this.axios, this.basePath));
2028
+ }
2029
+ /**
2030
+ * Récupère l\'historique des abonnements du compte client authentifié
2031
+ * @param {*} [options] Override http request option.
2032
+ * @throws {RequiredError}
2033
+ * @memberof ClientAccountsApi
2034
+ */
2035
+ getSubscriptionsHistory(options) {
2036
+ return ClientAccountsApiFp(this.configuration).getSubscriptionsHistory(options).then((request) => request(this.axios, this.basePath));
2037
+ }
2038
+ /**
2039
+ * Liste les prix Stripe disponibles pour les abonnements client
2040
+ * @param {*} [options] Override http request option.
2041
+ * @throws {RequiredError}
2042
+ * @memberof ClientAccountsApi
2043
+ */
2044
+ listAvailablePrices(options) {
2045
+ return ClientAccountsApiFp(this.configuration).listAvailablePrices(options).then((request) => request(this.axios, this.basePath));
2046
+ }
2047
+ /**
2048
+ * Crée un nouveau compte client avec onboarding Stripe
2049
+ * @param {ClientAccountsApiOnboardClientAccountRequest} requestParameters Request parameters.
2050
+ * @param {*} [options] Override http request option.
2051
+ * @throws {RequiredError}
2052
+ * @memberof ClientAccountsApi
2053
+ */
2054
+ onboardClientAccount(requestParameters, options) {
2055
+ return ClientAccountsApiFp(this.configuration).onboardClientAccount(requestParameters.clientAccountOnboardingRequest, options).then((request) => request(this.axios, this.basePath));
2056
+ }
2057
+ /**
2058
+ * Route d\'inscription d\'un utilisateur client (publique)
2059
+ * @param {ClientAccountsApiRegisterClientUserRequest} requestParameters Request parameters.
2060
+ * @param {*} [options] Override http request option.
2061
+ * @throws {RequiredError}
2062
+ * @memberof ClientAccountsApi
2063
+ */
2064
+ registerClientUser(requestParameters, options) {
2065
+ return ClientAccountsApiFp(this.configuration).registerClientUser(requestParameters.clientRegisterRequestBody, options).then((request) => request(this.axios, this.basePath));
2066
+ }
2067
+ }
1387
2068
  /**
1388
2069
  * ClubAnalyticsApi - axios parameter creator
1389
2070
  * @export