@factpulse/sdk 3.0.37 → 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 (222) hide show
  1. package/.openapi-generator/FILES +32 -8
  2. package/.openapi-generator/VERSION +1 -1
  3. package/CHANGELOG.md +5 -12
  4. package/README.md +135 -148
  5. package/api/cdarcycle-de-vie-api.ts +186 -86
  6. package/api/client-management-api.ts +672 -0
  7. package/api/downloads-api.ts +0 -152
  8. package/api/invoice-processing-api.ts +2 -2
  9. package/api.ts +1 -0
  10. package/dist/api/cdarcycle-de-vie-api.d.ts +93 -50
  11. package/dist/api/cdarcycle-de-vie-api.js +174 -80
  12. package/dist/api/client-management-api.d.ts +309 -0
  13. package/dist/api/client-management-api.js +642 -0
  14. package/dist/api/downloads-api.d.ts +0 -68
  15. package/dist/api/downloads-api.js +0 -145
  16. package/dist/api.d.ts +1 -0
  17. package/dist/api.js +1 -0
  18. package/dist/esm/api/cdarcycle-de-vie-api.d.ts +93 -50
  19. package/dist/esm/api/cdarcycle-de-vie-api.js +174 -80
  20. package/dist/esm/api/client-management-api.d.ts +309 -0
  21. package/dist/esm/api/client-management-api.js +632 -0
  22. package/dist/esm/api/downloads-api.d.ts +0 -68
  23. package/dist/esm/api/downloads-api.js +0 -145
  24. package/dist/esm/api.d.ts +1 -0
  25. package/dist/esm/api.js +1 -0
  26. package/dist/esm/models/allowance-charge.d.ts +2 -2
  27. package/dist/esm/models/amount.d.ts +1 -1
  28. package/dist/esm/models/amount1.d.ts +1 -1
  29. package/dist/esm/models/amount2.d.ts +16 -0
  30. package/dist/esm/models/chorus-pro-credentials.d.ts +19 -7
  31. package/dist/esm/models/chorus-pro-destination.d.ts +2 -2
  32. package/dist/esm/models/{body-submit-cdar-xml-api-v1-cdar-submit-xml-post.d.ts → client-activate-response.d.ts} +16 -5
  33. package/dist/esm/models/{facture-electronique-rest-api-schemas-validation-validation-error-response.d.ts → client-create-request.d.ts} +6 -4
  34. package/dist/esm/models/client-detail.d.ts +48 -0
  35. package/dist/esm/models/client-list-response.d.ts +33 -0
  36. package/dist/esm/models/client-list-response.js +14 -0
  37. package/dist/esm/models/client-summary.d.ts +48 -0
  38. package/dist/esm/models/client-summary.js +14 -0
  39. package/dist/esm/models/client-update-request.d.ts +19 -0
  40. package/dist/esm/models/client-update-request.js +14 -0
  41. package/dist/esm/models/encaissee-request.d.ts +39 -0
  42. package/dist/esm/models/encaissee-request.js +14 -0
  43. package/dist/esm/models/facture-electronique-rest-api-schemas-cdar-validation-error-response.d.ts +29 -0
  44. package/dist/esm/models/facture-electronique-rest-api-schemas-cdar-validation-error-response.js +14 -0
  45. package/dist/esm/models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.d.ts +24 -0
  46. package/dist/esm/models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.js +14 -0
  47. package/dist/esm/models/get-chorus-pro-id-request.d.ts +2 -2
  48. package/dist/esm/models/get-invoice-request.d.ts +2 -2
  49. package/dist/esm/models/get-structure-request.d.ts +2 -2
  50. package/dist/esm/models/index.d.ts +15 -4
  51. package/dist/esm/models/index.js +15 -4
  52. package/dist/esm/models/payment-amount-by-rate.d.ts +2 -2
  53. package/dist/esm/models/pdpconfig-response.d.ts +34 -0
  54. package/dist/esm/models/pdpconfig-response.js +14 -0
  55. package/dist/esm/models/pdpconfig-update-request.d.ts +40 -0
  56. package/dist/esm/models/pdpconfig-update-request.js +14 -0
  57. package/dist/esm/models/recipient.d.ts +1 -1
  58. package/dist/{models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.d.ts → esm/models/refusee-request.d.ts} +16 -14
  59. package/dist/esm/models/refusee-request.js +14 -0
  60. package/dist/esm/models/scheme-id.d.ts +7 -7
  61. package/dist/esm/models/scheme-id.js +7 -7
  62. package/dist/esm/models/search-structure-request.d.ts +2 -2
  63. package/dist/esm/models/{body-submit-cdar-api-v1-cdar-submit-post.d.ts → secret-status.d.ts} +12 -5
  64. package/dist/esm/models/secret-status.js +14 -0
  65. package/dist/esm/models/simplified-cdarresponse.d.ts +36 -0
  66. package/dist/esm/models/simplified-cdarresponse.js +14 -0
  67. package/dist/esm/models/submit-cdarrequest.d.ts +4 -0
  68. package/dist/esm/models/submit-cdarxmlrequest.d.ts +4 -0
  69. package/dist/esm/models/submit-complete-invoice-response.d.ts +1 -1
  70. package/dist/esm/models/submit-invoice-request.d.ts +2 -2
  71. package/dist/esm/models/supplier.d.ts +1 -1
  72. package/dist/esm/models/validate-cdarresponse.d.ts +3 -3
  73. package/dist/esm/models/validation-error-response.d.ts +3 -12
  74. package/dist/esm/src/helpers/client.d.ts +45 -265
  75. package/dist/esm/src/helpers/client.js +211 -773
  76. package/dist/esm/src/helpers/exceptions.d.ts +3 -1
  77. package/dist/esm/src/helpers/exceptions.js +7 -1
  78. package/dist/esm/src/helpers/index.d.ts +1 -2
  79. package/dist/esm/src/helpers/index.js +1 -3
  80. package/dist/models/allowance-charge.d.ts +2 -2
  81. package/dist/models/amount.d.ts +1 -1
  82. package/dist/models/amount1.d.ts +1 -1
  83. package/dist/models/amount2.d.ts +16 -0
  84. package/dist/models/chorus-pro-credentials.d.ts +19 -7
  85. package/dist/models/chorus-pro-destination.d.ts +2 -2
  86. package/dist/models/client-activate-response.d.ts +28 -0
  87. package/dist/models/{facture-electronique-rest-api-schemas-validation-validation-error-response.d.ts → client-create-request.d.ts} +6 -4
  88. package/dist/models/client-detail.d.ts +48 -0
  89. package/dist/models/client-list-response.d.ts +33 -0
  90. package/dist/models/client-list-response.js +15 -0
  91. package/dist/models/client-summary.d.ts +48 -0
  92. package/dist/models/client-summary.js +15 -0
  93. package/dist/models/client-update-request.d.ts +19 -0
  94. package/dist/models/client-update-request.js +15 -0
  95. package/dist/models/encaissee-request.d.ts +39 -0
  96. package/dist/models/encaissee-request.js +15 -0
  97. package/dist/models/facture-electronique-rest-api-schemas-cdar-validation-error-response.d.ts +29 -0
  98. package/dist/models/facture-electronique-rest-api-schemas-cdar-validation-error-response.js +15 -0
  99. package/dist/models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.d.ts +24 -0
  100. package/dist/models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.js +15 -0
  101. package/dist/models/get-chorus-pro-id-request.d.ts +2 -2
  102. package/dist/models/get-invoice-request.d.ts +2 -2
  103. package/dist/models/get-structure-request.d.ts +2 -2
  104. package/dist/models/index.d.ts +15 -4
  105. package/dist/models/index.js +15 -4
  106. package/dist/models/payment-amount-by-rate.d.ts +2 -2
  107. package/dist/models/pdpconfig-response.d.ts +34 -0
  108. package/dist/models/pdpconfig-response.js +15 -0
  109. package/dist/models/pdpconfig-update-request.d.ts +40 -0
  110. package/dist/models/pdpconfig-update-request.js +15 -0
  111. package/dist/models/recipient.d.ts +1 -1
  112. package/dist/{esm/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.d.ts → models/refusee-request.d.ts} +16 -14
  113. package/dist/models/refusee-request.js +15 -0
  114. package/dist/models/scheme-id.d.ts +7 -7
  115. package/dist/models/scheme-id.js +7 -7
  116. package/dist/models/search-structure-request.d.ts +2 -2
  117. package/dist/models/{body-submit-cdar-api-v1-cdar-submit-post.d.ts → secret-status.d.ts} +12 -5
  118. package/dist/models/secret-status.js +15 -0
  119. package/dist/models/simplified-cdarresponse.d.ts +36 -0
  120. package/dist/models/simplified-cdarresponse.js +15 -0
  121. package/dist/models/submit-cdarrequest.d.ts +4 -0
  122. package/dist/models/submit-cdarxmlrequest.d.ts +4 -0
  123. package/dist/models/submit-complete-invoice-response.d.ts +1 -1
  124. package/dist/models/submit-invoice-request.d.ts +2 -2
  125. package/dist/models/supplier.d.ts +1 -1
  126. package/dist/models/validate-cdarresponse.d.ts +3 -3
  127. package/dist/models/validation-error-response.d.ts +3 -12
  128. package/dist/src/helpers/client.d.ts +45 -265
  129. package/dist/src/helpers/client.js +214 -784
  130. package/dist/src/helpers/exceptions.d.ts +3 -1
  131. package/dist/src/helpers/exceptions.js +7 -1
  132. package/dist/src/helpers/index.d.ts +1 -2
  133. package/dist/src/helpers/index.js +2 -12
  134. package/docs/AllowanceCharge.md +1 -1
  135. package/docs/Amount.md +1 -1
  136. package/docs/Amount1.md +1 -1
  137. package/docs/Amount2.md +19 -0
  138. package/docs/CDARCycleDeVieApi.md +126 -30
  139. package/docs/ChorusProCredentials.md +9 -9
  140. package/docs/ChorusProDestination.md +1 -1
  141. package/docs/ClientActivateResponse.md +25 -0
  142. package/docs/ClientCreateRequest.md +25 -0
  143. package/docs/ClientDetail.md +41 -0
  144. package/docs/ClientListResponse.md +27 -0
  145. package/docs/ClientManagementApi.md +483 -0
  146. package/docs/ClientSummary.md +41 -0
  147. package/docs/ClientUpdateRequest.md +25 -0
  148. package/docs/DownloadsApi.md +0 -115
  149. package/docs/EncaisseeRequest.md +39 -0
  150. package/docs/FactureElectroniqueRestApiSchemasCdarValidationErrorResponse.md +27 -0
  151. package/docs/FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md +29 -0
  152. package/docs/GetChorusProIdRequest.md +1 -1
  153. package/docs/GetInvoiceRequest.md +1 -1
  154. package/docs/GetStructureRequest.md +1 -1
  155. package/docs/PDPConfigResponse.md +47 -0
  156. package/docs/PDPConfigUpdateRequest.md +31 -0
  157. package/docs/PaymentAmountByRate.md +1 -1
  158. package/docs/Recipient.md +1 -1
  159. package/docs/RefuseeRequest.md +39 -0
  160. package/docs/SchemeID.md +4 -4
  161. package/docs/SearchStructureRequest.md +1 -1
  162. package/docs/SecretStatus.md +23 -0
  163. package/docs/SimplifiedCDARResponse.md +29 -0
  164. package/docs/SubmitCDARRequest.md +8 -0
  165. package/docs/SubmitCDARXMLRequest.md +8 -0
  166. package/docs/SubmitCompleteInvoiceResponse.md +2 -2
  167. package/docs/SubmitInvoiceRequest.md +1 -1
  168. package/docs/Supplier.md +1 -1
  169. package/docs/ValidateCDARResponse.md +2 -2
  170. package/docs/ValidationErrorResponse.md +3 -9
  171. package/models/allowance-charge.ts +2 -2
  172. package/models/amount.ts +1 -1
  173. package/models/amount1.ts +1 -1
  174. package/models/amount2.ts +22 -0
  175. package/models/chorus-pro-credentials.ts +19 -7
  176. package/models/chorus-pro-destination.ts +2 -2
  177. package/models/client-activate-response.ts +34 -0
  178. package/models/{facture-electronique-rest-api-schemas-validation-validation-error-response.ts → client-create-request.ts} +6 -4
  179. package/models/client-detail.ts +54 -0
  180. package/models/{body-submit-cdar-xml-api-v1-cdar-submit-xml-post.ts → client-list-response.ts} +21 -7
  181. package/models/client-summary.ts +54 -0
  182. package/models/client-update-request.ts +25 -0
  183. package/models/{facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.ts → encaissee-request.ts} +19 -14
  184. package/models/{body-submit-cdar-api-v1-cdar-submit-post.ts → facture-electronique-rest-api-schemas-cdar-validation-error-response.ts} +17 -9
  185. package/models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.ts +30 -0
  186. package/models/get-chorus-pro-id-request.ts +2 -2
  187. package/models/get-invoice-request.ts +2 -2
  188. package/models/get-structure-request.ts +2 -2
  189. package/models/index.ts +15 -4
  190. package/models/payment-amount-by-rate.ts +2 -2
  191. package/models/pdpconfig-response.ts +42 -0
  192. package/models/pdpconfig-update-request.ts +46 -0
  193. package/models/recipient.ts +1 -1
  194. package/models/refusee-request.ts +44 -0
  195. package/models/scheme-id.ts +7 -7
  196. package/models/search-structure-request.ts +2 -2
  197. package/models/secret-status.ts +30 -0
  198. package/models/simplified-cdarresponse.ts +42 -0
  199. package/models/submit-cdarrequest.ts +4 -0
  200. package/models/submit-cdarxmlrequest.ts +4 -0
  201. package/models/submit-complete-invoice-response.ts +1 -1
  202. package/models/submit-invoice-request.ts +2 -2
  203. package/models/supplier.ts +1 -1
  204. package/models/validate-cdarresponse.ts +3 -3
  205. package/models/validation-error-response.ts +3 -12
  206. package/package.json +1 -1
  207. package/src/helpers/client.ts +227 -832
  208. package/src/helpers/exceptions.ts +9 -1
  209. package/src/helpers/index.ts +1 -3
  210. package/dist/models/body-submit-cdar-xml-api-v1-cdar-submit-xml-post.d.ts +0 -17
  211. package/docs/BodySubmitCdarApiV1CdarSubmitPost.md +0 -22
  212. package/docs/BodySubmitCdarXmlApiV1CdarSubmitXmlPost.md +0 -22
  213. package/docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md +0 -29
  214. package/docs/FactureElectroniqueRestApiSchemasValidationValidationErrorResponse.md +0 -21
  215. /package/dist/esm/models/{body-submit-cdar-api-v1-cdar-submit-post.js → amount2.js} +0 -0
  216. /package/dist/esm/models/{body-submit-cdar-xml-api-v1-cdar-submit-xml-post.js → client-activate-response.js} +0 -0
  217. /package/dist/esm/models/{facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.js → client-create-request.js} +0 -0
  218. /package/dist/esm/models/{facture-electronique-rest-api-schemas-validation-validation-error-response.js → client-detail.js} +0 -0
  219. /package/dist/models/{body-submit-cdar-api-v1-cdar-submit-post.js → amount2.js} +0 -0
  220. /package/dist/models/{body-submit-cdar-xml-api-v1-cdar-submit-xml-post.js → client-activate-response.js} +0 -0
  221. /package/dist/models/{facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.js → client-create-request.js} +0 -0
  222. /package/dist/models/{facture-electronique-rest-api-schemas-validation-validation-error-response.js → client-detail.js} +0 -0
@@ -0,0 +1,642 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * FactPulse REST API
6
+ * 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/
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: contact@factpulse.fr
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ var __importDefault = (this && this.__importDefault) || function (mod) {
25
+ return (mod && mod.__esModule) ? mod : { "default": mod };
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.ClientManagementApi = exports.ClientManagementApiFactory = exports.ClientManagementApiFp = exports.ClientManagementApiAxiosParamCreator = void 0;
29
+ const axios_1 = __importDefault(require("axios"));
30
+ // Some imports not used depending on template conditions
31
+ // @ts-ignore
32
+ const common_1 = require("../common");
33
+ // @ts-ignore
34
+ const base_1 = require("../base");
35
+ /**
36
+ * ClientManagementApi - axios parameter creator
37
+ */
38
+ const ClientManagementApiAxiosParamCreator = function (configuration) {
39
+ return {
40
+ /**
41
+ * Activate a deactivated client. **Scope**: Client level (JWT with client_uid that must match {uid})
42
+ * @summary Activate a client
43
+ * @param {string} uid
44
+ * @param {*} [options] Override http request option.
45
+ * @throws {RequiredError}
46
+ */
47
+ activateClientApiV1ClientsUidActiverPost: (uid_1, ...args_1) => __awaiter(this, [uid_1, ...args_1], void 0, function* (uid, options = {}) {
48
+ // verify required parameter 'uid' is not null or undefined
49
+ (0, common_1.assertParamExists)('activateClientApiV1ClientsUidActiverPost', 'uid', uid);
50
+ const localVarPath = `/api/v1/clients/{uid}/activer`
51
+ .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
52
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
53
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
54
+ let baseOptions;
55
+ if (configuration) {
56
+ baseOptions = configuration.baseOptions;
57
+ }
58
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
59
+ const localVarHeaderParameter = {};
60
+ const localVarQueryParameter = {};
61
+ // authentication HTTPBearer required
62
+ // http bearer authentication required
63
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
64
+ localVarHeaderParameter['Accept'] = 'application/json';
65
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
66
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
67
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
68
+ return {
69
+ url: (0, common_1.toPathString)(localVarUrlObj),
70
+ options: localVarRequestOptions,
71
+ };
72
+ }),
73
+ /**
74
+ * 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)
75
+ * @summary Create a client
76
+ * @param {ClientCreateRequest} clientCreateRequest
77
+ * @param {*} [options] Override http request option.
78
+ * @throws {RequiredError}
79
+ */
80
+ createClientApiV1ClientsPost: (clientCreateRequest_1, ...args_1) => __awaiter(this, [clientCreateRequest_1, ...args_1], void 0, function* (clientCreateRequest, options = {}) {
81
+ // verify required parameter 'clientCreateRequest' is not null or undefined
82
+ (0, common_1.assertParamExists)('createClientApiV1ClientsPost', 'clientCreateRequest', clientCreateRequest);
83
+ const localVarPath = `/api/v1/clients`;
84
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
85
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
86
+ let baseOptions;
87
+ if (configuration) {
88
+ baseOptions = configuration.baseOptions;
89
+ }
90
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
91
+ const localVarHeaderParameter = {};
92
+ const localVarQueryParameter = {};
93
+ // authentication HTTPBearer required
94
+ // http bearer authentication required
95
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
96
+ localVarHeaderParameter['Content-Type'] = 'application/json';
97
+ localVarHeaderParameter['Accept'] = 'application/json';
98
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
99
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
100
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
101
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(clientCreateRequest, localVarRequestOptions, configuration);
102
+ return {
103
+ url: (0, common_1.toPathString)(localVarUrlObj),
104
+ options: localVarRequestOptions,
105
+ };
106
+ }),
107
+ /**
108
+ * 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.).
109
+ * @summary Deactivate a client
110
+ * @param {string} uid
111
+ * @param {*} [options] Override http request option.
112
+ * @throws {RequiredError}
113
+ */
114
+ deactivateClientApiV1ClientsUidDesactiverPost: (uid_1, ...args_1) => __awaiter(this, [uid_1, ...args_1], void 0, function* (uid, options = {}) {
115
+ // verify required parameter 'uid' is not null or undefined
116
+ (0, common_1.assertParamExists)('deactivateClientApiV1ClientsUidDesactiverPost', 'uid', uid);
117
+ const localVarPath = `/api/v1/clients/{uid}/desactiver`
118
+ .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
119
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
120
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
121
+ let baseOptions;
122
+ if (configuration) {
123
+ baseOptions = configuration.baseOptions;
124
+ }
125
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
126
+ const localVarHeaderParameter = {};
127
+ const localVarQueryParameter = {};
128
+ // authentication HTTPBearer required
129
+ // http bearer authentication required
130
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
131
+ localVarHeaderParameter['Accept'] = 'application/json';
132
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
133
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
134
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
135
+ return {
136
+ url: (0, common_1.toPathString)(localVarUrlObj),
137
+ options: localVarRequestOptions,
138
+ };
139
+ }),
140
+ /**
141
+ * 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.
142
+ * @summary Get client details
143
+ * @param {string} uid
144
+ * @param {*} [options] Override http request option.
145
+ * @throws {RequiredError}
146
+ */
147
+ getClientApiV1ClientsUidGet: (uid_1, ...args_1) => __awaiter(this, [uid_1, ...args_1], void 0, function* (uid, options = {}) {
148
+ // verify required parameter 'uid' is not null or undefined
149
+ (0, common_1.assertParamExists)('getClientApiV1ClientsUidGet', 'uid', uid);
150
+ const localVarPath = `/api/v1/clients/{uid}`
151
+ .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
152
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
153
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
154
+ let baseOptions;
155
+ if (configuration) {
156
+ baseOptions = configuration.baseOptions;
157
+ }
158
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
159
+ const localVarHeaderParameter = {};
160
+ const localVarQueryParameter = {};
161
+ // authentication HTTPBearer required
162
+ // http bearer authentication required
163
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
164
+ localVarHeaderParameter['Accept'] = 'application/json';
165
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
166
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
167
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
168
+ return {
169
+ url: (0, common_1.toPathString)(localVarUrlObj),
170
+ options: localVarRequestOptions,
171
+ };
172
+ }),
173
+ /**
174
+ * 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
175
+ * @summary Get client PDP configuration
176
+ * @param {string} uid
177
+ * @param {*} [options] Override http request option.
178
+ * @throws {RequiredError}
179
+ */
180
+ getPdpConfigApiV1ClientsUidPdpConfigGet: (uid_1, ...args_1) => __awaiter(this, [uid_1, ...args_1], void 0, function* (uid, options = {}) {
181
+ // verify required parameter 'uid' is not null or undefined
182
+ (0, common_1.assertParamExists)('getPdpConfigApiV1ClientsUidPdpConfigGet', 'uid', uid);
183
+ const localVarPath = `/api/v1/clients/{uid}/pdp-config`
184
+ .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
185
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
186
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
187
+ let baseOptions;
188
+ if (configuration) {
189
+ baseOptions = configuration.baseOptions;
190
+ }
191
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
192
+ const localVarHeaderParameter = {};
193
+ const localVarQueryParameter = {};
194
+ // authentication HTTPBearer required
195
+ // http bearer authentication required
196
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
197
+ localVarHeaderParameter['Accept'] = 'application/json';
198
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
199
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
200
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
201
+ return {
202
+ url: (0, common_1.toPathString)(localVarUrlObj),
203
+ options: localVarRequestOptions,
204
+ };
205
+ }),
206
+ /**
207
+ * 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)
208
+ * @summary List clients
209
+ * @param {number} [page] Page number
210
+ * @param {number} [pageSize] Page size
211
+ * @param {*} [options] Override http request option.
212
+ * @throws {RequiredError}
213
+ */
214
+ listClientsApiV1ClientsGet: (page_1, pageSize_1, ...args_1) => __awaiter(this, [page_1, pageSize_1, ...args_1], void 0, function* (page, pageSize, options = {}) {
215
+ const localVarPath = `/api/v1/clients`;
216
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
217
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
218
+ let baseOptions;
219
+ if (configuration) {
220
+ baseOptions = configuration.baseOptions;
221
+ }
222
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
223
+ const localVarHeaderParameter = {};
224
+ const localVarQueryParameter = {};
225
+ // authentication HTTPBearer required
226
+ // http bearer authentication required
227
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
228
+ if (page !== undefined) {
229
+ localVarQueryParameter['page'] = page;
230
+ }
231
+ if (pageSize !== undefined) {
232
+ localVarQueryParameter['pageSize'] = pageSize;
233
+ }
234
+ localVarHeaderParameter['Accept'] = 'application/json';
235
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
236
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
237
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
238
+ return {
239
+ url: (0, common_1.toPathString)(localVarUrlObj),
240
+ options: localVarRequestOptions,
241
+ };
242
+ }),
243
+ /**
244
+ * 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.
245
+ * @summary Update a client
246
+ * @param {string} uid
247
+ * @param {ClientUpdateRequest} clientUpdateRequest
248
+ * @param {*} [options] Override http request option.
249
+ * @throws {RequiredError}
250
+ */
251
+ updateClientApiV1ClientsUidPatch: (uid_1, clientUpdateRequest_1, ...args_1) => __awaiter(this, [uid_1, clientUpdateRequest_1, ...args_1], void 0, function* (uid, clientUpdateRequest, options = {}) {
252
+ // verify required parameter 'uid' is not null or undefined
253
+ (0, common_1.assertParamExists)('updateClientApiV1ClientsUidPatch', 'uid', uid);
254
+ // verify required parameter 'clientUpdateRequest' is not null or undefined
255
+ (0, common_1.assertParamExists)('updateClientApiV1ClientsUidPatch', 'clientUpdateRequest', clientUpdateRequest);
256
+ const localVarPath = `/api/v1/clients/{uid}`
257
+ .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
258
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
259
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
260
+ let baseOptions;
261
+ if (configuration) {
262
+ baseOptions = configuration.baseOptions;
263
+ }
264
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
265
+ const localVarHeaderParameter = {};
266
+ const localVarQueryParameter = {};
267
+ // authentication HTTPBearer required
268
+ // http bearer authentication required
269
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
270
+ localVarHeaderParameter['Content-Type'] = 'application/json';
271
+ localVarHeaderParameter['Accept'] = 'application/json';
272
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
273
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
274
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
275
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(clientUpdateRequest, localVarRequestOptions, configuration);
276
+ return {
277
+ url: (0, common_1.toPathString)(localVarUrlObj),
278
+ options: localVarRequestOptions,
279
+ };
280
+ }),
281
+ /**
282
+ * 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.
283
+ * @summary Configure client PDP
284
+ * @param {string} uid
285
+ * @param {PDPConfigUpdateRequest} pDPConfigUpdateRequest
286
+ * @param {*} [options] Override http request option.
287
+ * @throws {RequiredError}
288
+ */
289
+ updatePdpConfigApiV1ClientsUidPdpConfigPut: (uid_1, pDPConfigUpdateRequest_1, ...args_1) => __awaiter(this, [uid_1, pDPConfigUpdateRequest_1, ...args_1], void 0, function* (uid, pDPConfigUpdateRequest, options = {}) {
290
+ // verify required parameter 'uid' is not null or undefined
291
+ (0, common_1.assertParamExists)('updatePdpConfigApiV1ClientsUidPdpConfigPut', 'uid', uid);
292
+ // verify required parameter 'pDPConfigUpdateRequest' is not null or undefined
293
+ (0, common_1.assertParamExists)('updatePdpConfigApiV1ClientsUidPdpConfigPut', 'pDPConfigUpdateRequest', pDPConfigUpdateRequest);
294
+ const localVarPath = `/api/v1/clients/{uid}/pdp-config`
295
+ .replace(`{${"uid"}}`, encodeURIComponent(String(uid)));
296
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
297
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
298
+ let baseOptions;
299
+ if (configuration) {
300
+ baseOptions = configuration.baseOptions;
301
+ }
302
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
303
+ const localVarHeaderParameter = {};
304
+ const localVarQueryParameter = {};
305
+ // authentication HTTPBearer required
306
+ // http bearer authentication required
307
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
308
+ localVarHeaderParameter['Content-Type'] = 'application/json';
309
+ localVarHeaderParameter['Accept'] = 'application/json';
310
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
311
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
312
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
313
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(pDPConfigUpdateRequest, localVarRequestOptions, configuration);
314
+ return {
315
+ url: (0, common_1.toPathString)(localVarUrlObj),
316
+ options: localVarRequestOptions,
317
+ };
318
+ }),
319
+ };
320
+ };
321
+ exports.ClientManagementApiAxiosParamCreator = ClientManagementApiAxiosParamCreator;
322
+ /**
323
+ * ClientManagementApi - functional programming interface
324
+ */
325
+ const ClientManagementApiFp = function (configuration) {
326
+ const localVarAxiosParamCreator = (0, exports.ClientManagementApiAxiosParamCreator)(configuration);
327
+ return {
328
+ /**
329
+ * Activate a deactivated client. **Scope**: Client level (JWT with client_uid that must match {uid})
330
+ * @summary Activate a client
331
+ * @param {string} uid
332
+ * @param {*} [options] Override http request option.
333
+ * @throws {RequiredError}
334
+ */
335
+ activateClientApiV1ClientsUidActiverPost(uid, options) {
336
+ return __awaiter(this, void 0, void 0, function* () {
337
+ var _a, _b, _c;
338
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.activateClientApiV1ClientsUidActiverPost(uid, options);
339
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
340
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClientManagementApi.activateClientApiV1ClientsUidActiverPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
341
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
342
+ });
343
+ },
344
+ /**
345
+ * 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)
346
+ * @summary Create a client
347
+ * @param {ClientCreateRequest} clientCreateRequest
348
+ * @param {*} [options] Override http request option.
349
+ * @throws {RequiredError}
350
+ */
351
+ createClientApiV1ClientsPost(clientCreateRequest, options) {
352
+ return __awaiter(this, void 0, void 0, function* () {
353
+ var _a, _b, _c;
354
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createClientApiV1ClientsPost(clientCreateRequest, options);
355
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
356
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClientManagementApi.createClientApiV1ClientsPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
357
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
358
+ });
359
+ },
360
+ /**
361
+ * 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.).
362
+ * @summary Deactivate a client
363
+ * @param {string} uid
364
+ * @param {*} [options] Override http request option.
365
+ * @throws {RequiredError}
366
+ */
367
+ deactivateClientApiV1ClientsUidDesactiverPost(uid, options) {
368
+ return __awaiter(this, void 0, void 0, function* () {
369
+ var _a, _b, _c;
370
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deactivateClientApiV1ClientsUidDesactiverPost(uid, options);
371
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
372
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClientManagementApi.deactivateClientApiV1ClientsUidDesactiverPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
373
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
374
+ });
375
+ },
376
+ /**
377
+ * 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.
378
+ * @summary Get client details
379
+ * @param {string} uid
380
+ * @param {*} [options] Override http request option.
381
+ * @throws {RequiredError}
382
+ */
383
+ getClientApiV1ClientsUidGet(uid, options) {
384
+ return __awaiter(this, void 0, void 0, function* () {
385
+ var _a, _b, _c;
386
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getClientApiV1ClientsUidGet(uid, options);
387
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
388
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClientManagementApi.getClientApiV1ClientsUidGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
389
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
390
+ });
391
+ },
392
+ /**
393
+ * 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
394
+ * @summary Get client PDP configuration
395
+ * @param {string} uid
396
+ * @param {*} [options] Override http request option.
397
+ * @throws {RequiredError}
398
+ */
399
+ getPdpConfigApiV1ClientsUidPdpConfigGet(uid, options) {
400
+ return __awaiter(this, void 0, void 0, function* () {
401
+ var _a, _b, _c;
402
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getPdpConfigApiV1ClientsUidPdpConfigGet(uid, options);
403
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
404
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClientManagementApi.getPdpConfigApiV1ClientsUidPdpConfigGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
405
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
406
+ });
407
+ },
408
+ /**
409
+ * 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)
410
+ * @summary List clients
411
+ * @param {number} [page] Page number
412
+ * @param {number} [pageSize] Page size
413
+ * @param {*} [options] Override http request option.
414
+ * @throws {RequiredError}
415
+ */
416
+ listClientsApiV1ClientsGet(page, pageSize, options) {
417
+ return __awaiter(this, void 0, void 0, function* () {
418
+ var _a, _b, _c;
419
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listClientsApiV1ClientsGet(page, pageSize, options);
420
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
421
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClientManagementApi.listClientsApiV1ClientsGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
422
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
423
+ });
424
+ },
425
+ /**
426
+ * 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.
427
+ * @summary Update a client
428
+ * @param {string} uid
429
+ * @param {ClientUpdateRequest} clientUpdateRequest
430
+ * @param {*} [options] Override http request option.
431
+ * @throws {RequiredError}
432
+ */
433
+ updateClientApiV1ClientsUidPatch(uid, clientUpdateRequest, options) {
434
+ return __awaiter(this, void 0, void 0, function* () {
435
+ var _a, _b, _c;
436
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateClientApiV1ClientsUidPatch(uid, clientUpdateRequest, options);
437
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
438
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClientManagementApi.updateClientApiV1ClientsUidPatch']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
439
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
440
+ });
441
+ },
442
+ /**
443
+ * 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.
444
+ * @summary Configure client PDP
445
+ * @param {string} uid
446
+ * @param {PDPConfigUpdateRequest} pDPConfigUpdateRequest
447
+ * @param {*} [options] Override http request option.
448
+ * @throws {RequiredError}
449
+ */
450
+ updatePdpConfigApiV1ClientsUidPdpConfigPut(uid, pDPConfigUpdateRequest, options) {
451
+ return __awaiter(this, void 0, void 0, function* () {
452
+ var _a, _b, _c;
453
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updatePdpConfigApiV1ClientsUidPdpConfigPut(uid, pDPConfigUpdateRequest, options);
454
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
455
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ClientManagementApi.updatePdpConfigApiV1ClientsUidPdpConfigPut']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
456
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
457
+ });
458
+ },
459
+ };
460
+ };
461
+ exports.ClientManagementApiFp = ClientManagementApiFp;
462
+ /**
463
+ * ClientManagementApi - factory interface
464
+ */
465
+ const ClientManagementApiFactory = function (configuration, basePath, axios) {
466
+ const localVarFp = (0, exports.ClientManagementApiFp)(configuration);
467
+ return {
468
+ /**
469
+ * Activate a deactivated client. **Scope**: Client level (JWT with client_uid that must match {uid})
470
+ * @summary Activate a client
471
+ * @param {string} uid
472
+ * @param {*} [options] Override http request option.
473
+ * @throws {RequiredError}
474
+ */
475
+ activateClientApiV1ClientsUidActiverPost(uid, options) {
476
+ return localVarFp.activateClientApiV1ClientsUidActiverPost(uid, options).then((request) => request(axios, basePath));
477
+ },
478
+ /**
479
+ * 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)
480
+ * @summary Create a client
481
+ * @param {ClientCreateRequest} clientCreateRequest
482
+ * @param {*} [options] Override http request option.
483
+ * @throws {RequiredError}
484
+ */
485
+ createClientApiV1ClientsPost(clientCreateRequest, options) {
486
+ return localVarFp.createClientApiV1ClientsPost(clientCreateRequest, options).then((request) => request(axios, basePath));
487
+ },
488
+ /**
489
+ * 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.).
490
+ * @summary Deactivate a client
491
+ * @param {string} uid
492
+ * @param {*} [options] Override http request option.
493
+ * @throws {RequiredError}
494
+ */
495
+ deactivateClientApiV1ClientsUidDesactiverPost(uid, options) {
496
+ return localVarFp.deactivateClientApiV1ClientsUidDesactiverPost(uid, options).then((request) => request(axios, basePath));
497
+ },
498
+ /**
499
+ * 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.
500
+ * @summary Get client details
501
+ * @param {string} uid
502
+ * @param {*} [options] Override http request option.
503
+ * @throws {RequiredError}
504
+ */
505
+ getClientApiV1ClientsUidGet(uid, options) {
506
+ return localVarFp.getClientApiV1ClientsUidGet(uid, options).then((request) => request(axios, basePath));
507
+ },
508
+ /**
509
+ * 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
510
+ * @summary Get client PDP configuration
511
+ * @param {string} uid
512
+ * @param {*} [options] Override http request option.
513
+ * @throws {RequiredError}
514
+ */
515
+ getPdpConfigApiV1ClientsUidPdpConfigGet(uid, options) {
516
+ return localVarFp.getPdpConfigApiV1ClientsUidPdpConfigGet(uid, options).then((request) => request(axios, basePath));
517
+ },
518
+ /**
519
+ * 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)
520
+ * @summary List clients
521
+ * @param {number} [page] Page number
522
+ * @param {number} [pageSize] Page size
523
+ * @param {*} [options] Override http request option.
524
+ * @throws {RequiredError}
525
+ */
526
+ listClientsApiV1ClientsGet(page, pageSize, options) {
527
+ return localVarFp.listClientsApiV1ClientsGet(page, pageSize, options).then((request) => request(axios, basePath));
528
+ },
529
+ /**
530
+ * 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.
531
+ * @summary Update a client
532
+ * @param {string} uid
533
+ * @param {ClientUpdateRequest} clientUpdateRequest
534
+ * @param {*} [options] Override http request option.
535
+ * @throws {RequiredError}
536
+ */
537
+ updateClientApiV1ClientsUidPatch(uid, clientUpdateRequest, options) {
538
+ return localVarFp.updateClientApiV1ClientsUidPatch(uid, clientUpdateRequest, options).then((request) => request(axios, basePath));
539
+ },
540
+ /**
541
+ * 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.
542
+ * @summary Configure client PDP
543
+ * @param {string} uid
544
+ * @param {PDPConfigUpdateRequest} pDPConfigUpdateRequest
545
+ * @param {*} [options] Override http request option.
546
+ * @throws {RequiredError}
547
+ */
548
+ updatePdpConfigApiV1ClientsUidPdpConfigPut(uid, pDPConfigUpdateRequest, options) {
549
+ return localVarFp.updatePdpConfigApiV1ClientsUidPdpConfigPut(uid, pDPConfigUpdateRequest, options).then((request) => request(axios, basePath));
550
+ },
551
+ };
552
+ };
553
+ exports.ClientManagementApiFactory = ClientManagementApiFactory;
554
+ /**
555
+ * ClientManagementApi - object-oriented interface
556
+ */
557
+ class ClientManagementApi extends base_1.BaseAPI {
558
+ /**
559
+ * Activate a deactivated client. **Scope**: Client level (JWT with client_uid that must match {uid})
560
+ * @summary Activate a client
561
+ * @param {string} uid
562
+ * @param {*} [options] Override http request option.
563
+ * @throws {RequiredError}
564
+ */
565
+ activateClientApiV1ClientsUidActiverPost(uid, options) {
566
+ return (0, exports.ClientManagementApiFp)(this.configuration).activateClientApiV1ClientsUidActiverPost(uid, options).then((request) => request(this.axios, this.basePath));
567
+ }
568
+ /**
569
+ * 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)
570
+ * @summary Create a client
571
+ * @param {ClientCreateRequest} clientCreateRequest
572
+ * @param {*} [options] Override http request option.
573
+ * @throws {RequiredError}
574
+ */
575
+ createClientApiV1ClientsPost(clientCreateRequest, options) {
576
+ return (0, exports.ClientManagementApiFp)(this.configuration).createClientApiV1ClientsPost(clientCreateRequest, options).then((request) => request(this.axios, this.basePath));
577
+ }
578
+ /**
579
+ * 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.).
580
+ * @summary Deactivate a client
581
+ * @param {string} uid
582
+ * @param {*} [options] Override http request option.
583
+ * @throws {RequiredError}
584
+ */
585
+ deactivateClientApiV1ClientsUidDesactiverPost(uid, options) {
586
+ return (0, exports.ClientManagementApiFp)(this.configuration).deactivateClientApiV1ClientsUidDesactiverPost(uid, options).then((request) => request(this.axios, this.basePath));
587
+ }
588
+ /**
589
+ * 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.
590
+ * @summary Get client details
591
+ * @param {string} uid
592
+ * @param {*} [options] Override http request option.
593
+ * @throws {RequiredError}
594
+ */
595
+ getClientApiV1ClientsUidGet(uid, options) {
596
+ return (0, exports.ClientManagementApiFp)(this.configuration).getClientApiV1ClientsUidGet(uid, options).then((request) => request(this.axios, this.basePath));
597
+ }
598
+ /**
599
+ * 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
600
+ * @summary Get client PDP configuration
601
+ * @param {string} uid
602
+ * @param {*} [options] Override http request option.
603
+ * @throws {RequiredError}
604
+ */
605
+ getPdpConfigApiV1ClientsUidPdpConfigGet(uid, options) {
606
+ return (0, exports.ClientManagementApiFp)(this.configuration).getPdpConfigApiV1ClientsUidPdpConfigGet(uid, options).then((request) => request(this.axios, this.basePath));
607
+ }
608
+ /**
609
+ * 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)
610
+ * @summary List clients
611
+ * @param {number} [page] Page number
612
+ * @param {number} [pageSize] Page size
613
+ * @param {*} [options] Override http request option.
614
+ * @throws {RequiredError}
615
+ */
616
+ listClientsApiV1ClientsGet(page, pageSize, options) {
617
+ return (0, exports.ClientManagementApiFp)(this.configuration).listClientsApiV1ClientsGet(page, pageSize, options).then((request) => request(this.axios, this.basePath));
618
+ }
619
+ /**
620
+ * 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.
621
+ * @summary Update a client
622
+ * @param {string} uid
623
+ * @param {ClientUpdateRequest} clientUpdateRequest
624
+ * @param {*} [options] Override http request option.
625
+ * @throws {RequiredError}
626
+ */
627
+ updateClientApiV1ClientsUidPatch(uid, clientUpdateRequest, options) {
628
+ return (0, exports.ClientManagementApiFp)(this.configuration).updateClientApiV1ClientsUidPatch(uid, clientUpdateRequest, options).then((request) => request(this.axios, this.basePath));
629
+ }
630
+ /**
631
+ * 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.
632
+ * @summary Configure client PDP
633
+ * @param {string} uid
634
+ * @param {PDPConfigUpdateRequest} pDPConfigUpdateRequest
635
+ * @param {*} [options] Override http request option.
636
+ * @throws {RequiredError}
637
+ */
638
+ updatePdpConfigApiV1ClientsUidPdpConfigPut(uid, pDPConfigUpdateRequest, options) {
639
+ return (0, exports.ClientManagementApiFp)(this.configuration).updatePdpConfigApiV1ClientsUidPdpConfigPut(uid, pDPConfigUpdateRequest, options).then((request) => request(this.axios, this.basePath));
640
+ }
641
+ }
642
+ exports.ClientManagementApi = ClientManagementApi;