@persei/perseed-api 5.0.19 → 5.0.20

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 (143) hide show
  1. package/dist/client.cjs +780 -71
  2. package/dist/client.cjs.map +1 -1
  3. package/dist/client.mjs +781 -72
  4. package/dist/client.mjs.map +1 -1
  5. package/dist/ecosystem-action-system.cjs +506 -0
  6. package/dist/ecosystem-action-system.cjs.map +1 -0
  7. package/dist/ecosystem-action-system.d.ts +1 -0
  8. package/dist/ecosystem-action-system.mjs +506 -0
  9. package/dist/ecosystem-action-system.mjs.map +1 -0
  10. package/dist/lib/src/client/customFetch.d.ts +51 -0
  11. package/dist/lib/src/client/customFetch.d.ts.map +1 -0
  12. package/dist/lib/src/client/customFetch.test.d.ts +2 -0
  13. package/dist/lib/src/client/customFetch.test.d.ts.map +1 -0
  14. package/dist/lib/src/client/index.d.ts +1 -0
  15. package/dist/lib/src/client/index.d.ts.map +1 -1
  16. package/dist/lib/src/generated/client.d.ts +4742 -678
  17. package/dist/lib/src/generated/client.d.ts.map +1 -1
  18. package/dist/src/Services/AuthenticationSecurityService.d.ts +1 -1
  19. package/dist/src/Services/MobileService.d.ts +26 -1
  20. package/dist/src/Services/MobileService.d.ts.map +1 -1
  21. package/dist/src/Services/ProcessLogService.d.ts.map +1 -1
  22. package/dist/src/Services/ProjectService.d.ts.map +1 -1
  23. package/dist/src/Services/RedisQueueService.d.ts +16 -0
  24. package/dist/src/Services/RedisQueueService.d.ts.map +1 -1
  25. package/dist/src/Services/TriggerProcessLogService.d.ts +90 -0
  26. package/dist/src/Services/TriggerProcessLogService.d.ts.map +1 -0
  27. package/dist/src/Services/TriggerService.d.ts +16 -11
  28. package/dist/src/Services/TriggerService.d.ts.map +1 -1
  29. package/dist/src/Services/trigger-process-log-service.test.d.ts +2 -0
  30. package/dist/src/Services/trigger-process-log-service.test.d.ts.map +1 -0
  31. package/dist/src/controllers/AuthController.d.ts.map +1 -1
  32. package/dist/src/controllers/FormController.d.ts.map +1 -1
  33. package/dist/src/helpers/error.d.ts +12 -0
  34. package/dist/src/helpers/error.d.ts.map +1 -1
  35. package/dist/src/lib.d.ts +1 -0
  36. package/dist/src/lib.d.ts.map +1 -1
  37. package/dist/src/models/ecosystem/ProcessLog.d.ts +11 -0
  38. package/dist/src/models/ecosystem/ProcessLog.d.ts.map +1 -1
  39. package/dist/src/models/ecosystem/ProcessLog.test.d.ts +2 -0
  40. package/dist/src/models/ecosystem/ProcessLog.test.d.ts.map +1 -0
  41. package/dist/src/models/project/DesignerCrf.d.ts +3 -2
  42. package/dist/src/models/project/DesignerCrf.d.ts.map +1 -1
  43. package/dist/src/models/project/designer-crf-after-save.test.d.ts +2 -0
  44. package/dist/src/models/project/designer-crf-after-save.test.d.ts.map +1 -0
  45. package/dist/src/module.d.ts +5 -0
  46. package/dist/src/schemas/notification_configuration/types.d.ts +19 -8
  47. package/dist/src/schemas/notification_configuration/types.d.ts.map +1 -1
  48. package/dist/src/schemas/process_log/create_process_log_payload.schema.json +4 -0
  49. package/dist/src/schemas/process_log/types.d.ts +3 -0
  50. package/dist/src/schemas/process_log/types.d.ts.map +1 -1
  51. package/dist/src/v2/modules/ecosystem/action-system/action-system.controller/action-system.controller.e2e.d.ts +2 -0
  52. package/dist/src/v2/modules/ecosystem/action-system/action-system.controller/action-system.controller.e2e.d.ts.map +1 -0
  53. package/dist/src/v2/modules/ecosystem/action-system/action-system.controller/action-system.controller.test.d.ts +2 -0
  54. package/dist/src/v2/modules/ecosystem/action-system/action-system.controller/action-system.controller.test.d.ts.map +1 -0
  55. package/dist/src/v2/modules/ecosystem/action-system/action-system.controller/action.controller.d.ts +3 -0
  56. package/dist/src/v2/modules/ecosystem/action-system/action-system.controller/action.controller.d.ts.map +1 -0
  57. package/dist/src/v2/modules/ecosystem/action-system/action-system.controller/automatic-trigger.controller.d.ts +3 -0
  58. package/dist/src/v2/modules/ecosystem/action-system/action-system.controller/automatic-trigger.controller.d.ts.map +1 -0
  59. package/dist/src/v2/modules/ecosystem/action-system/action-system.controller/index.d.ts +6 -0
  60. package/dist/src/v2/modules/ecosystem/action-system/action-system.controller/index.d.ts.map +1 -0
  61. package/dist/src/v2/modules/ecosystem/action-system/action-system.controller/manual-trigger.controller.d.ts +3 -0
  62. package/dist/src/v2/modules/ecosystem/action-system/action-system.controller/manual-trigger.controller.d.ts.map +1 -0
  63. package/dist/src/v2/modules/ecosystem/action-system/action-system.helper/action-system.helper.d.ts +127 -0
  64. package/dist/src/v2/modules/ecosystem/action-system/action-system.helper/action-system.helper.d.ts.map +1 -0
  65. package/dist/src/v2/modules/ecosystem/action-system/action-system.helper/action-system.helper.test.d.ts +2 -0
  66. package/dist/src/v2/modules/ecosystem/action-system/action-system.helper/action-system.helper.test.d.ts.map +1 -0
  67. package/dist/src/v2/modules/ecosystem/action-system/action-system.helper/conditions-matcher.helper.d.ts +5 -0
  68. package/dist/src/v2/modules/ecosystem/action-system/action-system.helper/conditions-matcher.helper.d.ts.map +1 -0
  69. package/dist/src/v2/modules/ecosystem/action-system/action-system.helper/conditions-matcher.helper.test.d.ts +2 -0
  70. package/dist/src/v2/modules/ecosystem/action-system/action-system.helper/conditions-matcher.helper.test.d.ts.map +1 -0
  71. package/dist/src/{Services/ConditionsMatcher/CustomConditionsFormat.d.ts → v2/modules/ecosystem/action-system/action-system.helper/custom-conditions-format.helper.d.ts} +2 -2
  72. package/dist/src/v2/modules/ecosystem/action-system/action-system.helper/custom-conditions-format.helper.d.ts.map +1 -0
  73. package/dist/src/v2/modules/ecosystem/action-system/action-system.helper/custom-conditions-format.helper.test.d.ts +2 -0
  74. package/dist/src/v2/modules/ecosystem/action-system/action-system.helper/custom-conditions-format.helper.test.d.ts.map +1 -0
  75. package/dist/src/v2/modules/ecosystem/action-system/action-system.helper/index.d.ts +4 -0
  76. package/dist/src/v2/modules/ecosystem/action-system/action-system.helper/index.d.ts.map +1 -0
  77. package/dist/src/v2/modules/ecosystem/action-system/action-system.model.d.ts +121 -0
  78. package/dist/src/v2/modules/ecosystem/action-system/action-system.model.d.ts.map +1 -0
  79. package/dist/src/v2/modules/ecosystem/action-system/action-system.schema.d.ts +579 -0
  80. package/dist/src/v2/modules/ecosystem/action-system/action-system.schema.d.ts.map +1 -0
  81. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/action-system.service.d.ts +37 -0
  82. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/action-system.service.d.ts.map +1 -0
  83. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/action-system.service.e2e.d.ts +2 -0
  84. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/action-system.service.e2e.d.ts.map +1 -0
  85. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/action-system.service.test.d.ts +2 -0
  86. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/action-system.service.test.d.ts.map +1 -0
  87. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/action.service.d.ts +18 -0
  88. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/action.service.d.ts.map +1 -0
  89. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/action.service.test.d.ts +2 -0
  90. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/action.service.test.d.ts.map +1 -0
  91. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/automatic-trigger.service.d.ts +137 -0
  92. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/automatic-trigger.service.d.ts.map +1 -0
  93. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/automatic-trigger.service.test.d.ts +2 -0
  94. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/automatic-trigger.service.test.d.ts.map +1 -0
  95. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/index.d.ts +8 -0
  96. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/index.d.ts.map +1 -0
  97. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/manual-trigger-engine.service.d.ts +28 -0
  98. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/manual-trigger-engine.service.d.ts.map +1 -0
  99. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/manual-trigger-engine.service.test.d.ts +2 -0
  100. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/manual-trigger-engine.service.test.d.ts.map +1 -0
  101. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/manual-trigger.service.d.ts +137 -0
  102. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/manual-trigger.service.d.ts.map +1 -0
  103. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/manual-trigger.service.test.d.ts +2 -0
  104. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/manual-trigger.service.test.d.ts.map +1 -0
  105. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/trigger-actions.service.d.ts +31 -0
  106. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/trigger-actions.service.d.ts.map +1 -0
  107. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/trigger-actions.service.test.d.ts +2 -0
  108. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/trigger-actions.service.test.d.ts.map +1 -0
  109. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/trigger-engine.service.d.ts +52 -0
  110. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/trigger-engine.service.d.ts.map +1 -0
  111. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/trigger-engine.service.test.d.ts +2 -0
  112. package/dist/src/v2/modules/ecosystem/action-system/action-system.service/trigger-engine.service.test.d.ts.map +1 -0
  113. package/dist/src/v2/modules/ecosystem/action-system/index.d.ts +6 -0
  114. package/dist/src/v2/modules/ecosystem/action-system/index.d.ts.map +1 -0
  115. package/dist/src/v2/modules/ecosystem/action-system/lib.d.ts +2 -0
  116. package/dist/src/v2/modules/ecosystem/action-system/lib.d.ts.map +1 -0
  117. package/dist/src/v2/modules/global/api-error/api-error.schema.d.ts +9 -0
  118. package/dist/src/v2/modules/global/api-error/api-error.schema.d.ts.map +1 -1
  119. package/dist/src/v2/modules/global/e2e-operation/e2e-operation.service.d.ts.map +1 -1
  120. package/dist/src/v2/modules/global/request-log/request-log.middleware.d.ts.map +1 -1
  121. package/dist/src/v2/modules/project/document/document.controller.d.ts.map +1 -1
  122. package/dist/src/v2/modules/project/thryve/thryve.controller.d.ts.map +1 -1
  123. package/dist/src/v2/modules/project/thryve/thryve.service.d.ts +16 -4
  124. package/dist/src/v2/modules/project/thryve/thryve.service.d.ts.map +1 -1
  125. package/dist/src/v2/routes/v2/e2e/index.d.ts.map +1 -1
  126. package/dist/src/v2/routes/v2/ecosystem/_ecosystemName/project/_projectName/action/index.d.ts +3 -0
  127. package/dist/src/v2/routes/v2/ecosystem/_ecosystemName/project/_projectName/action/index.d.ts.map +1 -0
  128. package/dist/src/v2/routes/v2/ecosystem/_ecosystemName/project/_projectName/automatic-trigger/index.d.ts +3 -0
  129. package/dist/src/v2/routes/v2/ecosystem/_ecosystemName/project/_projectName/automatic-trigger/index.d.ts.map +1 -0
  130. package/dist/src/v2/routes/v2/ecosystem/_ecosystemName/project/_projectName/manual-trigger/index.d.ts +3 -0
  131. package/dist/src/v2/routes/v2/ecosystem/_ecosystemName/project/_projectName/manual-trigger/index.d.ts.map +1 -0
  132. package/dist/v1/perseed-api.cjs +8 -11
  133. package/dist/v1/perseed-api.cjs.map +1 -1
  134. package/dist/v1/perseed-api.mjs +7 -10
  135. package/dist/v1/perseed-api.mjs.map +1 -1
  136. package/package.json +1 -1
  137. package/dist/src/Services/ConditionsMatcher/CustomConditionsFormat.d.ts.map +0 -1
  138. package/dist/src/Services/ConditionsMatcher/index.d.ts +0 -4
  139. package/dist/src/Services/ConditionsMatcher/index.d.ts.map +0 -1
  140. package/dist/src/Services/conditions-matcher.test.d.ts +0 -2
  141. package/dist/src/Services/conditions-matcher.test.d.ts.map +0 -1
  142. package/dist/src/Services/custom-conditions-format.test.d.ts +0 -2
  143. package/dist/src/Services/custom-conditions-format.test.d.ts.map +0 -1
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Orval mutator for the generated fetch client (`src/generated/client.ts`).
3
+ *
4
+ * Centralizes base URL composition, `Authorization` header injection, and
5
+ * response decoding/error handling for every generated operation, so
6
+ * consumers (the `front` repo) can call the generated functions directly
7
+ * without a bespoke glue layer (see `front/packages/perseed-api-client/src/generatedClient.ts`,
8
+ * which this replaces — api's owner requested moving this logic here in MR !109).
9
+ */
10
+ /**
11
+ * Thrown by {@link customFetch} when the response status is not in the 2xx range. Carries the
12
+ * HTTP `status` and the parsed error body (when present) so consumers can branch on the failure
13
+ * without having to re-parse anything (e.g. the front's `isEndpointUnavailable`).
14
+ */
15
+ export declare class GeneratedClientError extends Error {
16
+ status: number;
17
+ body?: unknown;
18
+ constructor(status: number, body?: unknown);
19
+ }
20
+ export interface ClientRuntimeConfig {
21
+ /** Absolute base URL of the API, e.g. `https://api.perseed.eu`. */
22
+ baseUrl: string;
23
+ /**
24
+ * Returns the session token to use for the *current* call, or `undefined` if unauthenticated.
25
+ * A function (not a static token) so the runtime always reads the token in effect at call
26
+ * time — avoiding a stale-token capture without depending on React or any specific state
27
+ * management.
28
+ */
29
+ getToken?: () => string | undefined;
30
+ }
31
+ /** Configures the base URL and token accessor used by every generated operation. */
32
+ export declare function configureGeneratedClient(cfg: ClientRuntimeConfig): void;
33
+ /**
34
+ * Mutator invoked by every generated operation in `src/generated/client.ts`. Composes the
35
+ * absolute URL from the configured base URL, injects `Authorization: Bearer <token>` when a
36
+ * token is available, performs the request, and decodes the response the same way the previous
37
+ * front-side `fetchGenerated` did (null body for 204/205/304, JSON otherwise). A non-2xx response
38
+ * throws a {@link GeneratedClientError} instead of resolving, so callers get a rejected promise
39
+ * for every failed request.
40
+ *
41
+ * `T` here is orval's own per-operation response union (e.g. `listActionsResponse`, shaped as
42
+ * `{ data, status, headers }` discriminated by `status`), not the bare payload type — orval calls
43
+ * this mutator as `customFetch<listActionsResponse>(url, init)` and uses its return value
44
+ * directly as the operation's return value. Confirmed empirically by regenerating the client and
45
+ * inspecting `src/generated/client.ts`. The cast below is unavoidable: at runtime we only know the
46
+ * status/data/headers triple, not which member of the union it narrows to — that narrowing is the
47
+ * server's contract with the generated types, not something this generic transport layer can (or
48
+ * should) re-verify.
49
+ */
50
+ export declare function customFetch<T>(url: string, options: RequestInit): Promise<T>;
51
+ //# sourceMappingURL=customFetch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customFetch.d.ts","sourceRoot":"","sources":["../../../../src/client/customFetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,OAAO,CAAA;gBAEF,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO;CAe3C;AAED,MAAM,WAAW,mBAAmB;IAClC,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAA;IACf;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,MAAM,GAAG,SAAS,CAAA;CACpC;AAID,oFAAoF;AACpF,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,mBAAmB,GAAG,IAAI,CAEvE;AAWD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,CAmBlF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=customFetch.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customFetch.test.d.ts","sourceRoot":"","sources":["../../../../src/client/customFetch.test.ts"],"names":[],"mappings":""}
@@ -1,2 +1,3 @@
1
1
  export * from '../generated/client';
2
+ export * from './customFetch';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA"}