@communecter/cocolight-api-client 1.0.54 → 1.0.56

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 (179) hide show
  1. package/dist/401.cocolight-api-client.browser.js +1 -0
  2. package/dist/401.cocolight-api-client.cjs +1 -0
  3. package/dist/401.cocolight-api-client.mjs.js +1 -0
  4. package/dist/588.cocolight-api-client.browser.js +1 -0
  5. package/dist/588.cocolight-api-client.cjs +1 -0
  6. package/dist/588.cocolight-api-client.mjs.js +1 -0
  7. package/dist/593.cocolight-api-client.browser.js +1 -0
  8. package/dist/593.cocolight-api-client.cjs +1 -0
  9. package/dist/593.cocolight-api-client.mjs.js +1 -0
  10. package/dist/839.cocolight-api-client.browser.js +1 -0
  11. package/dist/839.cocolight-api-client.cjs +1 -0
  12. package/dist/839.cocolight-api-client.mjs.js +1 -0
  13. package/dist/cocolight-api-client.browser.js +3 -3
  14. package/dist/cocolight-api-client.cjs +1 -1
  15. package/dist/cocolight-api-client.mjs.js +1 -1
  16. package/dist/cocolight-api-client.vite.mjs.js +1 -1
  17. package/dist/cocolight-api-client.vite.mjs.js.map +1 -1
  18. package/package.json +29 -17
  19. package/src/{Api.js → Api.ts} +85 -95
  20. package/src/{ApiClient.js → ApiClient.ts} +436 -247
  21. package/src/EJSONType.ts +103 -0
  22. package/src/api/{Badge.js → Badge.ts} +56 -45
  23. package/src/api/BaseEntity.ts +3890 -0
  24. package/src/api/Comment.ts +200 -0
  25. package/src/api/{EndpointApi.js → EndpointApi.ts} +363 -297
  26. package/src/api/EndpointApi.types.ts +4609 -0
  27. package/src/api/EntityRegistry.ts +203 -0
  28. package/src/api/Event.ts +332 -0
  29. package/src/api/News.ts +331 -0
  30. package/src/api/{Organization.js → Organization.ts} +155 -119
  31. package/src/api/{Poi.js → Poi.ts} +68 -60
  32. package/src/api/{Project.js → Project.ts} +150 -127
  33. package/src/api/{User.js → User.ts} +321 -256
  34. package/src/api/UserApi.ts +148 -0
  35. package/src/api/serverDataType/Comment.ts +88 -0
  36. package/src/api/serverDataType/Event.ts +80 -0
  37. package/src/api/serverDataType/News.ts +138 -0
  38. package/src/api/serverDataType/Organization.ts +80 -0
  39. package/src/api/serverDataType/Project.ts +71 -0
  40. package/src/api/serverDataType/User.ts +103 -0
  41. package/src/api/serverDataType/common.ts +80 -0
  42. package/src/endpoints.module.ts +2621 -0
  43. package/src/error.ts +86 -0
  44. package/src/index.ts +86 -0
  45. package/src/mixin/UserMixin.ts +4 -0
  46. package/src/types/api-responses.ts +217 -0
  47. package/src/types/entities.ts +22 -0
  48. package/src/types/error-guards.ts +230 -0
  49. package/src/types/index.ts +39 -0
  50. package/src/types/payloads.ts +21 -0
  51. package/src/types/transforms.ts +110 -0
  52. package/src/utils/{FileOfflineStorageStrategy.node.js → FileOfflineStorageStrategy.node.ts} +15 -12
  53. package/src/utils/{FileStorageStrategy.node.js → FileStorageStrategy.node.ts} +16 -39
  54. package/src/utils/MultiServerFileStorageStrategy.node.ts +67 -0
  55. package/src/utils/MultiServerTokenStorageStrategy.ts +139 -0
  56. package/src/utils/{OfflineClientManager.js → OfflineClientManager.ts} +82 -86
  57. package/src/utils/OfflineQueueStorageStrategy.ts +47 -0
  58. package/src/utils/TokenStorage.ts +77 -0
  59. package/src/utils/compat.ts +12 -0
  60. package/src/utils/createDefaultMultiServerTokenStorageStrategy.ts +35 -0
  61. package/src/utils/{createDefaultOfflineStrategy.js → createDefaultOfflineStrategy.ts} +8 -3
  62. package/src/utils/createDefaultTokenStorageStrategy.ts +33 -0
  63. package/src/utils/{reactive.js → reactive.ts} +49 -40
  64. package/src/utils/stream-utils.node.ts +12 -0
  65. package/types/Api.d.ts +38 -82
  66. package/types/Api.d.ts.map +1 -0
  67. package/types/ApiClient.d.ts +244 -184
  68. package/types/ApiClient.d.ts.map +1 -0
  69. package/types/EJSONType.d.ts +48 -22
  70. package/types/EJSONType.d.ts.map +1 -0
  71. package/types/api/Badge.d.ts +20 -20
  72. package/types/api/Badge.d.ts.map +1 -0
  73. package/types/api/BaseEntity.d.ts +751 -446
  74. package/types/api/BaseEntity.d.ts.map +1 -0
  75. package/types/api/Comment.d.ts +36 -0
  76. package/types/api/EndpointApi.d.ts +347 -295
  77. package/types/api/EndpointApi.d.ts.map +1 -0
  78. package/types/api/EndpointApi.types.d.ts +3914 -4133
  79. package/types/api/EntityRegistry.d.ts +18 -16
  80. package/types/api/EntityRegistry.d.ts.map +1 -0
  81. package/types/api/Event.d.ts +119 -35
  82. package/types/api/Event.d.ts.map +1 -0
  83. package/types/api/News.d.ts +52 -20
  84. package/types/api/News.d.ts.map +1 -0
  85. package/types/api/Organization.d.ts +165 -49
  86. package/types/api/Organization.d.ts.map +1 -0
  87. package/types/api/Poi.d.ts +51 -22
  88. package/types/api/Poi.d.ts.map +1 -0
  89. package/types/api/Project.d.ts +151 -52
  90. package/types/api/Project.d.ts.map +1 -0
  91. package/types/api/User.d.ts +222 -93
  92. package/types/api/User.d.ts.map +1 -0
  93. package/types/api/UserApi.d.ts +60 -9
  94. package/types/api/UserApi.d.ts.map +1 -0
  95. package/types/api/serverDataType/Comment.d.ts +83 -0
  96. package/types/api/serverDataType/Event.d.ts +67 -0
  97. package/types/api/serverDataType/News.d.ts +130 -0
  98. package/types/api/serverDataType/Organization.d.ts +65 -0
  99. package/types/api/serverDataType/Organization.d.ts.map +1 -0
  100. package/types/api/serverDataType/Project.d.ts +58 -0
  101. package/types/api/serverDataType/Project.d.ts.map +1 -0
  102. package/types/api/serverDataType/User.d.ts +86 -0
  103. package/types/api/serverDataType/User.d.ts.map +1 -0
  104. package/types/api/serverDataType/common.d.ts +71 -0
  105. package/types/api/serverDataType/common.d.ts.map +1 -0
  106. package/types/endpoints.module.d.ts +6922 -1215
  107. package/types/endpoints.module.d.ts.map +1 -0
  108. package/types/error.d.ts +25 -51
  109. package/types/error.d.ts.map +1 -0
  110. package/types/index.d.ts +55 -48
  111. package/types/index.d.ts.map +1 -0
  112. package/types/mixin/UserMixin.d.ts +1 -1
  113. package/types/mixin/UserMixin.d.ts.map +1 -0
  114. package/types/types/api-responses.d.ts +190 -0
  115. package/types/types/api-responses.d.ts.map +1 -0
  116. package/types/types/entities.d.ts +17 -0
  117. package/types/types/entities.d.ts.map +1 -0
  118. package/types/types/error-guards.d.ts +99 -0
  119. package/types/types/error-guards.d.ts.map +1 -0
  120. package/types/types/index.d.ts +7 -0
  121. package/types/types/payloads.d.ts +17 -0
  122. package/types/types/payloads.d.ts.map +1 -0
  123. package/types/types/transforms.d.ts +79 -0
  124. package/types/types/transforms.d.ts.map +1 -0
  125. package/types/utils/FileOfflineStorageStrategy.node.d.ts +10 -9
  126. package/types/utils/FileOfflineStorageStrategy.node.d.ts.map +1 -0
  127. package/types/utils/FileStorageStrategy.node.d.ts +9 -20
  128. package/types/utils/FileStorageStrategy.node.d.ts.map +1 -0
  129. package/types/utils/MultiServerFileStorageStrategy.node.d.ts +13 -18
  130. package/types/utils/MultiServerFileStorageStrategy.node.d.ts.map +1 -0
  131. package/types/utils/MultiServerTokenStorageStrategy.d.ts +30 -51
  132. package/types/utils/MultiServerTokenStorageStrategy.d.ts.map +1 -0
  133. package/types/utils/OfflineClientManager.d.ts +52 -88
  134. package/types/utils/OfflineClientManager.d.ts.map +1 -0
  135. package/types/utils/OfflineQueueStorageStrategy.d.ts +12 -9
  136. package/types/utils/OfflineQueueStorageStrategy.d.ts.map +1 -0
  137. package/types/utils/TokenStorage.d.ts +20 -70
  138. package/types/utils/TokenStorage.d.ts.map +1 -0
  139. package/types/utils/compat.d.ts +4 -0
  140. package/types/utils/compat.d.ts.map +1 -0
  141. package/types/utils/createDefaultMultiServerTokenStorageStrategy.d.ts +2 -11
  142. package/types/utils/createDefaultMultiServerTokenStorageStrategy.d.ts.map +1 -0
  143. package/types/utils/createDefaultOfflineStrategy.d.ts +2 -3
  144. package/types/utils/createDefaultOfflineStrategy.d.ts.map +1 -0
  145. package/types/utils/createDefaultTokenStorageStrategy.d.ts +2 -12
  146. package/types/utils/createDefaultTokenStorageStrategy.d.ts.map +1 -0
  147. package/types/utils/reactive.d.ts +10 -16
  148. package/types/utils/reactive.d.ts.map +1 -0
  149. package/types/utils/stream-utils.node.d.ts +3 -2
  150. package/types/utils/stream-utils.node.d.ts.map +1 -0
  151. package/dist/123.cocolight-api-client.browser.js +0 -1
  152. package/dist/123.cocolight-api-client.cjs +0 -1
  153. package/dist/22.cocolight-api-client.mjs.js +0 -1
  154. package/dist/339.cocolight-api-client.mjs.js +0 -1
  155. package/dist/394.cocolight-api-client.browser.js +0 -1
  156. package/dist/394.cocolight-api-client.cjs +0 -1
  157. package/dist/405.cocolight-api-client.browser.js +0 -1
  158. package/dist/405.cocolight-api-client.cjs +0 -1
  159. package/dist/774.cocolight-api-client.mjs.js +0 -1
  160. package/dist/790.cocolight-api-client.mjs.js +0 -1
  161. package/dist/931.cocolight-api-client.browser.js +0 -1
  162. package/dist/931.cocolight-api-client.cjs +0 -1
  163. package/src/EJSONType.js +0 -53
  164. package/src/api/BaseEntity.js +0 -2828
  165. package/src/api/EntityRegistry.js +0 -152
  166. package/src/api/Event.js +0 -226
  167. package/src/api/News.js +0 -244
  168. package/src/api/UserApi.js +0 -81
  169. package/src/endpoints.module.js +0 -5
  170. package/src/error.js +0 -121
  171. package/src/index.js +0 -97
  172. package/src/mixin/UserMixin.js +0 -8
  173. package/src/utils/MultiServerFileStorageStrategy.node.js +0 -87
  174. package/src/utils/MultiServerTokenStorageStrategy.js +0 -188
  175. package/src/utils/OfflineQueueStorageStrategy.js +0 -51
  176. package/src/utils/TokenStorage.js +0 -153
  177. package/src/utils/createDefaultMultiServerTokenStorageStrategy.js +0 -51
  178. package/src/utils/createDefaultTokenStorageStrategy.js +0 -49
  179. package/src/utils/stream-utils.node.js +0 -10
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoints.module.d.ts","sourceRoot":"","sources":["../src/endpoints.module.ts"],"names":[],"mappings":"AA0jFA,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAgqlE,CAAC;AAEhrlE,eAAe,SAAS,CAAC"}
package/types/error.d.ts CHANGED
@@ -1,80 +1,54 @@
1
1
  /**
2
- * @typedef {Record<string, any>} ApiErrorDetails
2
+ * Type générique pour les détails d'erreur bruts
3
3
  */
4
+ export type GenericErrorDetails = Record<string, any>;
4
5
  /**
5
6
  * Classe de base pour toutes les erreurs de l'API.
6
- * @extends Error
7
7
  */
8
- export class ApiError extends Error {
9
- /**
10
- * @param {string} message - Message d'erreur.
11
- * @param {number} status - Code HTTP (ex: 400, 401, 500, 503).
12
- * @param {ApiErrorDetails} [details] - Détails supplémentaires.
13
- */
14
- constructor(message: string, status: number, details?: ApiErrorDetails);
15
- /** @type {number} */
16
- status: number;
17
- /** @type {ApiErrorDetails|undefined} */
18
- details: ApiErrorDetails | undefined;
8
+ export declare class ApiError extends Error {
9
+ readonly name: string;
10
+ readonly status: number;
11
+ readonly details?: GenericErrorDetails;
12
+ constructor(message: string, status: number, details?: GenericErrorDetails);
19
13
  }
20
14
  /**
21
15
  * Erreur levée par le client API lorsqu'un appel échoue (réseau, config, etc.).
22
- * @extends ApiError
23
16
  */
24
- export class ApiClientError extends ApiError {
17
+ export declare class ApiClientError extends ApiError {
18
+ readonly name: string;
19
+ constructor(message: string, status: number, details?: GenericErrorDetails);
25
20
  }
26
21
  /**
27
22
  * Erreur de validation AJV (schemas de requête/réponse).
28
- * @extends Error
29
23
  */
30
- export class ApiValidationError extends Error {
31
- /**
32
- * @param {string} message - Message d'erreur.
33
- * @param {number} status - Code HTTP logique (souvent 400).
34
- * @param {string[]} messages - Messages humains dérivés des erreurs AJV.
35
- * @param {any} [details=null] - Erreurs AJV brutes ou métadonnées.
36
- */
24
+ export declare class ApiValidationError extends Error {
25
+ readonly name: string;
26
+ readonly status: number;
27
+ readonly messages: string[];
28
+ readonly details: any;
37
29
  constructor(message: string, status: number, messages: string[], details?: any);
38
- /** @type {number} */
39
- status: number;
40
- /** @type {string[]} */
41
- messages: string[];
42
- /** @type {any} */
43
- details: any;
44
30
  }
45
31
  /**
46
32
  * Levée lorsqu'on bloque l'accès à l'API (circuit breaker).
47
- * @extends ApiError
48
33
  */
49
- export class CircuitBreakerError extends ApiError {
50
- /**
51
- * @param {string} message - Message d'erreur.
52
- */
34
+ export declare class CircuitBreakerError extends ApiError {
35
+ readonly name: string;
53
36
  constructor(message: string);
54
37
  }
55
38
  /**
56
39
  * Erreur "métier" retour de l'API (ex: result=false) même si HTTP=200.
57
- * @extends Error
58
40
  */
59
- export class ApiResponseError extends Error {
60
- /**
61
- * @param {string} message - Message d'erreur.
62
- * @param {number} status - Code HTTP (peut être 200 pour erreurs logiques).
63
- * @param {object} responseData - Payload renvoyé par l'API.
64
- * @param {any} [details=null] - Infos supplémentaires (optionnel).
65
- */
41
+ export declare class ApiResponseError extends Error {
42
+ readonly name: string;
43
+ readonly status: number;
44
+ readonly responseData: object;
45
+ readonly details: any;
66
46
  constructor(message: string, status: number, responseData: object, details?: any);
67
- /** @type {number} */
68
- status: number;
69
- /** @type {object} */
70
- responseData: object;
71
- /** @type {any} */
72
- details: any;
73
47
  }
74
48
  /**
75
49
  * Erreur d'authentification (ex: 401/403).
76
- * @extends ApiError
77
50
  */
78
- export class ApiAuthenticationError extends ApiError {
51
+ export declare class ApiAuthenticationError extends ApiError {
52
+ readonly name: string;
53
+ constructor(message: string, status: number, details?: GenericErrorDetails);
79
54
  }
80
- export type ApiErrorDetails = Record<string, any>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAElD;;GAEG;AACH,qBAAa,QAAS,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AO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe;CAGvE"}
package/types/index.d.ts CHANGED
@@ -1,52 +1,59 @@
1
- export default cocolightApiClient;
2
- export type Api = import("./Api.js").default;
3
- export type ApiClient = import("./ApiClient.js").default;
4
- export type error = typeof error;
5
- export type reactive = typeof reactive;
6
- export type TokenStorageStrategy = import("./utils/TokenStorage.js").TokenStorageStrategy;
7
- export type MultiServerTokenStorageStrategy = import("./utils/MultiServerTokenStorageStrategy.js").MultiServerTokenStorageStrategy;
8
- export type OfflineClientManager = import("./utils/OfflineClientManager.js").default;
9
- export type User = import("./api/User.js").User;
10
- export type Organization = import("./api/Organization.js").Organization;
11
- export type Project = import("./api/Project.js").Project;
12
- export type Event = import("./api/Event.js").Event;
13
- export type Poi = import("./api/Poi.js").Poi;
14
- export type Badge = import("./api/Badge.js").Badge;
15
- export type News = import("./api/News.js").News;
16
- export type EndpointApi = import("./api/EndpointApi.js").default;
17
- export type UserApi = import("./api/UserApi.js").UserApi;
18
- declare namespace cocolightApiClient {
19
- export { ApiClient };
20
- export { Api };
21
- export { error };
22
- export { reactive };
23
- export let effect: typeof import("./utils/reactive.js")["effect"];
24
- export let batch: typeof import("./utils/reactive.js")["batch"];
25
- export let isSignal: typeof import("./utils/reactive.js")["isSignal"];
26
- export let reactiveObject: typeof import("./utils/reactive.js")["reactive"];
27
- export let isReactive: typeof import("./utils/reactive.js")["isReactive"];
28
- export let computed: typeof import("./utils/reactive.js")["computed"];
29
- export let watch: typeof import("./utils/reactive.js")["watch"];
30
- export let getSignals: typeof import("./utils/reactive.js")["getSignals"];
31
- export let subscribeTo: typeof import("./utils/reactive.js")["subscribeTo"];
32
- export namespace tokenStorageStrategy {
33
- export { createDefaultTokenStorageStrategy };
34
- export { TokenStorageStrategy };
35
- export { createDefaultMultiServerTokenStorageStrategy };
36
- export { MultiServerTokenStorageStrategy };
37
- }
38
- export namespace helper {
39
- export { fromEntityJSON };
40
- }
41
- export { OfflineClientManager };
42
- }
43
- import * as error from "./error.js";
44
- import * as reactive from "./utils/reactive.js";
45
- import ApiClient from "./ApiClient.js";
1
+ import { fromEntityJSON } from "./api/EntityRegistry.js";
46
2
  import Api from "./Api.js";
47
- import { createDefaultTokenStorageStrategy } from "./utils/createDefaultTokenStorageStrategy.js";
48
- import { TokenStorageStrategy } from "./utils/TokenStorage.js";
3
+ import ApiClient from "./ApiClient.js";
4
+ import * as error from "./error.js";
49
5
  import { createDefaultMultiServerTokenStorageStrategy } from "./utils/createDefaultMultiServerTokenStorageStrategy.js";
6
+ import { createDefaultTokenStorageStrategy } from "./utils/createDefaultTokenStorageStrategy.js";
50
7
  import { MultiServerTokenStorageStrategy } from "./utils/MultiServerTokenStorageStrategy.js";
51
- import { fromEntityJSON } from "./api/EntityRegistry.js";
52
8
  import OfflineClientManager from "./utils/OfflineClientManager.js";
9
+ import * as reactive from "./utils/reactive.js";
10
+ import { TokenStorageStrategy } from "./utils/TokenStorage.js";
11
+ declare const cocolightApiClient: {
12
+ ApiClient: typeof ApiClient;
13
+ Api: typeof Api;
14
+ error: typeof error;
15
+ reactive: typeof reactive;
16
+ effect: typeof reactive.effect;
17
+ batch: typeof reactive.batch;
18
+ isSignal: typeof reactive.isSignal;
19
+ reactiveObject: typeof reactive.reactive;
20
+ isReactive: typeof reactive.isReactive;
21
+ computed: typeof reactive.computed;
22
+ watch: typeof reactive.watch;
23
+ getSignals: typeof reactive.getSignals;
24
+ subscribeTo: typeof reactive.subscribeTo;
25
+ tokenStorageStrategy: {
26
+ createDefaultTokenStorageStrategy: typeof createDefaultTokenStorageStrategy;
27
+ TokenStorageStrategy: typeof TokenStorageStrategy;
28
+ createDefaultMultiServerTokenStorageStrategy: typeof createDefaultMultiServerTokenStorageStrategy;
29
+ MultiServerTokenStorageStrategy: typeof MultiServerTokenStorageStrategy;
30
+ };
31
+ helper: {
32
+ fromEntityJSON: typeof fromEntityJSON;
33
+ };
34
+ OfflineClientManager: typeof OfflineClientManager;
35
+ };
36
+ export default cocolightApiClient;
37
+ export type { default as Api } from "./Api.js";
38
+ export type { default as ApiClient } from "./ApiClient.js";
39
+ export type { default as EndpointApi } from "./api/EndpointApi.js";
40
+ export type { UserApi } from "./api/UserApi.js";
41
+ export type { ApiClientOptions, CallEndpointData, CallEndpointResult, CallEndpointResponse, ApiClientOfflineEnqueueResult } from "./ApiClient.js";
42
+ export type { TokenStorageStrategy } from "./utils/TokenStorage.js";
43
+ export type { MultiServerTokenStorageStrategy } from "./utils/MultiServerTokenStorageStrategy.js";
44
+ export type { default as OfflineClientManager } from "./utils/OfflineClientManager.js";
45
+ export type { OfflineAction } from "./utils/OfflineClientManager.js";
46
+ export type { User } from "./api/User.js";
47
+ export type { Organization } from "./api/Organization.js";
48
+ export type { Project } from "./api/Project.js";
49
+ export type { Event } from "./api/Event.js";
50
+ export type { Poi } from "./api/Poi.js";
51
+ export type { Badge } from "./api/Badge.js";
52
+ export type { News } from "./api/News.js";
53
+ export type * from "./api/serverDataType/User.js";
54
+ export type * from "./api/serverDataType/Organization.js";
55
+ export type * from "./api/serverDataType/Project.js";
56
+ export type * from "./api/serverDataType/common.js";
57
+ export type { PaginatorPage } from "./api/BaseEntity.js";
58
+ export type * from "./types/index.js";
59
+ export type * from "./api/EndpointApi.types.js";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,4CAA4C,EAAE,MAAM,yDAAyD,CAAC;AACvH,OAAO,EAAE,iCAAiC,EAAE,MAAM,8CAA8C,CAAC;AACjG,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,oBAAoB,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/D,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;CAwBvB,CAAC;AAEF,eAAe,kBAAkB,CAAC;AAGlC,YAAY,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/C,YAAY,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3D,YAAY,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpE,YAAY,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAClG,YAAY,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvF,YAAY,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,YAAY,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,YAAY,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,YAAY,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnE,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1 +1 @@
1
- export const UserMixin: {};
1
+ export declare const UserMixin: {};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserMixin.d.ts","sourceRoot":"","sources":["../../src/mixin/UserMixin.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,IAErB,CAAC"}
@@ -0,0 +1,190 @@
1
+ import type { CollectionKey } from "../api/EntityRegistry.js";
2
+ /**
3
+ * Interface de base pour toutes les réponses API
4
+ */
5
+ export interface BaseApiResponse {
6
+ success?: boolean;
7
+ message?: string;
8
+ timestamp?: number;
9
+ }
10
+ /**
11
+ * Réponse avec données
12
+ */
13
+ export interface ApiDataResponse<T = any> extends BaseApiResponse {
14
+ data: T;
15
+ map?: {
16
+ id?: string;
17
+ slug?: string;
18
+ };
19
+ }
20
+ /**
21
+ * Réponse d'erreur API
22
+ */
23
+ export interface ApiErrorResponse extends BaseApiResponse {
24
+ error: {
25
+ code: number;
26
+ message: string;
27
+ details?: any;
28
+ stack?: string;
29
+ };
30
+ success: false;
31
+ }
32
+ /**
33
+ * Réponse paginée
34
+ */
35
+ export interface PaginatedApiResponse<T = any> extends BaseApiResponse {
36
+ data: {
37
+ count: {
38
+ total: number;
39
+ };
40
+ results: T[];
41
+ pageIndex: number;
42
+ pageNumber: number;
43
+ hasNext: boolean;
44
+ hasPrev: boolean;
45
+ };
46
+ }
47
+ /**
48
+ * Réponse pour les opérations de connexion/déconnexion
49
+ */
50
+ export interface ConnectionResponse extends BaseApiResponse {
51
+ connection: {
52
+ established: boolean;
53
+ type: string;
54
+ childId: string;
55
+ parentId: string;
56
+ date: number;
57
+ };
58
+ }
59
+ /**
60
+ * Réponse pour l'authentification
61
+ */
62
+ export interface AuthResponse extends BaseApiResponse {
63
+ user?: {
64
+ id: string;
65
+ username: string;
66
+ email: string;
67
+ roles: any;
68
+ };
69
+ accessToken?: string;
70
+ refreshToken?: string;
71
+ expiresIn?: number;
72
+ }
73
+ /**
74
+ * Réponse pour l'upload de fichiers
75
+ */
76
+ export interface UploadResponse extends BaseApiResponse {
77
+ file: {
78
+ id: string;
79
+ filename: string;
80
+ originalName: string;
81
+ mimetype: string;
82
+ size: number;
83
+ url: string;
84
+ thumbnailUrl?: string;
85
+ };
86
+ }
87
+ /**
88
+ * Réponse pour les opérations CRUD simples
89
+ */
90
+ export interface CrudResponse extends BaseApiResponse {
91
+ operation: "create" | "read" | "update" | "delete";
92
+ entityType: string;
93
+ entityId: string;
94
+ affected: number;
95
+ }
96
+ /**
97
+ * Types pour les endpoints spécifiques
98
+ */
99
+ export interface GetElementsKeyResponse extends BaseApiResponse {
100
+ contextId?: string;
101
+ contextType?: CollectionKey;
102
+ [key: string]: unknown;
103
+ }
104
+ /**
105
+ * Union de tous les types de réponse
106
+ */
107
+ export type ApiResponse = BaseApiResponse | ApiDataResponse | ApiErrorResponse | PaginatedApiResponse | ConnectionResponse | AuthResponse | UploadResponse | CrudResponse | GetElementsKeyResponse;
108
+ /**
109
+ * Types pour les statuts HTTP
110
+ */
111
+ export type HttpStatusCode = 200 | 201 | 202 | 204 | 400 | 401 | 403 | 404 | 409 | 422 | 500 | 501 | 502 | 503 | 504;
112
+ /**
113
+ * Interface pour les détails d'erreur API
114
+ */
115
+ export interface ApiErrorDetails {
116
+ code: HttpStatusCode;
117
+ message: string;
118
+ details?: any;
119
+ validationErrors?: Array<{
120
+ field: string;
121
+ message: string;
122
+ value?: any;
123
+ }>;
124
+ }
125
+ /**
126
+ * Types pour les réponses d'endpoint spécifiques
127
+ */
128
+ export declare namespace EndpointResponses {
129
+ interface AddUser extends ApiDataResponse<{
130
+ id: string;
131
+ username: string;
132
+ email: string;
133
+ created: number;
134
+ }> {
135
+ }
136
+ interface AddOrganization extends ApiDataResponse<{
137
+ id: string;
138
+ name: string;
139
+ created: number;
140
+ }> {
141
+ }
142
+ interface AddProject extends ApiDataResponse<{
143
+ id: string;
144
+ name: string;
145
+ created: number;
146
+ }> {
147
+ }
148
+ interface AddEvent extends ApiDataResponse<{
149
+ id: string;
150
+ name: string;
151
+ startDate?: number;
152
+ created: number;
153
+ }> {
154
+ }
155
+ interface AddPoi extends ApiDataResponse<{
156
+ id: string;
157
+ name: string;
158
+ created: number;
159
+ }> {
160
+ }
161
+ interface AddNews extends ApiDataResponse<{
162
+ id: string;
163
+ title: string;
164
+ publishDate?: number;
165
+ created: number;
166
+ }> {
167
+ }
168
+ interface AddBadges extends ApiDataResponse<{
169
+ id: string;
170
+ name: string;
171
+ created: number;
172
+ }> {
173
+ }
174
+ interface Connect extends ConnectionResponse {
175
+ }
176
+ interface Disconnect extends ConnectionResponse {
177
+ }
178
+ interface Follow extends ConnectionResponse {
179
+ }
180
+ interface LinkValidate extends ConnectionResponse {
181
+ }
182
+ }
183
+ /**
184
+ * Type helper pour extraire le type de données d'une réponse API
185
+ */
186
+ export type ExtractApiData<T> = T extends ApiDataResponse<infer U> ? U : never;
187
+ /**
188
+ * Type helper pour les réponses qui peuvent être soit des données soit des erreurs
189
+ */
190
+ export type ApiResult<T> = ApiDataResponse<T> | ApiErrorResponse;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-responses.d.ts","sourceRoot":"","sources":["../../src/types/api-responses.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,eAAe;IAC/D,IAAI,EAAE,CAAC,CAAC;IACR,GAAG,CAAC,EAAE;QACJ,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,GAAG,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,EAAE,KAAK,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,eAAe;IACpE,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,KAAK,E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ection possibles
3
+ */
4
+ export type CollectionType = "citoyens" | "organizations" | "projects" | "events" | "poi" | "news" | "badges" | "comments";
5
+ /**
6
+ * Types pour les références entre entités
7
+ */
8
+ export interface EntityRef {
9
+ type: string;
10
+ name?: string;
11
+ }
12
+ export type EntityRefsMap = Record<string, EntityRef>;
13
+ /**
14
+ * Types pour les transformations de données
15
+ */
16
+ export type TransformFunction<TInput = any, TOutput = any> = (value: TInput, fullObject?: any) => TOutput;
17
+ export type TransformsMap = Record<string, TransformFunction | undefined>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/types/entities.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,IAAI,MAAM,CAAC;IACxB,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;IACrB,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;IACpB,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,eAAe,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE9G;;GAEG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,WAAW;IACvD,gBAAgB,CAAC,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;IACzD,WAAW,CAAC,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,SAAS,CAAC,CAAC,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,MAAM,EAAE,iBAAiB,GAAG,SAAS,CAAC,CAAC"}
@@ -0,0 +1,99 @@
1
+ import { ApiError, ApiClientError, ApiResponseError, ApiValidationError, ApiAuthenticationError, CircuitBreakerError } from "../error.js";
2
+ import type { ApiErrorDetails, HttpStatusCode } from "./api-responses.js";
3
+ /**
4
+ * Type guard pour vérifier si une valeur est une Error
5
+ */
6
+ export declare function isError(value: unknown): value is Error;
7
+ /**
8
+ * Type guard pour vérifier si une valeur est une ApiError
9
+ */
10
+ export declare function isApiError(value: unknown): value is ApiError;
11
+ /**
12
+ * Type guard pour vérifier si une valeur est une ApiClientError
13
+ */
14
+ export declare function isApiClientError(value: unknown): value is ApiClientError;
15
+ /**
16
+ * Type guard pour vérifier si une valeur est une ApiResponseError
17
+ */
18
+ export declare function isApiResponseError(value: unknown): value is ApiResponseError;
19
+ /**
20
+ * Type guard pour vérifier si une valeur est une ApiValidationError
21
+ */
22
+ export declare function isApiValidationError(value: unknown): value is ApiValidationError;
23
+ /**
24
+ * Type guard pour vérifier si une valeur est une ApiAuthenticationError
25
+ */
26
+ export declare function isApiAuthenticationError(value: unknown): value is ApiAuthenticationError;
27
+ /**
28
+ * Type guard pour vérifier si une valeur est une CircuitBreakerError
29
+ */
30
+ export declare function isCircuitBreakerError(value: unknown): value is CircuitBreakerError;
31
+ /**
32
+ * Type guard pour vérifier si une erreur a une propriété response (erreurs axios)
33
+ */
34
+ export declare function hasResponse(error: unknown): error is Error & {
35
+ response: {
36
+ status: number;
37
+ data: any;
38
+ };
39
+ };
40
+ /**
41
+ * Type guard pour vérifier si une erreur a un code de statut HTTP
42
+ */
43
+ export declare function hasStatusCode(error: unknown): error is Error & {
44
+ status: HttpStatusCode;
45
+ };
46
+ /**
47
+ * Utilitaire pour extraire le message d'erreur de façon type-safe
48
+ */
49
+ export declare function getErrorMessage(error: unknown): string;
50
+ /**
51
+ * Utilitaire pour extraire le code de statut d'une erreur
52
+ */
53
+ export declare function getErrorStatusCode(error: unknown): HttpStatusCode | undefined;
54
+ /**
55
+ * Utilitaire pour extraire les détails d'erreur de façon type-safe
56
+ */
57
+ export declare function getErrorDetails(error: unknown): ApiErrorDetails | undefined;
58
+ /**
59
+ * Utilitaire pour créer une erreur typée
60
+ */
61
+ export declare function createTypedError(message: string, status?: HttpStatusCode, details?: any): ApiError;
62
+ /**
63
+ * Wrapper pour les fonctions qui peuvent lever des erreurs
64
+ */
65
+ export declare function safeCall<T>(fn: () => Promise<T>, fallback?: T): Promise<{
66
+ data: T;
67
+ error: null;
68
+ } | {
69
+ data: T | undefined;
70
+ error: ApiErrorDetails;
71
+ }>;
72
+ /**
73
+ * Type pour les résultats d'opérations sécurisées
74
+ */
75
+ export type SafeResult<T> = {
76
+ success: true;
77
+ data: T;
78
+ error: null;
79
+ } | {
80
+ success: false;
81
+ data: undefined;
82
+ error: ApiErrorDetails;
83
+ };
84
+ /**
85
+ * Version améliorée de safeCall avec indicateur de succès
86
+ */
87
+ export declare function trySafe<T>(fn: () => Promise<T>): Promise<SafeResult<T>>;
88
+ /**
89
+ * Utilitaire pour valider et normaliser les erreurs
90
+ */
91
+ export declare function normalizeError(error: unknown): ApiError;
92
+ /**
93
+ * Type helper pour les fonctions qui peuvent lever des erreurs typées
94
+ */
95
+ export type ErrorProne<T> = () => Promise<T> | T;
96
+ /**
97
+ * Décorateur de méthode pour capturer et normaliser les erreurs
98
+ */
99
+ export declare function catchErrors<T extends any[], R>(target: any, propertyName: string, descriptor: TypedPropertyDescriptor<(...args: T) => Promise<R>>): void;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-guards.d.ts","sourceRoot":"","sources":["../../src/types/error-guards.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC1I,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAE1E;;GA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+ export type { CollectionKey, EntityTag } from "../api/EntityRegistry.js";
2
+ export type { TransformsMap, TransformFunction, } from "./entities.js";
3
+ export type { SocialNetworkPayload, } from "./payloads.js";
4
+ export type { UserTransforms, OrganizationTransforms, ProjectTransforms, EventTransforms } from "./transforms.js";
5
+ export type { BaseApiResponse, ApiDataResponse, ApiErrorResponse, PaginatedApiResponse, GetElementsKeyResponse, ApiResponse } from "./api-responses.js";
6
+ export type { ApiErrorDetails } from "./api-responses.js";
7
+ export type { GenericErrorDetails } from "../error.js";
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Types pour les réseaux sociaux
3
+ */
4
+ export interface SocialNetworkPayload {
5
+ github?: string;
6
+ gitlab?: string;
7
+ facebook?: string;
8
+ twitter?: string;
9
+ instagram?: string;
10
+ linkedIn?: string;
11
+ youtube?: string;
12
+ website?: string;
13
+ diaspora?: string;
14
+ mastodon?: string;
15
+ telegram?: string;
16
+ signal?: string;
17
+ }