@constl/interface 1.0.1 → 1.0.2

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 (102) hide show
  1. package/dist/acc/303/250s.d.ts +13 -0
  2. package/dist/acc/303/250s.d.ts.map +1 -0
  3. package/dist/acc/303/250s.js +4 -0
  4. package/dist/acc/303/250s.js.map +1 -0
  5. package/dist/automatisations.d.ts +257 -0
  6. package/dist/automatisations.d.ts.map +1 -0
  7. package/dist/automatisations.js +2 -0
  8. package/dist/automatisations.js.map +1 -0
  9. package/dist/bds.d.ts +62 -0
  10. package/dist/bds.d.ts.map +1 -0
  11. package/dist/bds.js +2 -0
  12. package/dist/bds.js.map +1 -0
  13. package/dist/favoris.d.ts +44 -0
  14. package/dist/favoris.d.ts.map +1 -0
  15. package/dist/favoris.js +5 -0
  16. package/dist/favoris.js.map +1 -0
  17. package/dist/importateur.d.ts +12 -0
  18. package/dist/importateur.d.ts.map +1 -0
  19. package/dist/importateur.js +2 -0
  20. package/dist/importateur.js.map +1 -0
  21. package/dist/index.d.ts +2 -2
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +1 -2
  24. package/dist/index.js.map +1 -1
  25. package/dist/libp2p.d.ts +15 -0
  26. package/dist/libp2p.d.ts.map +1 -0
  27. package/dist/libp2p.js +2 -0
  28. package/dist/libp2p.js.map +1 -0
  29. package/dist/licences.d.ts +39 -0
  30. package/dist/licences.d.ts.map +1 -0
  31. package/dist/licences.js +30 -0
  32. package/dist/licences.js.map +1 -0
  33. package/dist/mots-clefs.d.ts +7 -0
  34. package/dist/mots-clefs.d.ts.map +1 -0
  35. package/dist/mots-clefs.js +2 -0
  36. package/dist/mots-clefs.js.map +1 -0
  37. package/dist/nu/303/251es.d.ts +55 -0
  38. package/dist/nu/303/251es.d.ts.map +1 -0
  39. package/dist/nu/303/251es.js +2 -0
  40. package/dist/nu/303/251es.js.map +1 -0
  41. package/dist/objets.d.ts +18 -0
  42. package/dist/objets.d.ts.map +1 -0
  43. package/dist/objets.js +2 -0
  44. package/dist/objets.js.map +1 -0
  45. package/dist/profil.d.ts +9 -0
  46. package/dist/profil.d.ts.map +1 -0
  47. package/dist/profil.js +2 -0
  48. package/dist/profil.js.map +1 -0
  49. package/dist/projets.d.ts +27 -0
  50. package/dist/projets.d.ts.map +1 -0
  51. package/dist/projets.js +2 -0
  52. package/dist/projets.js.map +1 -0
  53. package/dist/recherche.d.ts +3 -1
  54. package/dist/recherche.d.ts.map +1 -0
  55. package/dist/r/303/250gles.d.ts +101 -0
  56. package/dist/r/303/250gles.d.ts.map +1 -0
  57. package/dist/r/303/250gles.js +2 -0
  58. package/dist/r/303/250gles.js.map +1 -0
  59. package/dist/tableaux.d.ts +112 -0
  60. package/dist/tableaux.d.ts.map +1 -0
  61. package/dist/tableaux.js +2 -0
  62. package/dist/tableaux.js.map +1 -0
  63. package/dist/utils.d.ts +30 -0
  64. package/dist/utils.d.ts.map +1 -0
  65. package/dist/utils.js +2 -0
  66. package/dist/utils.js.map +1 -0
  67. package/dist/variables.d.ts +15 -0
  68. package/dist/variables.d.ts.map +1 -0
  69. package/dist/variables.js +2 -0
  70. package/dist/variables.js.map +1 -0
  71. package/dist/version.d.ts +2 -1
  72. package/dist/version.d.ts.map +1 -0
  73. package/dist/version.js +1 -1
  74. package/package.json +28 -3
  75. package/pnpm-workspace.yaml +4 -0
  76. package/src/@types/shims-orbit-db-core.d.ts +1 -0
  77. package/src/acc/303/250s.ts +16 -0
  78. package/src/automatisations.ts +353 -0
  79. package/src/bds.ts +88 -0
  80. package/src/favoris.ts +87 -0
  81. package/src/importateur.ts +10 -0
  82. package/src/index.ts +3 -3
  83. package/src/libp2p.ts +16 -0
  84. package/src/licences.ts +44 -0
  85. package/src/mots-clefs.ts +10 -0
  86. package/src/nu/303/251es.ts +81 -0
  87. package/src/objets.ts +21 -0
  88. package/src/profil.ts +11 -0
  89. package/src/projets.ts +30 -0
  90. package/src/recherche.ts +5 -2
  91. package/src/r/303/250gles.ts +145 -0
  92. package/src/tableaux.ts +175 -0
  93. package/src/utils.ts +31 -0
  94. package/src/variables.ts +33 -0
  95. package/src/version.ts +1 -1
  96. package/tsconfig.json +4 -35
  97. package/tsconfig.tsbuildinfo +1 -1
  98. package/.eslintignore +0 -3
  99. package/dist/fonctions.d.ts +0 -11
  100. package/dist/fonctions.js +0 -2
  101. package/dist/fonctions.js.map +0 -1
  102. package/src/fonctions.ts +0 -12
@@ -0,0 +1,353 @@
1
+ import type * as XLSX from "@e965/xlsx";
2
+ import type { Héritage } from "./nuées.ts";
3
+
4
+ import type { ClefsExtraction } from "./importateur.ts";
5
+ import type { ConversionColonne } from "./tableaux.ts";
6
+
7
+ // Types XLSX
8
+
9
+ /* Il faut copier ça ici parce qu'elles sont exportées d'XLSX en
10
+ tant qu'interfaces. */
11
+ export type XLSXCommonOptions = {
12
+ /**
13
+ * If true, throw errors when features are not understood
14
+ * @default false
15
+ */
16
+ WTF?: boolean;
17
+
18
+ /**
19
+ * When reading a file with VBA macros, expose CFB blob to `vbaraw` field
20
+ * When writing BIFF8/XLSB/XLSM, reseat `vbaraw` and export to file
21
+ * @default false
22
+ */
23
+ bookVBA?: boolean;
24
+
25
+ /**
26
+ * When reading a file, store dates as type d (default is n)
27
+ * When writing XLSX/XLSM file, use native date (default uses date codes)
28
+ * @default false
29
+ */
30
+ cellDates?: boolean;
31
+
32
+ /**
33
+ * Create cell objects for stub cells
34
+ * @default false
35
+ */
36
+ sheetStubs?: boolean;
37
+
38
+ /**
39
+ * When reading a file, save style/theme info to the .s field
40
+ * When writing a file, export style/theme info
41
+ * @default false
42
+ */
43
+ cellStyles?: boolean;
44
+
45
+ /**
46
+ * If defined and file is encrypted, use password
47
+ * @default ''
48
+ */
49
+ password?: string;
50
+ };
51
+
52
+ export type XLSXParsingOptions = XLSXCommonOptions & {
53
+ /** Input data encoding */
54
+ type?: "base64" | "binary" | "buffer" | "file" | "array" | "string";
55
+
56
+ /**
57
+ * Default codepage for legacy files
58
+ *
59
+ * This requires encoding support to be loaded. It is automatically loaded
60
+ * in `xlsx.full.min.js` and in CommonJS / Extendscript, but an extra step
61
+ * is required in React / Angular / Webpack ESM deployments.
62
+ *
63
+ * Check the relevant guide https://docs.sheetjs.com/docs/getting-started/
64
+ */
65
+ codepage?: number;
66
+
67
+ /**
68
+ * Save formulae to the .f field
69
+ * @default true
70
+ */
71
+ cellFormula?: boolean;
72
+
73
+ /**
74
+ * Parse rich text and save HTML to the .h field
75
+ * @default true
76
+ */
77
+ cellHTML?: boolean;
78
+
79
+ /**
80
+ * Save number format string to the .z field
81
+ * @default false
82
+ */
83
+ cellNF?: boolean;
84
+
85
+ /**
86
+ * Generate formatted text to the .w field
87
+ * @default true
88
+ */
89
+ cellText?: boolean;
90
+
91
+ /** Override default date format (code 14) */
92
+ dateNF?: string;
93
+
94
+ /** Field Separator ("Delimiter" override) */
95
+ FS?: string;
96
+
97
+ /**
98
+ * If >0, read the first sheetRows rows
99
+ * @default 0
100
+ */
101
+ sheetRows?: number;
102
+
103
+ /**
104
+ * If true, parse calculation chains
105
+ * @default false
106
+ */
107
+ bookDeps?: boolean;
108
+
109
+ /**
110
+ * If true, add raw files to book object
111
+ * @default false
112
+ */
113
+ bookFiles?: boolean;
114
+
115
+ /**
116
+ * If true, only parse enough to get book metadata
117
+ * @default false
118
+ */
119
+ bookProps?: boolean;
120
+
121
+ /**
122
+ * If true, only parse enough to get the sheet names
123
+ * @default false
124
+ */
125
+ bookSheets?: boolean;
126
+
127
+ /** If specified, only parse the specified sheets or sheet names */
128
+ sheets?: number | string | Array<number | string>;
129
+
130
+ /** If true, plaintext parsing will not parse values */
131
+ raw?: boolean;
132
+
133
+ /** If true, ignore "dimensions" records and guess range using every cell */
134
+ nodim?: boolean;
135
+
136
+ /** If true, preserve _xlfn. prefixes in formula function names */
137
+ xlfn?: boolean;
138
+
139
+ dense?: boolean;
140
+
141
+ PRN?: boolean;
142
+ };
143
+
144
+ // Types automatisations
145
+
146
+ export type SpécificationAutomatisation =
147
+ SpécificationExporter | SpécificationImporter;
148
+
149
+ export type TypeObjetExportation = "nuée" | "projet" | "bd" | "tableau";
150
+
151
+ export type FormatTélécharger = XLSX.BookType;
152
+
153
+ export type CopiesExportation = CopiesExportationN | CopiesExportationTemps;
154
+
155
+ export type CopiesExportationN = {
156
+ type: "n";
157
+ n: number;
158
+ };
159
+
160
+ export type CopiesExportationTemps = {
161
+ type: "temps";
162
+ temps: FréquenceFixe["détails"];
163
+ };
164
+
165
+ export type BaseSpécificationAutomatisation = {
166
+ fréquence: Fréquence;
167
+ type: "importation" | "exportation";
168
+ id: string;
169
+ };
170
+
171
+ export type BaseSpécificationExporter = BaseSpécificationAutomatisation & {
172
+ type: "exportation";
173
+ idObjet: string;
174
+ formatDoc: FormatTélécharger;
175
+ dossier: string;
176
+ langues?: string[] | false;
177
+ dispositifs: string[];
178
+ inclureDocuments: boolean;
179
+ copies?: CopiesExportation;
180
+ };
181
+
182
+ export type SpécificationExporterNuée = BaseSpécificationExporter & {
183
+ typeObjet: "nuée";
184
+ héritage?: Héritage;
185
+ };
186
+ export type SpécificationExporterTableau = BaseSpécificationExporter & {
187
+ typeObjet: "tableau";
188
+ idTableau: string;
189
+ };
190
+ export type SpécificationExporterObjet = BaseSpécificationExporter & {
191
+ typeObjet: Exclude<TypeObjetExportation, "nuée" | "tableau">;
192
+ };
193
+
194
+ export type SpécificationExporter =
195
+ | SpécificationExporterObjet
196
+ | SpécificationExporterNuée
197
+ | SpécificationExporterTableau;
198
+
199
+ export type SpécificationAjoutExportation = BaseSpécificationAjoutExportation &
200
+ (
201
+ | SpécificationAjoutExportationObjet
202
+ | SpécificationAjoutExportationNuée
203
+ | SpécificationAjoutExportationTableau
204
+ );
205
+
206
+ type BaseSpécificationAjoutExportation = {
207
+ idObjet: string;
208
+ formatDoc: FormatTélécharger;
209
+ inclureDocuments: boolean;
210
+ dossier: string;
211
+ langues?: string[] | false;
212
+ dispositifs?: string[];
213
+ copies?: CopiesExportation;
214
+ fréquence?: Fréquence;
215
+ };
216
+
217
+ type SpécificationAjoutExportationObjet = {
218
+ typeObjet: Exclude<TypeObjetExportation, "nuée" | "tableau">;
219
+ };
220
+ type SpécificationAjoutExportationNuée = {
221
+ typeObjet: "nuée";
222
+ héritage?: Héritage;
223
+ };
224
+ type SpécificationAjoutExportationTableau = {
225
+ typeObjet: "tableau";
226
+ idTableau: string;
227
+ };
228
+
229
+ export type SpécificationImporter<
230
+ T extends SourceDonnéesImportationAdresseOptionelle =
231
+ SourceDonnéesImportationAdresseOptionelle,
232
+ > = BaseSpécificationAutomatisation & {
233
+ type: "importation";
234
+ idBd: string;
235
+ idTableau: string;
236
+ dispositif: string;
237
+ source: T;
238
+ conversions?: ConversionColonne[];
239
+ };
240
+
241
+ export type InfoImporter = InfoImporterJSON | InfoImporterFeuilleCalcul;
242
+
243
+ export type InfoImporterJSON = {
244
+ formatDonnées: "json";
245
+ clefsRacine: ClefsExtraction;
246
+ clefsÉléments: ClefsExtraction;
247
+ cols: { [key: string]: ClefsExtraction };
248
+ };
249
+
250
+ export type InfoImporterFeuilleCalcul = {
251
+ formatDonnées: "feuilleCalcul";
252
+ nomTableau: string;
253
+ cols: { [key: string]: string };
254
+ optionsXLSX?: XLSXParsingOptions;
255
+ };
256
+
257
+ export type SourceDonnéesImportation<T extends InfoImporter> =
258
+ SourceDonnéesImportationURL<T> | SourceDonnéesImportationFichier<T>;
259
+
260
+ export type SourceDonnéesImportationAdresseOptionelle<
261
+ T extends InfoImporter = InfoImporter,
262
+ > =
263
+ | SourceDonnéesImportationURL<T>
264
+ | SourceDonnéesImportationFichierAdresseOptionelle<T>;
265
+
266
+ export type SourceDonnéesImportationURL<T extends InfoImporter> = {
267
+ type: "url";
268
+ url: string;
269
+ info: T;
270
+ };
271
+
272
+ export type SourceDonnéesImportationFichierAdresseOptionelle<
273
+ T extends InfoImporter,
274
+ > = {
275
+ type: "fichier";
276
+ adresseFichier?: string;
277
+ info: T;
278
+ };
279
+
280
+ export type SourceDonnéesImportationFichier<
281
+ T extends InfoImporter = InfoImporter,
282
+ > = SourceDonnéesImportationFichierAdresseOptionelle<T> & {
283
+ adresseFichier: string;
284
+ };
285
+
286
+ export type SpécificationAjoutImportation<
287
+ T extends InfoImporter = InfoImporter,
288
+ > = {
289
+ idBd: string;
290
+ idTableau: string;
291
+ conversions?: ConversionColonne[];
292
+ source: SourceDonnéesImportation<T>;
293
+ dispositif?: string;
294
+ fréquence?: Fréquence;
295
+ };
296
+
297
+ // Types fréquence
298
+
299
+ export type Fréquence = FréquenceFixe | FréquenceDynamique | FréquenceManuelle;
300
+ export type FréquenceFixe = {
301
+ type: "fixe";
302
+ détails: {
303
+ unités:
304
+ | "années"
305
+ | "mois"
306
+ | "semaines"
307
+ | "jours"
308
+ | "heures"
309
+ | "minutes"
310
+ | "secondes"
311
+ | "millisecondes";
312
+ n: number;
313
+ };
314
+ };
315
+ export type FréquenceDynamique = {
316
+ type: "dynamique";
317
+ };
318
+ export type FréquenceManuelle = {
319
+ type: "manuelle";
320
+ };
321
+
322
+ // Types état
323
+
324
+ export type ÉtatAutomatisation =
325
+ | ÉtatAutomatisationErreur
326
+ | ÉtatAutomatisationÉcoute
327
+ | ÉtatAutomatisationAttente
328
+ | ÉtatAutomatisationEnSync
329
+ | ÉtatAutomatisationProgrammée;
330
+
331
+ export interface ÉtatAutomatisationErreur {
332
+ type: "erreur";
333
+ erreur: string;
334
+ prochaineProgramméeÀ?: number;
335
+ }
336
+
337
+ export interface ÉtatAutomatisationÉcoute {
338
+ type: "écoute";
339
+ }
340
+
341
+ export interface ÉtatAutomatisationAttente {
342
+ type: "attente";
343
+ }
344
+
345
+ export interface ÉtatAutomatisationEnSync {
346
+ type: "sync";
347
+ depuis: number;
348
+ }
349
+
350
+ export interface ÉtatAutomatisationProgrammée {
351
+ type: "programmée";
352
+ à: number;
353
+ }
package/src/bds.ts ADDED
@@ -0,0 +1,88 @@
1
+ import type { BaseÉpingleFavoris, DispositifsÉpingle } from "./favoris.ts";
2
+ import type { Métadonnées, StatutDonnées } from "./objets.ts";
3
+ import type {
4
+ DifférenceTableaux,
5
+ DonnéesTableauExportées,
6
+ } from "./tableaux.ts";
7
+
8
+ // Types épingles
9
+ export type ÉpingleBd = {
10
+ type: "bds";
11
+ épingle: ContenuÉpingleBd;
12
+ };
13
+
14
+ export type ContenuÉpingleBd = BaseÉpingleFavoris & {
15
+ données: {
16
+ tableaux: DispositifsÉpingle;
17
+ fichiers: DispositifsÉpingle;
18
+ };
19
+ };
20
+
21
+ // Types différences
22
+
23
+ export type DifférenceBds =
24
+ | DifférenceBDTableauSupplémentaire
25
+ | DifférenceBDTableauManquant
26
+ | DifférenceTableauxBds;
27
+
28
+ export type DifférenceBDTableauManquant = {
29
+ type: "tableauManquant";
30
+ sévère: true;
31
+ clefManquante: string;
32
+ };
33
+
34
+ export type DifférenceBDTableauSupplémentaire = {
35
+ type: "tableauSupplémentaire";
36
+ sévère: false;
37
+ clefExtra: string;
38
+ };
39
+
40
+ export type DifférenceTableauxBds<
41
+ T extends DifférenceTableaux = DifférenceTableaux,
42
+ > = {
43
+ type: "tableau";
44
+ sévère: T["sévère"];
45
+ idTableau: string;
46
+ différence: T;
47
+ };
48
+
49
+ // Types données
50
+
51
+ export type DonnéesBdExportées = {
52
+ nomBd: string;
53
+ tableaux: DonnéesTableauExportées[];
54
+ };
55
+
56
+ // Types spécification
57
+
58
+ export type SchémaBd = {
59
+ licence: string;
60
+ licenceContenu?: string;
61
+ métadonnées?: Métadonnées;
62
+ clefUnique?: string;
63
+ motsClefs?: string[];
64
+ nuées?: string[];
65
+ statut?: StatutDonnées;
66
+ tableaux: {
67
+ [idTableau: string]: SchémaTableau;
68
+ };
69
+ };
70
+
71
+ export type SchémaTableau = {
72
+ cols: {
73
+ idColonne: string;
74
+ idVariable?: string;
75
+ index?: boolean;
76
+ }[];
77
+ };
78
+
79
+ // Types score
80
+
81
+ export interface ScoreBd {
82
+ accès?: number;
83
+ couverture?: number;
84
+ valide?: number;
85
+ infos?: number;
86
+ licence?: number;
87
+ total: number;
88
+ }
package/src/favoris.ts ADDED
@@ -0,0 +1,87 @@
1
+ import type { PartielRécursif, FonctionRésolveur, Résolveur } from "./utils.ts";
2
+
3
+ // Types réplications
4
+ export type Réplication<T extends BaseÉpingleFavoris = BaseÉpingleFavoris> = {
5
+ idDispositif: string;
6
+ épingle: BooléenniserÉpingle<ÉpingleFavoris<T>>;
7
+ };
8
+
9
+ // Types épingles
10
+
11
+ export const TOUS_DISPOSITIFS = "TOUS" as const;
12
+ export const DISPOSITIFS_INSTALLÉS = "INSTALLÉS" as const;
13
+ export const AUCUN_DISPOSITIF = "AUCUN" as const;
14
+
15
+ export type DispositifsÉpingle =
16
+ | string
17
+ | string[]
18
+ | typeof TOUS_DISPOSITIFS
19
+ | typeof DISPOSITIFS_INSTALLÉS
20
+ | typeof AUCUN_DISPOSITIF;
21
+
22
+ export type ÉpingleFavoris<
23
+ T extends BaseÉpingleFavoris = BaseÉpingleFavoris,
24
+ U extends string = string,
25
+ > = {
26
+ type: U;
27
+ épingle: PartielRécursif<T>;
28
+ };
29
+
30
+ export type BaseÉpingleFavoris = {
31
+ base: DispositifsÉpingle;
32
+ };
33
+
34
+ export type ÉpingleFavorisAvecId<
35
+ T extends BaseÉpingleFavoris = BaseÉpingleFavoris,
36
+ U extends string = string,
37
+ > = {
38
+ idObjet: string;
39
+ épingle: ÉpingleFavoris<T, U>;
40
+ };
41
+
42
+ export type BooléenniserÉpingle<T extends ÉpingleFavoris> = {
43
+ type: T["type"];
44
+ épingle: {
45
+ [clef in keyof T["épingle"]]?: T["épingle"][clef] extends ÉpingleFavoris
46
+ ? BooléenniserÉpingle<T["épingle"][clef]>
47
+ : T["épingle"][clef] extends object
48
+ ? PartielRécursif<BooléenniserPropriétés<T["épingle"][clef]>>
49
+ : boolean;
50
+ };
51
+ };
52
+
53
+ export type ÉpingleFavorisBooléenniséeAvecId<
54
+ T extends ÉpingleFavoris = ÉpingleFavoris,
55
+ > = {
56
+ idObjet: string;
57
+ épingle: BooléenniserÉpingle<T>;
58
+ };
59
+
60
+ export type BooléenniserPropriétés<T extends object> = {
61
+ [clef in keyof T]?: T[clef] extends object
62
+ ? BooléenniserPropriétés<T[clef]>
63
+ : boolean;
64
+ };
65
+
66
+ // Type résolveur
67
+
68
+ export type FonctionRésolveurFavoris<
69
+ T extends ÉpingleFavoris = ÉpingleFavoris,
70
+ > = FonctionRésolveur<
71
+ {
72
+ épingle: ÉpingleFavorisBooléenniséeAvecId<T>;
73
+ signal: AbortSignal;
74
+ ignorer: Set<string>;
75
+ },
76
+ Set<string>
77
+ >;
78
+
79
+ export type RésolveurFavoris<T extends ÉpingleFavoris = ÉpingleFavoris> =
80
+ Résolveur<
81
+ {
82
+ épingle: ÉpingleFavorisBooléenniséeAvecId<T>;
83
+ signal: AbortSignal;
84
+ ignorer: Set<string>;
85
+ },
86
+ Set<string>
87
+ >;
@@ -0,0 +1,10 @@
1
+ export type ClefsExtractionNonNul = (string | number)[];
2
+ export type ClefsExtraction = (string | number | -1)[];
3
+
4
+ export type ValsJSON =
5
+ number | string | boolean | ValsJSON[] | { [key: string]: ValsJSON };
6
+
7
+ export type ÉlémentDicJSON = { [key: string]: ValsJSON };
8
+ export type ÉlémentListeJSON = ValsJSON[];
9
+ export type ÉlémentJSON = ÉlémentDicJSON | ÉlémentListeJSON;
10
+ export type DonnéesJSON = ÉlémentJSON | ÉlémentJSON[];
package/src/index.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from "./fonctions.ts";
2
- export * from "./recherche.ts";
3
- export { version } from "./version.ts"
1
+ export * from "./utils.ts";
2
+
3
+ export { version } from "./version.ts";
package/src/libp2p.ts ADDED
@@ -0,0 +1,16 @@
1
+ import type { PrivateKey, ServiceMap } from "@libp2p/interface";
2
+ import type { Libp2pOptions } from "libp2p";
3
+
4
+ export type ConfigLibp2p = {
5
+ dossier?: string;
6
+ domaines?: string[];
7
+ pairsParDéfaut?: string[];
8
+ sujetsDécouvertePairsPubSub?: string[];
9
+ clefPrivée?: PrivateKey;
10
+ };
11
+
12
+ export type GénérateurOptionsLibp2p<L extends ServiceMap> = (args: {
13
+ dossier: string;
14
+ clefPrivée?: PrivateKey;
15
+ mode: "dév" | "prod";
16
+ }) => Promise<Libp2pOptions<L>>;
@@ -0,0 +1,44 @@
1
+ // Données de https://github.com/github/choosealicense.com
2
+ export const conditions = {
3
+ ATTR: "attribution",
4
+ ÉGAL: "partageÉgal",
5
+ INCL: "inclureDroitDauteur",
6
+ CHNG: "indiquerChangements",
7
+ SRCE: "partagerCodeSource",
8
+ USGR: "usagereseau",
9
+ } as const;
10
+
11
+ export const droits = {
12
+ PRTG: "partager",
13
+ ADPT: "adapter",
14
+ CMRC: "usageComercial",
15
+ PRV: "usagePrivé",
16
+ BREV: "usageBrevets",
17
+ };
18
+
19
+ export const limitations = {
20
+ RSP: "aucuneResponsabilité",
21
+ GRNT: "aucuneGarantie",
22
+ MRCM: "marqueCommerce",
23
+ BREV: "brevetExclu",
24
+ SOUS: "sousLicence",
25
+ };
26
+
27
+ export const catégories = {
28
+ BD: "basesDeDonnées",
29
+ ART: "artistique",
30
+ CODE: "codeInformatique",
31
+ AUTRE: "autre",
32
+ } as const;
33
+
34
+ export type InfoLicence = {
35
+ conditions: (typeof conditions)[keyof typeof conditions][];
36
+ droits: (typeof droits)[keyof typeof droits][];
37
+ limitations: (typeof limitations)[keyof typeof limitations][];
38
+ catégorie: (typeof catégories)[keyof typeof catégories];
39
+ spécialisée?: boolean;
40
+ };
41
+
42
+ export type InfoLicenceAvecCode = InfoLicence & {
43
+ code: string;
44
+ };
@@ -0,0 +1,10 @@
1
+ import type { BaseÉpingleFavoris } from "./favoris.ts";
2
+
3
+ // Types épingles
4
+
5
+ export type ÉpingleMotClef = {
6
+ type: "motsClefs";
7
+ épingle: ContenuÉpingleMotClef;
8
+ };
9
+
10
+ export type ContenuÉpingleMotClef = BaseÉpingleFavoris;
@@ -0,0 +1,81 @@
1
+ import type { ÉpingleBd } from "./bds.ts";
2
+ import type { BaseÉpingleFavoris } from "./favoris.ts";
3
+ import type {
4
+ DifférenceTableaux,
5
+ DonnéesRangéeTableauAvecId,
6
+ } from "./tableaux.ts";
7
+
8
+ // Types épingles
9
+ export type ÉpingleNuée = {
10
+ type: "nuées";
11
+ épingle: ContenuÉpingleNuée;
12
+ };
13
+
14
+ export type ContenuÉpingleNuée = BaseÉpingleFavoris & {
15
+ bds: ÉpingleBd["épingle"];
16
+ };
17
+
18
+ // Types filtres
19
+
20
+ export type Héritage = { descendance?: boolean; ascendance?: boolean };
21
+
22
+ export type FiltresBds = {
23
+ licences?: string[];
24
+ ignorerAutorisation?: boolean | "les miennes";
25
+ };
26
+
27
+ // Types tableaux
28
+
29
+ export type InfoTableauNuée = {
30
+ id: string;
31
+ source: string;
32
+ };
33
+
34
+ export type ValeurAscendance<T> = {
35
+ val: T;
36
+ source: string;
37
+ };
38
+
39
+ // Types autorisation
40
+
41
+ export type AutorisationNuée =
42
+ AutorisationNuéeOuverte | AutorisationNuéeParInvitation;
43
+
44
+ export type AutorisationNuéeOuverte = {
45
+ type: "ouverte";
46
+ bloqués: string[];
47
+ };
48
+
49
+ export type AutorisationNuéeParInvitation = {
50
+ type: "par invitation";
51
+ invités: string[];
52
+ };
53
+
54
+ // Types score
55
+
56
+ export type ScoreNuée = {
57
+ accès?: number;
58
+ infos?: number;
59
+ couverture?: number;
60
+ total: number;
61
+ };
62
+
63
+ // Types filtres
64
+
65
+ export type FiltresDonnées = {
66
+ exclureAvecDifférencesTableaux?: DifférenceTableaux["type"][];
67
+ exclureAvecErreursDonnées?: boolean;
68
+ };
69
+
70
+ // Types données et exportation
71
+
72
+ export type DonnéesRangéeNuée = {
73
+ idBd: string;
74
+ données: DonnéesRangéeTableauAvecId;
75
+ };
76
+
77
+ export type DonnéesTableauNuéeExportées = {
78
+ nomTableau: string;
79
+ données: DonnéesRangéeNuée[];
80
+ documentsMédias: Set<string>;
81
+ };