@factpulse/sdk 4.0.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/.openapi-generator/FILES +30 -6
  2. package/.openapi-generator/VERSION +1 -1
  3. package/CHANGELOG.md +5 -9
  4. package/api/cdarcycle-de-vie-api.ts +186 -86
  5. package/api/client-management-api.ts +672 -0
  6. package/api/downloads-api.ts +0 -152
  7. package/api.ts +1 -0
  8. package/dist/api/cdarcycle-de-vie-api.d.ts +93 -50
  9. package/dist/api/cdarcycle-de-vie-api.js +174 -80
  10. package/dist/api/client-management-api.d.ts +309 -0
  11. package/dist/api/client-management-api.js +642 -0
  12. package/dist/api/downloads-api.d.ts +0 -68
  13. package/dist/api/downloads-api.js +0 -145
  14. package/dist/api.d.ts +1 -0
  15. package/dist/api.js +1 -0
  16. package/dist/esm/api/cdarcycle-de-vie-api.d.ts +93 -50
  17. package/dist/esm/api/cdarcycle-de-vie-api.js +174 -80
  18. package/dist/esm/api/client-management-api.d.ts +309 -0
  19. package/dist/esm/api/client-management-api.js +632 -0
  20. package/dist/esm/api/downloads-api.d.ts +0 -68
  21. package/dist/esm/api/downloads-api.js +0 -145
  22. package/dist/esm/api.d.ts +1 -0
  23. package/dist/esm/api.js +1 -0
  24. package/dist/esm/models/allowance-charge.d.ts +2 -2
  25. package/dist/esm/models/amount.d.ts +1 -1
  26. package/dist/esm/models/amount1.d.ts +1 -1
  27. package/dist/esm/models/amount2.d.ts +16 -0
  28. package/dist/esm/models/{body-submit-cdar-xml-api-v1-cdar-submit-xml-post.d.ts → client-activate-response.d.ts} +16 -5
  29. package/dist/esm/models/client-create-request.d.ts +22 -0
  30. package/dist/esm/models/client-create-request.js +14 -0
  31. package/dist/esm/models/client-detail.d.ts +48 -0
  32. package/dist/esm/models/client-detail.js +14 -0
  33. package/dist/esm/models/client-list-response.d.ts +33 -0
  34. package/dist/esm/models/client-list-response.js +14 -0
  35. package/dist/esm/models/client-summary.d.ts +48 -0
  36. package/dist/esm/models/client-summary.js +14 -0
  37. package/dist/esm/models/client-update-request.d.ts +19 -0
  38. package/dist/esm/models/client-update-request.js +14 -0
  39. package/dist/esm/models/encaissee-request.d.ts +39 -0
  40. package/dist/esm/models/encaissee-request.js +14 -0
  41. package/dist/esm/models/facture-electronique-rest-api-schemas-ereporting-invoice-type-code.d.ts +22 -0
  42. package/dist/esm/models/facture-electronique-rest-api-schemas-ereporting-invoice-type-code.js +23 -0
  43. package/dist/esm/models/index.d.ts +14 -3
  44. package/dist/esm/models/index.js +14 -3
  45. package/dist/esm/models/invoice-input.d.ts +2 -2
  46. package/dist/esm/models/invoice-type-code.d.ts +65 -6
  47. package/dist/esm/models/invoice-type-code.js +65 -6
  48. package/dist/esm/models/payment-amount-by-rate.d.ts +2 -2
  49. package/dist/esm/models/pdpconfig-response.d.ts +34 -0
  50. package/dist/esm/models/pdpconfig-response.js +14 -0
  51. package/dist/esm/models/pdpconfig-update-request.d.ts +40 -0
  52. package/dist/esm/models/pdpconfig-update-request.js +14 -0
  53. package/dist/esm/models/refusee-request.d.ts +38 -0
  54. package/dist/esm/models/refusee-request.js +14 -0
  55. package/dist/esm/models/{body-submit-cdar-api-v1-cdar-submit-post.d.ts → secret-status.d.ts} +12 -5
  56. package/dist/esm/models/secret-status.js +14 -0
  57. package/dist/esm/models/simplified-cdarresponse.d.ts +36 -0
  58. package/dist/esm/models/simplified-cdarresponse.js +14 -0
  59. package/dist/esm/models/simplified-invoice-data.d.ts +2 -2
  60. package/dist/esm/models/submit-cdarrequest.d.ts +4 -0
  61. package/dist/esm/models/submit-cdarxmlrequest.d.ts +4 -0
  62. package/dist/esm/src/helpers/client.d.ts +3 -1
  63. package/dist/esm/src/helpers/client.js +28 -7
  64. package/dist/esm/src/helpers/exceptions.d.ts +3 -1
  65. package/dist/esm/src/helpers/exceptions.js +7 -1
  66. package/dist/models/allowance-charge.d.ts +2 -2
  67. package/dist/models/amount.d.ts +1 -1
  68. package/dist/models/amount1.d.ts +1 -1
  69. package/dist/models/amount2.d.ts +16 -0
  70. package/dist/models/{body-submit-cdar-xml-api-v1-cdar-submit-xml-post.d.ts → client-activate-response.d.ts} +16 -5
  71. package/dist/models/client-create-request.d.ts +22 -0
  72. package/dist/models/client-create-request.js +15 -0
  73. package/dist/models/client-detail.d.ts +48 -0
  74. package/dist/models/client-detail.js +15 -0
  75. package/dist/models/client-list-response.d.ts +33 -0
  76. package/dist/models/client-list-response.js +15 -0
  77. package/dist/models/client-summary.d.ts +48 -0
  78. package/dist/models/client-summary.js +15 -0
  79. package/dist/models/client-update-request.d.ts +19 -0
  80. package/dist/models/client-update-request.js +15 -0
  81. package/dist/models/encaissee-request.d.ts +39 -0
  82. package/dist/models/encaissee-request.js +15 -0
  83. package/dist/models/facture-electronique-rest-api-schemas-ereporting-invoice-type-code.d.ts +22 -0
  84. package/dist/models/facture-electronique-rest-api-schemas-ereporting-invoice-type-code.js +26 -0
  85. package/dist/models/index.d.ts +14 -3
  86. package/dist/models/index.js +14 -3
  87. package/dist/models/invoice-input.d.ts +2 -2
  88. package/dist/models/invoice-type-code.d.ts +65 -6
  89. package/dist/models/invoice-type-code.js +65 -6
  90. package/dist/models/payment-amount-by-rate.d.ts +2 -2
  91. package/dist/models/pdpconfig-response.d.ts +34 -0
  92. package/dist/models/pdpconfig-response.js +15 -0
  93. package/dist/models/pdpconfig-update-request.d.ts +40 -0
  94. package/dist/models/pdpconfig-update-request.js +15 -0
  95. package/dist/models/refusee-request.d.ts +38 -0
  96. package/dist/models/refusee-request.js +15 -0
  97. package/dist/models/{body-submit-cdar-api-v1-cdar-submit-post.d.ts → secret-status.d.ts} +12 -5
  98. package/dist/models/secret-status.js +15 -0
  99. package/dist/models/simplified-cdarresponse.d.ts +36 -0
  100. package/dist/models/simplified-cdarresponse.js +15 -0
  101. package/dist/models/simplified-invoice-data.d.ts +2 -2
  102. package/dist/models/submit-cdarrequest.d.ts +4 -0
  103. package/dist/models/submit-cdarxmlrequest.d.ts +4 -0
  104. package/dist/src/helpers/client.d.ts +3 -1
  105. package/dist/src/helpers/client.js +61 -7
  106. package/dist/src/helpers/exceptions.d.ts +3 -1
  107. package/dist/src/helpers/exceptions.js +7 -1
  108. package/docs/AllowanceCharge.md +1 -1
  109. package/docs/Amount.md +1 -1
  110. package/docs/Amount1.md +1 -1
  111. package/docs/Amount2.md +19 -0
  112. package/docs/CDARCycleDeVieApi.md +126 -30
  113. package/docs/ClientActivateResponse.md +25 -0
  114. package/docs/ClientCreateRequest.md +25 -0
  115. package/docs/ClientDetail.md +41 -0
  116. package/docs/ClientListResponse.md +27 -0
  117. package/docs/ClientManagementApi.md +483 -0
  118. package/docs/ClientSummary.md +41 -0
  119. package/docs/ClientUpdateRequest.md +25 -0
  120. package/docs/DownloadsApi.md +0 -115
  121. package/docs/EncaisseeRequest.md +39 -0
  122. package/docs/FactureElectroniqueRestApiSchemasEreportingInvoiceTypeCode.md +17 -0
  123. package/docs/InvoiceInput.md +1 -1
  124. package/docs/InvoiceTypeCode.md +28 -6
  125. package/docs/PDPConfigResponse.md +47 -0
  126. package/docs/PDPConfigUpdateRequest.md +31 -0
  127. package/docs/PaymentAmountByRate.md +1 -1
  128. package/docs/RefuseeRequest.md +39 -0
  129. package/docs/SecretStatus.md +23 -0
  130. package/docs/SimplifiedCDARResponse.md +29 -0
  131. package/docs/SimplifiedInvoiceData.md +1 -1
  132. package/docs/SubmitCDARRequest.md +8 -0
  133. package/docs/SubmitCDARXMLRequest.md +8 -0
  134. package/models/allowance-charge.ts +2 -2
  135. package/models/amount.ts +1 -1
  136. package/models/amount1.ts +1 -1
  137. package/models/amount2.ts +22 -0
  138. package/models/client-activate-response.ts +34 -0
  139. package/models/client-create-request.ts +28 -0
  140. package/models/client-detail.ts +54 -0
  141. package/models/{body-submit-cdar-api-v1-cdar-submit-post.ts → client-list-response.ts} +21 -7
  142. package/models/client-summary.ts +54 -0
  143. package/models/client-update-request.ts +25 -0
  144. package/models/encaissee-request.ts +47 -0
  145. package/models/{body-submit-cdar-xml-api-v1-cdar-submit-xml-post.ts → facture-electronique-rest-api-schemas-ereporting-invoice-type-code.ts} +16 -11
  146. package/models/index.ts +14 -3
  147. package/models/invoice-input.ts +2 -2
  148. package/models/invoice-type-code.ts +65 -6
  149. package/models/payment-amount-by-rate.ts +2 -2
  150. package/models/pdpconfig-response.ts +42 -0
  151. package/models/pdpconfig-update-request.ts +46 -0
  152. package/models/refusee-request.ts +44 -0
  153. package/models/secret-status.ts +30 -0
  154. package/models/simplified-cdarresponse.ts +42 -0
  155. package/models/simplified-invoice-data.ts +2 -2
  156. package/models/submit-cdarrequest.ts +4 -0
  157. package/models/submit-cdarxmlrequest.ts +4 -0
  158. package/package.json +1 -1
  159. package/src/helpers/client.ts +24 -6
  160. package/src/helpers/exceptions.ts +9 -1
  161. package/dist/esm/models/facture-electronique-models-invoice-type-code.d.ts +0 -81
  162. package/dist/esm/models/facture-electronique-models-invoice-type-code.js +0 -82
  163. package/dist/models/facture-electronique-models-invoice-type-code.d.ts +0 -81
  164. package/dist/models/facture-electronique-models-invoice-type-code.js +0 -85
  165. package/docs/BodySubmitCdarApiV1CdarSubmitPost.md +0 -22
  166. package/docs/BodySubmitCdarXmlApiV1CdarSubmitXmlPost.md +0 -22
  167. package/docs/FactureElectroniqueModelsInvoiceTypeCode.md +0 -39
  168. package/models/facture-electronique-models-invoice-type-code.ts +0 -91
  169. /package/dist/esm/models/{body-submit-cdar-api-v1-cdar-submit-post.js → amount2.js} +0 -0
  170. /package/dist/esm/models/{body-submit-cdar-xml-api-v1-cdar-submit-xml-post.js → client-activate-response.js} +0 -0
  171. /package/dist/models/{body-submit-cdar-api-v1-cdar-submit-post.js → amount2.js} +0 -0
  172. /package/dist/models/{body-submit-cdar-xml-api-v1-cdar-submit-xml-post.js → client-activate-response.js} +0 -0
@@ -0,0 +1,632 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * FactPulse REST API
5
+ * REST API for electronic invoicing in France: Factur-X, AFNOR PDP/PA, electronic signatures. ## 🎯 Main Features ### 📄 Factur-X Invoice Generation - **Formats**: XML only or PDF/A-3 with embedded XML - **Profiles**: MINIMUM, BASIC, EN16931, EXTENDED - **Standards**: EN 16931 (EU directive 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Simplified Format**: Generation from SIRET + auto-enrichment (Chorus Pro API + Business Search) ### ✅ Validation and Compliance - **XML Validation**: Schematron (45 to 210+ rules depending on profile) - **PDF Validation**: PDF/A-3, Factur-X XMP metadata, electronic signatures - **VeraPDF**: Strict PDF/A validation (146+ ISO 19005-3 rules) - **Asynchronous Processing**: Celery support for heavy validations (VeraPDF) ### 📡 AFNOR PDP/PA Integration (XP Z12-013) - **Flow Submission**: Send invoices to Partner Dematerialization Platforms - **Flow Search**: View submitted invoices - **Download**: Retrieve PDF/A-3 with XML - **Directory Service**: Company search (SIREN/SIRET) - **Multi-client**: Support for multiple PDP configs per user (stored credentials or zero-storage) ### ✍️ PDF Electronic Signature - **Standards**: PAdES-B-B, PAdES-B-T (RFC 3161 timestamping), PAdES-B-LT (long-term archival) - **eIDAS Levels**: SES (self-signed), AdES (commercial CA), QES (QTSP) - **Validation**: Cryptographic integrity and certificate verification - **Certificate Generation**: Self-signed X.509 certificates for testing ### 🔄 Asynchronous Processing - **Celery**: Asynchronous generation, validation and signing - **Polling**: Status tracking via `/tasks/{task_id}/status` - **No timeout**: Ideal for large files or heavy validations ## 🔒 Authentication All requests require a **JWT token** in the Authorization header: ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### How to obtain a JWT token? #### 🔑 Method 1: `/api/token/` API (Recommended) **URL:** `https://factpulse.fr/api/token/` This method is **recommended** for integration in your applications and CI/CD workflows. **Prerequisites:** Having set a password on your account **For users registered via email/password:** - You already have a password, use it directly **For users registered via OAuth (Google/GitHub):** - You must first set a password at: https://factpulse.fr/accounts/password/set/ - Once the password is created, you can use the API **Request example:** ```bash curl -X POST https://factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"your_email@example.com\", \"password\": \"your_password\" }\' ``` **Optional `client_uid` parameter:** To select credentials for a specific client (PA/PDP, Chorus Pro, signing certificates), add `client_uid`: ```bash curl -X POST https://factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"your_email@example.com\", \"password\": \"your_password\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }\' ``` The `client_uid` will be included in the JWT and allow the API to automatically use: - AFNOR/PDP credentials configured for this client - Chorus Pro credentials configured for this client - Electronic signature certificates configured for this client **Response:** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Access token (validity: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Refresh token (validity: 7 days) } ``` **Advantages:** - ✅ Full automation (CI/CD, scripts) - ✅ Programmatic token management - ✅ Refresh token support for automatic access renewal - ✅ Easy integration in any language/tool #### 🖥️ Method 2: Dashboard Generation (Alternative) **URL:** https://factpulse.fr/api/dashboard/ This method is suitable for quick tests or occasional use via the graphical interface. **How it works:** - Log in to the dashboard - Use the \"Generate Test Token\" or \"Generate Production Token\" buttons - Works for **all** users (OAuth and email/password), without requiring a password **Token types:** - **Test Token**: 24h validity, 1000 calls/day quota (free) - **Production Token**: 7 days validity, quota based on your plan **Advantages:** - ✅ Quick for API testing - ✅ No password required - ✅ Simple visual interface **Disadvantages:** - ❌ Requires manual action - ❌ No refresh token - ❌ Less suited for automation ### 📚 Full Documentation For more information on authentication and API usage: https://factpulse.fr/documentation-api/
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: contact@factpulse.fr
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import globalAxios from 'axios';
24
+ // Some imports not used depending on template conditions
25
+ // @ts-ignore
26
+ import { DUMMY_BASE_URL, assertParamExists, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
27
+ // @ts-ignore
28
+ import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
29
+ /**
30
+ * ClientManagementApi - axios parameter creator
31
+ */
32
+ export const ClientManagementApiAxiosParamCreator = function (configuration) {
33
+ return {
34
+ /**
35
+ * Activate a deactivated client. **Scope**: Client level (JWT with client_uid that must match {uid})
36
+ * @summary Activate a client
37
+ * @param {string} uid
38
+ * @param {*} [options] Override http request option.
39
+ * @throws {RequiredError}
40
+ */
41
+ activateClientApiV1ClientsUidActiverPost: (uid_1, ...args_1) => __awaiter(this, [uid_1, ...args_1], void 0, function* (uid, options = {}) {
42
+ // verify required parameter 'uid' is not null or undefined
43
+ assertParamExists('activateClientApiV1ClientsUidActiverPost', 'uid', uid);
44
+ const localVarPath = `/api/v1/clients/{uid}/activer`
45
+ .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
46
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
47
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
48
+ let baseOptions;
49
+ if (configuration) {
50
+ baseOptions = configuration.baseOptions;
51
+ }
52
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
53
+ const localVarHeaderParameter = {};
54
+ const localVarQueryParameter = {};
55
+ // authentication HTTPBearer required
56
+ // http bearer authentication required
57
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
58
+ localVarHeaderParameter['Accept'] = 'application/json';
59
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
60
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
61
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
62
+ return {
63
+ url: toPathString(localVarUrlObj),
64
+ options: localVarRequestOptions,
65
+ };
66
+ }),
67
+ /**
68
+ * Create a new client for the account. **Scope**: Account level (JWT without client_uid) **Fields**: - `name`: Client name (required) - `description`: Optional description - `siret`: Optional SIRET (14 digits)
69
+ * @summary Create a client
70
+ * @param {ClientCreateRequest} clientCreateRequest
71
+ * @param {*} [options] Override http request option.
72
+ * @throws {RequiredError}
73
+ */
74
+ createClientApiV1ClientsPost: (clientCreateRequest_1, ...args_1) => __awaiter(this, [clientCreateRequest_1, ...args_1], void 0, function* (clientCreateRequest, options = {}) {
75
+ // verify required parameter 'clientCreateRequest' is not null or undefined
76
+ assertParamExists('createClientApiV1ClientsPost', 'clientCreateRequest', clientCreateRequest);
77
+ const localVarPath = `/api/v1/clients`;
78
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
79
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
80
+ let baseOptions;
81
+ if (configuration) {
82
+ baseOptions = configuration.baseOptions;
83
+ }
84
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
85
+ const localVarHeaderParameter = {};
86
+ const localVarQueryParameter = {};
87
+ // authentication HTTPBearer required
88
+ // http bearer authentication required
89
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
90
+ localVarHeaderParameter['Content-Type'] = 'application/json';
91
+ localVarHeaderParameter['Accept'] = 'application/json';
92
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
93
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
94
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
95
+ localVarRequestOptions.data = serializeDataIfNeeded(clientCreateRequest, localVarRequestOptions, configuration);
96
+ return {
97
+ url: toPathString(localVarUrlObj),
98
+ options: localVarRequestOptions,
99
+ };
100
+ }),
101
+ /**
102
+ * Deactivate an active client. **Scope**: Client level (JWT with client_uid that must match {uid}) **Note**: A deactivated client cannot be used for API calls (AFNOR, Chorus Pro, etc.).
103
+ * @summary Deactivate a client
104
+ * @param {string} uid
105
+ * @param {*} [options] Override http request option.
106
+ * @throws {RequiredError}
107
+ */
108
+ deactivateClientApiV1ClientsUidDesactiverPost: (uid_1, ...args_1) => __awaiter(this, [uid_1, ...args_1], void 0, function* (uid, options = {}) {
109
+ // verify required parameter 'uid' is not null or undefined
110
+ assertParamExists('deactivateClientApiV1ClientsUidDesactiverPost', 'uid', uid);
111
+ const localVarPath = `/api/v1/clients/{uid}/desactiver`
112
+ .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
113
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
114
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
115
+ let baseOptions;
116
+ if (configuration) {
117
+ baseOptions = configuration.baseOptions;
118
+ }
119
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
120
+ const localVarHeaderParameter = {};
121
+ const localVarQueryParameter = {};
122
+ // authentication HTTPBearer required
123
+ // http bearer authentication required
124
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
125
+ localVarHeaderParameter['Accept'] = 'application/json';
126
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
127
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
128
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
129
+ return {
130
+ url: toPathString(localVarUrlObj),
131
+ options: localVarRequestOptions,
132
+ };
133
+ }),
134
+ /**
135
+ * Get details of a client. **Scope**: Client level (JWT with client_uid that must match {uid}) **Security**: If the JWT contains a client_uid, it must match the {uid} in the URL, otherwise a 403 error is returned.
136
+ * @summary Get client details
137
+ * @param {string} uid
138
+ * @param {*} [options] Override http request option.
139
+ * @throws {RequiredError}
140
+ */
141
+ getClientApiV1ClientsUidGet: (uid_1, ...args_1) => __awaiter(this, [uid_1, ...args_1], void 0, function* (uid, options = {}) {
142
+ // verify required parameter 'uid' is not null or undefined
143
+ assertParamExists('getClientApiV1ClientsUidGet', 'uid', uid);
144
+ const localVarPath = `/api/v1/clients/{uid}`
145
+ .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
146
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
147
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
148
+ let baseOptions;
149
+ if (configuration) {
150
+ baseOptions = configuration.baseOptions;
151
+ }
152
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
153
+ const localVarHeaderParameter = {};
154
+ const localVarQueryParameter = {};
155
+ // authentication HTTPBearer required
156
+ // http bearer authentication required
157
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
158
+ localVarHeaderParameter['Accept'] = 'application/json';
159
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
160
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
161
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
162
+ return {
163
+ url: toPathString(localVarUrlObj),
164
+ options: localVarRequestOptions,
165
+ };
166
+ }),
167
+ /**
168
+ * Get the PDP (PA/PDP) configuration for a client. **Scope**: Client level (JWT with client_uid that must match {uid}) **Security**: The client secret is never returned. Only a status (`secretStatus`) indicates whether a secret is configured. **Response**: - If configured: all config details (URLs, client_id, secret status) - If not configured: `isConfigured: false` with a message
169
+ * @summary Get client PDP configuration
170
+ * @param {string} uid
171
+ * @param {*} [options] Override http request option.
172
+ * @throws {RequiredError}
173
+ */
174
+ getPdpConfigApiV1ClientsUidPdpConfigGet: (uid_1, ...args_1) => __awaiter(this, [uid_1, ...args_1], void 0, function* (uid, options = {}) {
175
+ // verify required parameter 'uid' is not null or undefined
176
+ assertParamExists('getPdpConfigApiV1ClientsUidPdpConfigGet', 'uid', uid);
177
+ const localVarPath = `/api/v1/clients/{uid}/pdp-config`
178
+ .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
179
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
180
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
181
+ let baseOptions;
182
+ if (configuration) {
183
+ baseOptions = configuration.baseOptions;
184
+ }
185
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
186
+ const localVarHeaderParameter = {};
187
+ const localVarQueryParameter = {};
188
+ // authentication HTTPBearer required
189
+ // http bearer authentication required
190
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
191
+ localVarHeaderParameter['Accept'] = 'application/json';
192
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
193
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
194
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
195
+ return {
196
+ url: toPathString(localVarUrlObj),
197
+ options: localVarRequestOptions,
198
+ };
199
+ }),
200
+ /**
201
+ * Paginated list of clients for the account. **Scope**: Account level (JWT without client_uid) **Pagination**: - `page`: Page number (default: 1) - `pageSize`: Page size (default: 20, max: 100)
202
+ * @summary List clients
203
+ * @param {number} [page] Page number
204
+ * @param {number} [pageSize] Page size
205
+ * @param {*} [options] Override http request option.
206
+ * @throws {RequiredError}
207
+ */
208
+ listClientsApiV1ClientsGet: (page_1, pageSize_1, ...args_1) => __awaiter(this, [page_1, pageSize_1, ...args_1], void 0, function* (page, pageSize, options = {}) {
209
+ const localVarPath = `/api/v1/clients`;
210
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
211
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
212
+ let baseOptions;
213
+ if (configuration) {
214
+ baseOptions = configuration.baseOptions;
215
+ }
216
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
217
+ const localVarHeaderParameter = {};
218
+ const localVarQueryParameter = {};
219
+ // authentication HTTPBearer required
220
+ // http bearer authentication required
221
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
222
+ if (page !== undefined) {
223
+ localVarQueryParameter['page'] = page;
224
+ }
225
+ if (pageSize !== undefined) {
226
+ localVarQueryParameter['pageSize'] = pageSize;
227
+ }
228
+ localVarHeaderParameter['Accept'] = 'application/json';
229
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
230
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
231
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
232
+ return {
233
+ url: toPathString(localVarUrlObj),
234
+ options: localVarRequestOptions,
235
+ };
236
+ }),
237
+ /**
238
+ * Update client information (partial update). **Scope**: Client level (JWT with client_uid that must match {uid}) **Updatable fields**: - `name`: Client name - `description`: Description - `siret`: SIRET (14 digits) Only provided fields are updated.
239
+ * @summary Update a client
240
+ * @param {string} uid
241
+ * @param {ClientUpdateRequest} clientUpdateRequest
242
+ * @param {*} [options] Override http request option.
243
+ * @throws {RequiredError}
244
+ */
245
+ updateClientApiV1ClientsUidPatch: (uid_1, clientUpdateRequest_1, ...args_1) => __awaiter(this, [uid_1, clientUpdateRequest_1, ...args_1], void 0, function* (uid, clientUpdateRequest, options = {}) {
246
+ // verify required parameter 'uid' is not null or undefined
247
+ assertParamExists('updateClientApiV1ClientsUidPatch', 'uid', uid);
248
+ // verify required parameter 'clientUpdateRequest' is not null or undefined
249
+ assertParamExists('updateClientApiV1ClientsUidPatch', 'clientUpdateRequest', clientUpdateRequest);
250
+ const localVarPath = `/api/v1/clients/{uid}`
251
+ .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
252
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
253
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
254
+ let baseOptions;
255
+ if (configuration) {
256
+ baseOptions = configuration.baseOptions;
257
+ }
258
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
259
+ const localVarHeaderParameter = {};
260
+ const localVarQueryParameter = {};
261
+ // authentication HTTPBearer required
262
+ // http bearer authentication required
263
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
264
+ localVarHeaderParameter['Content-Type'] = 'application/json';
265
+ localVarHeaderParameter['Accept'] = 'application/json';
266
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
267
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
268
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
269
+ localVarRequestOptions.data = serializeDataIfNeeded(clientUpdateRequest, localVarRequestOptions, configuration);
270
+ return {
271
+ url: toPathString(localVarUrlObj),
272
+ options: localVarRequestOptions,
273
+ };
274
+ }),
275
+ /**
276
+ * Configure or update the PDP (PA/PDP) configuration for a client. **Scope**: Client level (JWT with client_uid that must match {uid}) **Required fields**: - `flowServiceUrl`: PDP Flow Service URL - `tokenUrl`: PDP OAuth token URL - `oauthClientId`: OAuth Client ID - `clientSecret`: OAuth Client Secret (sent but NEVER returned) **Optional fields**: - `isActive`: Enable/disable the config (default: true) - `modeSandbox`: Sandbox mode (default: false) **Security**: The `clientSecret` is stored encrypted on Django side and is never returned in API responses.
277
+ * @summary Configure client PDP
278
+ * @param {string} uid
279
+ * @param {PDPConfigUpdateRequest} pDPConfigUpdateRequest
280
+ * @param {*} [options] Override http request option.
281
+ * @throws {RequiredError}
282
+ */
283
+ updatePdpConfigApiV1ClientsUidPdpConfigPut: (uid_1, pDPConfigUpdateRequest_1, ...args_1) => __awaiter(this, [uid_1, pDPConfigUpdateRequest_1, ...args_1], void 0, function* (uid, pDPConfigUpdateRequest, options = {}) {
284
+ // verify required parameter 'uid' is not null or undefined
285
+ assertParamExists('updatePdpConfigApiV1ClientsUidPdpConfigPut', 'uid', uid);
286
+ // verify required parameter 'pDPConfigUpdateRequest' is not null or undefined
287
+ assertParamExists('updatePdpConfigApiV1ClientsUidPdpConfigPut', 'pDPConfigUpdateRequest', pDPConfigUpdateRequest);
288
+ const localVarPath = `/api/v1/clients/{uid}/pdp-config`
289
+ .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
290
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
291
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
292
+ let baseOptions;
293
+ if (configuration) {
294
+ baseOptions = configuration.baseOptions;
295
+ }
296
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
297
+ const localVarHeaderParameter = {};
298
+ const localVarQueryParameter = {};
299
+ // authentication HTTPBearer required
300
+ // http bearer authentication required
301
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
302
+ localVarHeaderParameter['Content-Type'] = 'application/json';
303
+ localVarHeaderParameter['Accept'] = 'application/json';
304
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
305
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
306
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
307
+ localVarRequestOptions.data = serializeDataIfNeeded(pDPConfigUpdateRequest, localVarRequestOptions, configuration);
308
+ return {
309
+ url: toPathString(localVarUrlObj),
310
+ options: localVarRequestOptions,
311
+ };
312
+ }),
313
+ };
314
+ };
315
+ /**
316
+ * ClientManagementApi - functional programming interface
317
+ */
318
+ export const ClientManagementApiFp = function (configuration) {
319
+ const localVarAxiosParamCreator = ClientManagementApiAxiosParamCreator(configuration);
320
+ return {
321
+ /**
322
+ * Activate a deactivated client. **Scope**: Client level (JWT with client_uid that must match {uid})
323
+ * @summary Activate a client
324
+ * @param {string} uid
325
+ * @param {*} [options] Override http request option.
326
+ * @throws {RequiredError}
327
+ */
328
+ activateClientApiV1ClientsUidActiverPost(uid, options) {
329
+ return __awaiter(this, void 0, void 0, function* () {
330
+ var _a, _b, _c;
331
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.activateClientApiV1ClientsUidActiverPost(uid, options);
332
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
333
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClientManagementApi.activateClientApiV1ClientsUidActiverPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
334
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
335
+ });
336
+ },
337
+ /**
338
+ * Create a new client for the account. **Scope**: Account level (JWT without client_uid) **Fields**: - `name`: Client name (required) - `description`: Optional description - `siret`: Optional SIRET (14 digits)
339
+ * @summary Create a client
340
+ * @param {ClientCreateRequest} clientCreateRequest
341
+ * @param {*} [options] Override http request option.
342
+ * @throws {RequiredError}
343
+ */
344
+ createClientApiV1ClientsPost(clientCreateRequest, options) {
345
+ return __awaiter(this, void 0, void 0, function* () {
346
+ var _a, _b, _c;
347
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createClientApiV1ClientsPost(clientCreateRequest, options);
348
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
349
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClientManagementApi.createClientApiV1ClientsPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
350
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
351
+ });
352
+ },
353
+ /**
354
+ * Deactivate an active client. **Scope**: Client level (JWT with client_uid that must match {uid}) **Note**: A deactivated client cannot be used for API calls (AFNOR, Chorus Pro, etc.).
355
+ * @summary Deactivate a client
356
+ * @param {string} uid
357
+ * @param {*} [options] Override http request option.
358
+ * @throws {RequiredError}
359
+ */
360
+ deactivateClientApiV1ClientsUidDesactiverPost(uid, options) {
361
+ return __awaiter(this, void 0, void 0, function* () {
362
+ var _a, _b, _c;
363
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deactivateClientApiV1ClientsUidDesactiverPost(uid, options);
364
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
365
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClientManagementApi.deactivateClientApiV1ClientsUidDesactiverPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
366
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
367
+ });
368
+ },
369
+ /**
370
+ * Get details of a client. **Scope**: Client level (JWT with client_uid that must match {uid}) **Security**: If the JWT contains a client_uid, it must match the {uid} in the URL, otherwise a 403 error is returned.
371
+ * @summary Get client details
372
+ * @param {string} uid
373
+ * @param {*} [options] Override http request option.
374
+ * @throws {RequiredError}
375
+ */
376
+ getClientApiV1ClientsUidGet(uid, options) {
377
+ return __awaiter(this, void 0, void 0, function* () {
378
+ var _a, _b, _c;
379
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getClientApiV1ClientsUidGet(uid, options);
380
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
381
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClientManagementApi.getClientApiV1ClientsUidGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
382
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
383
+ });
384
+ },
385
+ /**
386
+ * Get the PDP (PA/PDP) configuration for a client. **Scope**: Client level (JWT with client_uid that must match {uid}) **Security**: The client secret is never returned. Only a status (`secretStatus`) indicates whether a secret is configured. **Response**: - If configured: all config details (URLs, client_id, secret status) - If not configured: `isConfigured: false` with a message
387
+ * @summary Get client PDP configuration
388
+ * @param {string} uid
389
+ * @param {*} [options] Override http request option.
390
+ * @throws {RequiredError}
391
+ */
392
+ getPdpConfigApiV1ClientsUidPdpConfigGet(uid, options) {
393
+ return __awaiter(this, void 0, void 0, function* () {
394
+ var _a, _b, _c;
395
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getPdpConfigApiV1ClientsUidPdpConfigGet(uid, options);
396
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
397
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClientManagementApi.getPdpConfigApiV1ClientsUidPdpConfigGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
398
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
399
+ });
400
+ },
401
+ /**
402
+ * Paginated list of clients for the account. **Scope**: Account level (JWT without client_uid) **Pagination**: - `page`: Page number (default: 1) - `pageSize`: Page size (default: 20, max: 100)
403
+ * @summary List clients
404
+ * @param {number} [page] Page number
405
+ * @param {number} [pageSize] Page size
406
+ * @param {*} [options] Override http request option.
407
+ * @throws {RequiredError}
408
+ */
409
+ listClientsApiV1ClientsGet(page, pageSize, options) {
410
+ return __awaiter(this, void 0, void 0, function* () {
411
+ var _a, _b, _c;
412
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listClientsApiV1ClientsGet(page, pageSize, options);
413
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
414
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClientManagementApi.listClientsApiV1ClientsGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
415
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
416
+ });
417
+ },
418
+ /**
419
+ * Update client information (partial update). **Scope**: Client level (JWT with client_uid that must match {uid}) **Updatable fields**: - `name`: Client name - `description`: Description - `siret`: SIRET (14 digits) Only provided fields are updated.
420
+ * @summary Update a client
421
+ * @param {string} uid
422
+ * @param {ClientUpdateRequest} clientUpdateRequest
423
+ * @param {*} [options] Override http request option.
424
+ * @throws {RequiredError}
425
+ */
426
+ updateClientApiV1ClientsUidPatch(uid, clientUpdateRequest, options) {
427
+ return __awaiter(this, void 0, void 0, function* () {
428
+ var _a, _b, _c;
429
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateClientApiV1ClientsUidPatch(uid, clientUpdateRequest, options);
430
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
431
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClientManagementApi.updateClientApiV1ClientsUidPatch']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
432
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
433
+ });
434
+ },
435
+ /**
436
+ * Configure or update the PDP (PA/PDP) configuration for a client. **Scope**: Client level (JWT with client_uid that must match {uid}) **Required fields**: - `flowServiceUrl`: PDP Flow Service URL - `tokenUrl`: PDP OAuth token URL - `oauthClientId`: OAuth Client ID - `clientSecret`: OAuth Client Secret (sent but NEVER returned) **Optional fields**: - `isActive`: Enable/disable the config (default: true) - `modeSandbox`: Sandbox mode (default: false) **Security**: The `clientSecret` is stored encrypted on Django side and is never returned in API responses.
437
+ * @summary Configure client PDP
438
+ * @param {string} uid
439
+ * @param {PDPConfigUpdateRequest} pDPConfigUpdateRequest
440
+ * @param {*} [options] Override http request option.
441
+ * @throws {RequiredError}
442
+ */
443
+ updatePdpConfigApiV1ClientsUidPdpConfigPut(uid, pDPConfigUpdateRequest, options) {
444
+ return __awaiter(this, void 0, void 0, function* () {
445
+ var _a, _b, _c;
446
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updatePdpConfigApiV1ClientsUidPdpConfigPut(uid, pDPConfigUpdateRequest, options);
447
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
448
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ClientManagementApi.updatePdpConfigApiV1ClientsUidPdpConfigPut']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
449
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
450
+ });
451
+ },
452
+ };
453
+ };
454
+ /**
455
+ * ClientManagementApi - factory interface
456
+ */
457
+ export const ClientManagementApiFactory = function (configuration, basePath, axios) {
458
+ const localVarFp = ClientManagementApiFp(configuration);
459
+ return {
460
+ /**
461
+ * Activate a deactivated client. **Scope**: Client level (JWT with client_uid that must match {uid})
462
+ * @summary Activate a client
463
+ * @param {string} uid
464
+ * @param {*} [options] Override http request option.
465
+ * @throws {RequiredError}
466
+ */
467
+ activateClientApiV1ClientsUidActiverPost(uid, options) {
468
+ return localVarFp.activateClientApiV1ClientsUidActiverPost(uid, options).then((request) => request(axios, basePath));
469
+ },
470
+ /**
471
+ * Create a new client for the account. **Scope**: Account level (JWT without client_uid) **Fields**: - `name`: Client name (required) - `description`: Optional description - `siret`: Optional SIRET (14 digits)
472
+ * @summary Create a client
473
+ * @param {ClientCreateRequest} clientCreateRequest
474
+ * @param {*} [options] Override http request option.
475
+ * @throws {RequiredError}
476
+ */
477
+ createClientApiV1ClientsPost(clientCreateRequest, options) {
478
+ return localVarFp.createClientApiV1ClientsPost(clientCreateRequest, options).then((request) => request(axios, basePath));
479
+ },
480
+ /**
481
+ * Deactivate an active client. **Scope**: Client level (JWT with client_uid that must match {uid}) **Note**: A deactivated client cannot be used for API calls (AFNOR, Chorus Pro, etc.).
482
+ * @summary Deactivate a client
483
+ * @param {string} uid
484
+ * @param {*} [options] Override http request option.
485
+ * @throws {RequiredError}
486
+ */
487
+ deactivateClientApiV1ClientsUidDesactiverPost(uid, options) {
488
+ return localVarFp.deactivateClientApiV1ClientsUidDesactiverPost(uid, options).then((request) => request(axios, basePath));
489
+ },
490
+ /**
491
+ * Get details of a client. **Scope**: Client level (JWT with client_uid that must match {uid}) **Security**: If the JWT contains a client_uid, it must match the {uid} in the URL, otherwise a 403 error is returned.
492
+ * @summary Get client details
493
+ * @param {string} uid
494
+ * @param {*} [options] Override http request option.
495
+ * @throws {RequiredError}
496
+ */
497
+ getClientApiV1ClientsUidGet(uid, options) {
498
+ return localVarFp.getClientApiV1ClientsUidGet(uid, options).then((request) => request(axios, basePath));
499
+ },
500
+ /**
501
+ * Get the PDP (PA/PDP) configuration for a client. **Scope**: Client level (JWT with client_uid that must match {uid}) **Security**: The client secret is never returned. Only a status (`secretStatus`) indicates whether a secret is configured. **Response**: - If configured: all config details (URLs, client_id, secret status) - If not configured: `isConfigured: false` with a message
502
+ * @summary Get client PDP configuration
503
+ * @param {string} uid
504
+ * @param {*} [options] Override http request option.
505
+ * @throws {RequiredError}
506
+ */
507
+ getPdpConfigApiV1ClientsUidPdpConfigGet(uid, options) {
508
+ return localVarFp.getPdpConfigApiV1ClientsUidPdpConfigGet(uid, options).then((request) => request(axios, basePath));
509
+ },
510
+ /**
511
+ * Paginated list of clients for the account. **Scope**: Account level (JWT without client_uid) **Pagination**: - `page`: Page number (default: 1) - `pageSize`: Page size (default: 20, max: 100)
512
+ * @summary List clients
513
+ * @param {number} [page] Page number
514
+ * @param {number} [pageSize] Page size
515
+ * @param {*} [options] Override http request option.
516
+ * @throws {RequiredError}
517
+ */
518
+ listClientsApiV1ClientsGet(page, pageSize, options) {
519
+ return localVarFp.listClientsApiV1ClientsGet(page, pageSize, options).then((request) => request(axios, basePath));
520
+ },
521
+ /**
522
+ * Update client information (partial update). **Scope**: Client level (JWT with client_uid that must match {uid}) **Updatable fields**: - `name`: Client name - `description`: Description - `siret`: SIRET (14 digits) Only provided fields are updated.
523
+ * @summary Update a client
524
+ * @param {string} uid
525
+ * @param {ClientUpdateRequest} clientUpdateRequest
526
+ * @param {*} [options] Override http request option.
527
+ * @throws {RequiredError}
528
+ */
529
+ updateClientApiV1ClientsUidPatch(uid, clientUpdateRequest, options) {
530
+ return localVarFp.updateClientApiV1ClientsUidPatch(uid, clientUpdateRequest, options).then((request) => request(axios, basePath));
531
+ },
532
+ /**
533
+ * Configure or update the PDP (PA/PDP) configuration for a client. **Scope**: Client level (JWT with client_uid that must match {uid}) **Required fields**: - `flowServiceUrl`: PDP Flow Service URL - `tokenUrl`: PDP OAuth token URL - `oauthClientId`: OAuth Client ID - `clientSecret`: OAuth Client Secret (sent but NEVER returned) **Optional fields**: - `isActive`: Enable/disable the config (default: true) - `modeSandbox`: Sandbox mode (default: false) **Security**: The `clientSecret` is stored encrypted on Django side and is never returned in API responses.
534
+ * @summary Configure client PDP
535
+ * @param {string} uid
536
+ * @param {PDPConfigUpdateRequest} pDPConfigUpdateRequest
537
+ * @param {*} [options] Override http request option.
538
+ * @throws {RequiredError}
539
+ */
540
+ updatePdpConfigApiV1ClientsUidPdpConfigPut(uid, pDPConfigUpdateRequest, options) {
541
+ return localVarFp.updatePdpConfigApiV1ClientsUidPdpConfigPut(uid, pDPConfigUpdateRequest, options).then((request) => request(axios, basePath));
542
+ },
543
+ };
544
+ };
545
+ /**
546
+ * ClientManagementApi - object-oriented interface
547
+ */
548
+ export class ClientManagementApi extends BaseAPI {
549
+ /**
550
+ * Activate a deactivated client. **Scope**: Client level (JWT with client_uid that must match {uid})
551
+ * @summary Activate a client
552
+ * @param {string} uid
553
+ * @param {*} [options] Override http request option.
554
+ * @throws {RequiredError}
555
+ */
556
+ activateClientApiV1ClientsUidActiverPost(uid, options) {
557
+ return ClientManagementApiFp(this.configuration).activateClientApiV1ClientsUidActiverPost(uid, options).then((request) => request(this.axios, this.basePath));
558
+ }
559
+ /**
560
+ * Create a new client for the account. **Scope**: Account level (JWT without client_uid) **Fields**: - `name`: Client name (required) - `description`: Optional description - `siret`: Optional SIRET (14 digits)
561
+ * @summary Create a client
562
+ * @param {ClientCreateRequest} clientCreateRequest
563
+ * @param {*} [options] Override http request option.
564
+ * @throws {RequiredError}
565
+ */
566
+ createClientApiV1ClientsPost(clientCreateRequest, options) {
567
+ return ClientManagementApiFp(this.configuration).createClientApiV1ClientsPost(clientCreateRequest, options).then((request) => request(this.axios, this.basePath));
568
+ }
569
+ /**
570
+ * Deactivate an active client. **Scope**: Client level (JWT with client_uid that must match {uid}) **Note**: A deactivated client cannot be used for API calls (AFNOR, Chorus Pro, etc.).
571
+ * @summary Deactivate a client
572
+ * @param {string} uid
573
+ * @param {*} [options] Override http request option.
574
+ * @throws {RequiredError}
575
+ */
576
+ deactivateClientApiV1ClientsUidDesactiverPost(uid, options) {
577
+ return ClientManagementApiFp(this.configuration).deactivateClientApiV1ClientsUidDesactiverPost(uid, options).then((request) => request(this.axios, this.basePath));
578
+ }
579
+ /**
580
+ * Get details of a client. **Scope**: Client level (JWT with client_uid that must match {uid}) **Security**: If the JWT contains a client_uid, it must match the {uid} in the URL, otherwise a 403 error is returned.
581
+ * @summary Get client details
582
+ * @param {string} uid
583
+ * @param {*} [options] Override http request option.
584
+ * @throws {RequiredError}
585
+ */
586
+ getClientApiV1ClientsUidGet(uid, options) {
587
+ return ClientManagementApiFp(this.configuration).getClientApiV1ClientsUidGet(uid, options).then((request) => request(this.axios, this.basePath));
588
+ }
589
+ /**
590
+ * Get the PDP (PA/PDP) configuration for a client. **Scope**: Client level (JWT with client_uid that must match {uid}) **Security**: The client secret is never returned. Only a status (`secretStatus`) indicates whether a secret is configured. **Response**: - If configured: all config details (URLs, client_id, secret status) - If not configured: `isConfigured: false` with a message
591
+ * @summary Get client PDP configuration
592
+ * @param {string} uid
593
+ * @param {*} [options] Override http request option.
594
+ * @throws {RequiredError}
595
+ */
596
+ getPdpConfigApiV1ClientsUidPdpConfigGet(uid, options) {
597
+ return ClientManagementApiFp(this.configuration).getPdpConfigApiV1ClientsUidPdpConfigGet(uid, options).then((request) => request(this.axios, this.basePath));
598
+ }
599
+ /**
600
+ * Paginated list of clients for the account. **Scope**: Account level (JWT without client_uid) **Pagination**: - `page`: Page number (default: 1) - `pageSize`: Page size (default: 20, max: 100)
601
+ * @summary List clients
602
+ * @param {number} [page] Page number
603
+ * @param {number} [pageSize] Page size
604
+ * @param {*} [options] Override http request option.
605
+ * @throws {RequiredError}
606
+ */
607
+ listClientsApiV1ClientsGet(page, pageSize, options) {
608
+ return ClientManagementApiFp(this.configuration).listClientsApiV1ClientsGet(page, pageSize, options).then((request) => request(this.axios, this.basePath));
609
+ }
610
+ /**
611
+ * Update client information (partial update). **Scope**: Client level (JWT with client_uid that must match {uid}) **Updatable fields**: - `name`: Client name - `description`: Description - `siret`: SIRET (14 digits) Only provided fields are updated.
612
+ * @summary Update a client
613
+ * @param {string} uid
614
+ * @param {ClientUpdateRequest} clientUpdateRequest
615
+ * @param {*} [options] Override http request option.
616
+ * @throws {RequiredError}
617
+ */
618
+ updateClientApiV1ClientsUidPatch(uid, clientUpdateRequest, options) {
619
+ return ClientManagementApiFp(this.configuration).updateClientApiV1ClientsUidPatch(uid, clientUpdateRequest, options).then((request) => request(this.axios, this.basePath));
620
+ }
621
+ /**
622
+ * Configure or update the PDP (PA/PDP) configuration for a client. **Scope**: Client level (JWT with client_uid that must match {uid}) **Required fields**: - `flowServiceUrl`: PDP Flow Service URL - `tokenUrl`: PDP OAuth token URL - `oauthClientId`: OAuth Client ID - `clientSecret`: OAuth Client Secret (sent but NEVER returned) **Optional fields**: - `isActive`: Enable/disable the config (default: true) - `modeSandbox`: Sandbox mode (default: false) **Security**: The `clientSecret` is stored encrypted on Django side and is never returned in API responses.
623
+ * @summary Configure client PDP
624
+ * @param {string} uid
625
+ * @param {PDPConfigUpdateRequest} pDPConfigUpdateRequest
626
+ * @param {*} [options] Override http request option.
627
+ * @throws {RequiredError}
628
+ */
629
+ updatePdpConfigApiV1ClientsUidPdpConfigPut(uid, pDPConfigUpdateRequest, options) {
630
+ return ClientManagementApiFp(this.configuration).updatePdpConfigApiV1ClientsUidPdpConfigPut(uid, pDPConfigUpdateRequest, options).then((request) => request(this.axios, this.basePath));
631
+ }
632
+ }