@everipedia/iq-utils 1.0.1 → 2.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 (44) hide show
  1. package/CHANGELOG.md +13 -1
  2. package/dist/index.d.mts +693 -0
  3. package/dist/index.d.ts +693 -0
  4. package/dist/index.js +640 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.mjs +580 -0
  7. package/dist/index.mjs.map +1 -0
  8. package/package.json +52 -53
  9. package/build/main/data/constants.d.ts +0 -24
  10. package/build/main/data/constants.js +0 -28
  11. package/build/main/index.d.ts +0 -7
  12. package/build/main/index.js +0 -24
  13. package/build/main/lib/checkWikiValidity.d.ts +0 -67
  14. package/build/main/lib/checkWikiValidity.js +0 -209
  15. package/build/main/lib/helpers/wiki.helpers.d.ts +0 -32
  16. package/build/main/lib/helpers/wiki.helpers.js +0 -86
  17. package/build/main/lib/isDeepEqual.d.ts +0 -3
  18. package/build/main/lib/isDeepEqual.js +0 -53
  19. package/build/main/lib/wikiScore.d.ts +0 -2
  20. package/build/main/lib/wikiScore.js +0 -127
  21. package/build/main/schema/wiki.schema.d.ts +0 -798
  22. package/build/main/schema/wiki.schema.js +0 -289
  23. package/build/main/types/wiki.d.ts +0 -9
  24. package/build/main/types/wiki.js +0 -14
  25. package/build/main/types/wikiBuilder.d.ts +0 -11
  26. package/build/main/types/wikiBuilder.js +0 -3
  27. package/build/module/data/constants.d.ts +0 -24
  28. package/build/module/data/constants.js +0 -25
  29. package/build/module/index.d.ts +0 -7
  30. package/build/module/index.js +0 -8
  31. package/build/module/lib/checkWikiValidity.d.ts +0 -67
  32. package/build/module/lib/checkWikiValidity.js +0 -191
  33. package/build/module/lib/helpers/wiki.helpers.d.ts +0 -32
  34. package/build/module/lib/helpers/wiki.helpers.js +0 -75
  35. package/build/module/lib/isDeepEqual.d.ts +0 -3
  36. package/build/module/lib/isDeepEqual.js +0 -51
  37. package/build/module/lib/wikiScore.d.ts +0 -2
  38. package/build/module/lib/wikiScore.js +0 -121
  39. package/build/module/schema/wiki.schema.d.ts +0 -798
  40. package/build/module/schema/wiki.schema.js +0 -286
  41. package/build/module/types/wiki.d.ts +0 -9
  42. package/build/module/types/wiki.js +0 -11
  43. package/build/module/types/wikiBuilder.d.ts +0 -11
  44. package/build/module/types/wikiBuilder.js +0 -2
@@ -0,0 +1,693 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * ========================
5
+ * ===== Enum Schemas =====
6
+ * ========================
7
+ */
8
+ declare const MediaType: z.ZodEnum<["GALLERY", "ICON"]>;
9
+ type MediaType = z.infer<typeof MediaType>;
10
+ declare const MediaSource: z.ZodEnum<["IPFS_IMG", "VIMEO", "YOUTUBE", "IPFS_VID"]>;
11
+ type MediaSource = z.infer<typeof MediaSource>;
12
+ declare const CommonMetaIds: z.ZodEnum<["references", "website", "contract_url", "location", "email_url", "facebook_profile", "instagram_profile", "twitter_profile", "linkedin_profile", "youtube_profile", "discord_profile", "reddit_profile", "telegram_profile", "github_profile", "coinmarketcap_url", "coingecko_profile", "opensea_profile", "medium_profile", "mirror_profile", "tiktok_profile", "explorer_injective_profile"]>;
13
+ type CommonMetaIds = z.infer<typeof CommonMetaIds>;
14
+ declare const EditSpecificMetaIds: z.ZodEnum<["previous_cid", "commit-message"]>;
15
+ type EditSpecificMetaIds = z.infer<typeof EditSpecificMetaIds>;
16
+ declare const ValidatorCodes: z.ZodEnum<["VALID_WIKI", "ID_ERROR", "LANGUAGE_ERROR", "USER_ERROR", "WORD_COUNT_ERROR", "CATEGORY_ERROR", "SUMMARY_ERROR", "IMAGE_ERROR", "TAG_ERROR", "EXTERNAL_URL_ERROR", "METADATA_ERROR", "MEDIA_ERROR", "GLOBAL_RATE_LIMIT", "LINKED_WIKIS", "EVENTS_ERROR"]>;
17
+ type ValidatorCodes = z.infer<typeof ValidatorCodes>;
18
+ declare const LanguagesISO: z.ZodEnum<["en", "es", "zh", "ko"]>;
19
+ type LanguagesISO = z.infer<typeof LanguagesISO>;
20
+ declare const LinkedWikiKey: z.ZodEnum<["founders", "blockchains", "speakers"]>;
21
+ type LinkedWikiKey = z.infer<typeof LinkedWikiKey>;
22
+ declare const EventType: z.ZodEnum<["CREATED", "DEFAULT", "MULTIDATE"]>;
23
+ type EventType = z.infer<typeof EventType>;
24
+ declare const Tag: z.ZodEnum<["Artists", "AI", "BinanceSmartChain", "Blockchains", "CEXes", "Collections", "Collectors", "Conference", "DEXes", "Developers", "Entertainment", "Ethereum", "Events", "Forum", "Founders", "Festival", "Games", "Glossary", "Hackathon", "Marketplaces", "Memecoins", "Organizations", "Online", "PeopleInDeFi", "Polkadot", "Polygon", "Protocols", "Solana", "Speakers", "Stablecoins", "Venture"]>;
25
+ type Tag = z.infer<typeof Tag>;
26
+ declare const Category: z.ZodEnum<["nfts", "defi", "exchanges", "cryptocurrencies", "daos", "people", "dapps", "organizations"]>;
27
+ type Category = z.infer<typeof Category>;
28
+ /**
29
+ * ==============================
30
+ * ===== Supporting Schemas =====
31
+ * ==============================
32
+ */
33
+ declare const ProfileLinks: z.ZodObject<{
34
+ twitter: z.ZodNullable<z.ZodString>;
35
+ website: z.ZodNullable<z.ZodString>;
36
+ instagram: z.ZodNullable<z.ZodString>;
37
+ }, "strip", z.ZodTypeAny, {
38
+ website: string | null;
39
+ twitter: string | null;
40
+ instagram: string | null;
41
+ }, {
42
+ website: string | null;
43
+ twitter: string | null;
44
+ instagram: string | null;
45
+ }>;
46
+ type ProfileLinks = z.infer<typeof ProfileLinks>;
47
+ declare const ProfileData: z.ZodObject<{
48
+ id: z.ZodNullable<z.ZodString>;
49
+ username: z.ZodNullable<z.ZodString>;
50
+ bio: z.ZodNullable<z.ZodString>;
51
+ links: z.ZodNullable<z.ZodArray<z.ZodObject<{
52
+ twitter: z.ZodNullable<z.ZodString>;
53
+ website: z.ZodNullable<z.ZodString>;
54
+ instagram: z.ZodNullable<z.ZodString>;
55
+ }, "strip", z.ZodTypeAny, {
56
+ website: string | null;
57
+ twitter: string | null;
58
+ instagram: string | null;
59
+ }, {
60
+ website: string | null;
61
+ twitter: string | null;
62
+ instagram: string | null;
63
+ }>, "many">>;
64
+ banner: z.ZodNullable<z.ZodString>;
65
+ avatar: z.ZodNullable<z.ZodString>;
66
+ }, "strip", z.ZodTypeAny, {
67
+ id: string | null;
68
+ username: string | null;
69
+ bio: string | null;
70
+ links: {
71
+ website: string | null;
72
+ twitter: string | null;
73
+ instagram: string | null;
74
+ }[] | null;
75
+ banner: string | null;
76
+ avatar: string | null;
77
+ }, {
78
+ id: string | null;
79
+ username: string | null;
80
+ bio: string | null;
81
+ links: {
82
+ website: string | null;
83
+ twitter: string | null;
84
+ instagram: string | null;
85
+ }[] | null;
86
+ banner: string | null;
87
+ avatar: string | null;
88
+ }>;
89
+ type ProfileData = z.infer<typeof ProfileData>;
90
+ declare const Image: z.ZodObject<{
91
+ id: z.ZodString;
92
+ type: z.ZodString;
93
+ }, "strip", z.ZodTypeAny, {
94
+ id: string;
95
+ type: string;
96
+ }, {
97
+ id: string;
98
+ type: string;
99
+ }>;
100
+ type Image = z.infer<typeof Image>;
101
+ declare const Media: z.ZodObject<{
102
+ id: z.ZodString;
103
+ size: z.ZodOptional<z.ZodNullable<z.ZodString>>;
104
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
105
+ type: z.ZodOptional<z.ZodNullable<z.ZodEnum<["GALLERY", "ICON"]>>>;
106
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
107
+ thumbnail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
108
+ source: z.ZodEnum<["IPFS_IMG", "VIMEO", "YOUTUBE", "IPFS_VID"]>;
109
+ }, "strip", z.ZodTypeAny, {
110
+ id: string;
111
+ source: "IPFS_IMG" | "VIMEO" | "YOUTUBE" | "IPFS_VID";
112
+ size?: string | null | undefined;
113
+ name?: string | null | undefined;
114
+ type?: "GALLERY" | "ICON" | null | undefined;
115
+ caption?: string | null | undefined;
116
+ thumbnail?: string | null | undefined;
117
+ }, {
118
+ id: string;
119
+ source: "IPFS_IMG" | "VIMEO" | "YOUTUBE" | "IPFS_VID";
120
+ size?: string | null | undefined;
121
+ name?: string | null | undefined;
122
+ type?: "GALLERY" | "ICON" | null | undefined;
123
+ caption?: string | null | undefined;
124
+ thumbnail?: string | null | undefined;
125
+ }>;
126
+ type Media = z.infer<typeof Media>;
127
+ declare const MetaData: z.ZodObject<{
128
+ id: z.ZodString;
129
+ value: z.ZodAny;
130
+ }, "strip", z.ZodTypeAny, {
131
+ id: string;
132
+ value?: any;
133
+ }, {
134
+ id: string;
135
+ value?: any;
136
+ }>;
137
+ type MetaData = z.infer<typeof MetaData>;
138
+ declare const BaseCategory: z.ZodObject<{
139
+ id: z.ZodEnum<["nfts", "defi", "exchanges", "cryptocurrencies", "daos", "people", "dapps", "organizations"]>;
140
+ title: z.ZodString;
141
+ }, "strip", z.ZodTypeAny, {
142
+ id: "nfts" | "defi" | "exchanges" | "cryptocurrencies" | "daos" | "people" | "dapps" | "organizations";
143
+ title: string;
144
+ }, {
145
+ id: "nfts" | "defi" | "exchanges" | "cryptocurrencies" | "daos" | "people" | "dapps" | "organizations";
146
+ title: string;
147
+ }>;
148
+ type BaseCategory = z.infer<typeof BaseCategory>;
149
+ declare const BaseEvents: z.ZodObject<{
150
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
151
+ date: z.ZodNullable<z.ZodString>;
152
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
153
+ type: z.ZodNullable<z.ZodEnum<["CREATED", "DEFAULT", "MULTIDATE"]>>;
154
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
155
+ link: z.ZodOptional<z.ZodNullable<z.ZodString>>;
156
+ multiDateStart: z.ZodOptional<z.ZodNullable<z.ZodString>>;
157
+ multiDateEnd: z.ZodOptional<z.ZodNullable<z.ZodString>>;
158
+ continent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
159
+ country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
160
+ action: z.ZodOptional<z.ZodNullable<z.ZodEnum<["DELETE", "EDIT", "CREATE"]>>>;
161
+ }, "strip", z.ZodTypeAny, {
162
+ type: "CREATED" | "DEFAULT" | "MULTIDATE" | null;
163
+ date: string | null;
164
+ id?: string | null | undefined;
165
+ link?: string | null | undefined;
166
+ title?: string | null | undefined;
167
+ description?: string | null | undefined;
168
+ multiDateStart?: string | null | undefined;
169
+ multiDateEnd?: string | null | undefined;
170
+ continent?: string | null | undefined;
171
+ country?: string | null | undefined;
172
+ action?: "DELETE" | "EDIT" | "CREATE" | null | undefined;
173
+ }, {
174
+ type: "CREATED" | "DEFAULT" | "MULTIDATE" | null;
175
+ date: string | null;
176
+ id?: string | null | undefined;
177
+ link?: string | null | undefined;
178
+ title?: string | null | undefined;
179
+ description?: string | null | undefined;
180
+ multiDateStart?: string | null | undefined;
181
+ multiDateEnd?: string | null | undefined;
182
+ continent?: string | null | undefined;
183
+ country?: string | null | undefined;
184
+ action?: "DELETE" | "EDIT" | "CREATE" | null | undefined;
185
+ }>;
186
+ type BaseEvents = z.infer<typeof BaseEvents>;
187
+ /**
188
+ * ========================
189
+ * ===== Core Schemas =====
190
+ * ========================
191
+ */
192
+ declare const Wiki: z.ZodEffects<z.ZodObject<{
193
+ id: z.ZodString;
194
+ title: z.ZodString;
195
+ content: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
196
+ summary: z.ZodString;
197
+ images: z.ZodArray<z.ZodObject<{
198
+ id: z.ZodString;
199
+ type: z.ZodString;
200
+ }, "strip", z.ZodTypeAny, {
201
+ id: string;
202
+ type: string;
203
+ }, {
204
+ id: string;
205
+ type: string;
206
+ }>, "many">;
207
+ categories: z.ZodArray<z.ZodObject<{
208
+ id: z.ZodEnum<["nfts", "defi", "exchanges", "cryptocurrencies", "daos", "people", "dapps", "organizations"]>;
209
+ title: z.ZodString;
210
+ }, "strip", z.ZodTypeAny, {
211
+ id: "nfts" | "defi" | "exchanges" | "cryptocurrencies" | "daos" | "people" | "dapps" | "organizations";
212
+ title: string;
213
+ }, {
214
+ id: "nfts" | "defi" | "exchanges" | "cryptocurrencies" | "daos" | "people" | "dapps" | "organizations";
215
+ title: string;
216
+ }>, "many">;
217
+ tags: z.ZodEffects<z.ZodArray<z.ZodObject<{
218
+ id: z.ZodString;
219
+ }, "strip", z.ZodTypeAny, {
220
+ id: string;
221
+ }, {
222
+ id: string;
223
+ }>, "many">, {
224
+ id: "Artists" | "AI" | "BinanceSmartChain" | "Blockchains" | "CEXes" | "Collections" | "Collectors" | "Conference" | "DEXes" | "Developers" | "Entertainment" | "Ethereum" | "Events" | "Forum" | "Founders" | "Festival" | "Games" | "Glossary" | "Hackathon" | "Marketplaces" | "Memecoins" | "Organizations" | "Online" | "PeopleInDeFi" | "Polkadot" | "Polygon" | "Protocols" | "Solana" | "Speakers" | "Stablecoins" | "Venture";
225
+ }[], {
226
+ id: string;
227
+ }[]>;
228
+ media: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
229
+ id: z.ZodString;
230
+ size: z.ZodOptional<z.ZodNullable<z.ZodString>>;
231
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
232
+ type: z.ZodOptional<z.ZodNullable<z.ZodEnum<["GALLERY", "ICON"]>>>;
233
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
234
+ thumbnail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
235
+ source: z.ZodEnum<["IPFS_IMG", "VIMEO", "YOUTUBE", "IPFS_VID"]>;
236
+ }, "strip", z.ZodTypeAny, {
237
+ id: string;
238
+ source: "IPFS_IMG" | "VIMEO" | "YOUTUBE" | "IPFS_VID";
239
+ size?: string | null | undefined;
240
+ name?: string | null | undefined;
241
+ type?: "GALLERY" | "ICON" | null | undefined;
242
+ caption?: string | null | undefined;
243
+ thumbnail?: string | null | undefined;
244
+ }, {
245
+ id: string;
246
+ source: "IPFS_IMG" | "VIMEO" | "YOUTUBE" | "IPFS_VID";
247
+ size?: string | null | undefined;
248
+ name?: string | null | undefined;
249
+ type?: "GALLERY" | "ICON" | null | undefined;
250
+ caption?: string | null | undefined;
251
+ thumbnail?: string | null | undefined;
252
+ }>, "many">, {
253
+ id: string;
254
+ source: "IPFS_IMG" | "VIMEO" | "YOUTUBE" | "IPFS_VID";
255
+ size?: string | null | undefined;
256
+ name?: string | null | undefined;
257
+ type?: "GALLERY" | "ICON" | null | undefined;
258
+ caption?: string | null | undefined;
259
+ thumbnail?: string | null | undefined;
260
+ }[], {
261
+ id: string;
262
+ source: "IPFS_IMG" | "VIMEO" | "YOUTUBE" | "IPFS_VID";
263
+ size?: string | null | undefined;
264
+ name?: string | null | undefined;
265
+ type?: "GALLERY" | "ICON" | null | undefined;
266
+ caption?: string | null | undefined;
267
+ thumbnail?: string | null | undefined;
268
+ }[]>>;
269
+ metadata: z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodObject<{
270
+ id: z.ZodString;
271
+ value: z.ZodAny;
272
+ }, "strip", z.ZodTypeAny, {
273
+ id: string;
274
+ value?: any;
275
+ }, {
276
+ id: string;
277
+ value?: any;
278
+ }>, "many">, {
279
+ id: string;
280
+ value?: any;
281
+ }[], {
282
+ id: string;
283
+ value?: any;
284
+ }[]>, {
285
+ id: string;
286
+ value?: any;
287
+ }[], {
288
+ id: string;
289
+ value?: any;
290
+ }[]>;
291
+ events: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
292
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
293
+ date: z.ZodNullable<z.ZodString>;
294
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
295
+ type: z.ZodNullable<z.ZodEnum<["CREATED", "DEFAULT", "MULTIDATE"]>>;
296
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
297
+ link: z.ZodOptional<z.ZodNullable<z.ZodString>>;
298
+ multiDateStart: z.ZodOptional<z.ZodNullable<z.ZodString>>;
299
+ multiDateEnd: z.ZodOptional<z.ZodNullable<z.ZodString>>;
300
+ continent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
301
+ country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
302
+ action: z.ZodOptional<z.ZodNullable<z.ZodEnum<["DELETE", "EDIT", "CREATE"]>>>;
303
+ }, "strip", z.ZodTypeAny, {
304
+ type: "CREATED" | "DEFAULT" | "MULTIDATE" | null;
305
+ date: string | null;
306
+ id?: string | null | undefined;
307
+ link?: string | null | undefined;
308
+ title?: string | null | undefined;
309
+ description?: string | null | undefined;
310
+ multiDateStart?: string | null | undefined;
311
+ multiDateEnd?: string | null | undefined;
312
+ continent?: string | null | undefined;
313
+ country?: string | null | undefined;
314
+ action?: "DELETE" | "EDIT" | "CREATE" | null | undefined;
315
+ }, {
316
+ type: "CREATED" | "DEFAULT" | "MULTIDATE" | null;
317
+ date: string | null;
318
+ id?: string | null | undefined;
319
+ link?: string | null | undefined;
320
+ title?: string | null | undefined;
321
+ description?: string | null | undefined;
322
+ multiDateStart?: string | null | undefined;
323
+ multiDateEnd?: string | null | undefined;
324
+ continent?: string | null | undefined;
325
+ country?: string | null | undefined;
326
+ action?: "DELETE" | "EDIT" | "CREATE" | null | undefined;
327
+ }>, "many">>>;
328
+ user: z.ZodObject<{
329
+ id: z.ZodString;
330
+ }, "strip", z.ZodTypeAny, {
331
+ id: string;
332
+ }, {
333
+ id: string;
334
+ }>;
335
+ author: z.ZodObject<{
336
+ id: z.ZodString;
337
+ }, "strip", z.ZodTypeAny, {
338
+ id: string;
339
+ }, {
340
+ id: string;
341
+ }>;
342
+ language: z.ZodDefault<z.ZodEnum<["en", "es", "zh", "ko"]>>;
343
+ version: z.ZodDefault<z.ZodNumber>;
344
+ linkedWikis: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
345
+ blockchains: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
346
+ founders: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
347
+ speakers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
348
+ }, "strip", z.ZodTypeAny, {
349
+ founders?: string[] | null | undefined;
350
+ blockchains?: string[] | null | undefined;
351
+ speakers?: string[] | null | undefined;
352
+ }, {
353
+ founders?: string[] | null | undefined;
354
+ blockchains?: string[] | null | undefined;
355
+ speakers?: string[] | null | undefined;
356
+ }>>>>;
357
+ }, "strip", z.ZodTypeAny, {
358
+ id: string;
359
+ title: string;
360
+ content: string;
361
+ summary: string;
362
+ images: {
363
+ id: string;
364
+ type: string;
365
+ }[];
366
+ categories: {
367
+ id: "nfts" | "defi" | "exchanges" | "cryptocurrencies" | "daos" | "people" | "dapps" | "organizations";
368
+ title: string;
369
+ }[];
370
+ tags: {
371
+ id: "Artists" | "AI" | "BinanceSmartChain" | "Blockchains" | "CEXes" | "Collections" | "Collectors" | "Conference" | "DEXes" | "Developers" | "Entertainment" | "Ethereum" | "Events" | "Forum" | "Founders" | "Festival" | "Games" | "Glossary" | "Hackathon" | "Marketplaces" | "Memecoins" | "Organizations" | "Online" | "PeopleInDeFi" | "Polkadot" | "Polygon" | "Protocols" | "Solana" | "Speakers" | "Stablecoins" | "Venture";
372
+ }[];
373
+ metadata: {
374
+ id: string;
375
+ value?: any;
376
+ }[];
377
+ user: {
378
+ id: string;
379
+ };
380
+ author: {
381
+ id: string;
382
+ };
383
+ language: "en" | "es" | "zh" | "ko";
384
+ version: number;
385
+ linkedWikis: {
386
+ founders?: string[] | null | undefined;
387
+ blockchains?: string[] | null | undefined;
388
+ speakers?: string[] | null | undefined;
389
+ } | null;
390
+ media?: {
391
+ id: string;
392
+ source: "IPFS_IMG" | "VIMEO" | "YOUTUBE" | "IPFS_VID";
393
+ size?: string | null | undefined;
394
+ name?: string | null | undefined;
395
+ type?: "GALLERY" | "ICON" | null | undefined;
396
+ caption?: string | null | undefined;
397
+ thumbnail?: string | null | undefined;
398
+ }[] | undefined;
399
+ events?: {
400
+ type: "CREATED" | "DEFAULT" | "MULTIDATE" | null;
401
+ date: string | null;
402
+ id?: string | null | undefined;
403
+ link?: string | null | undefined;
404
+ title?: string | null | undefined;
405
+ description?: string | null | undefined;
406
+ multiDateStart?: string | null | undefined;
407
+ multiDateEnd?: string | null | undefined;
408
+ continent?: string | null | undefined;
409
+ country?: string | null | undefined;
410
+ action?: "DELETE" | "EDIT" | "CREATE" | null | undefined;
411
+ }[] | null | undefined;
412
+ }, {
413
+ id: string;
414
+ title: string;
415
+ content: string;
416
+ summary: string;
417
+ images: {
418
+ id: string;
419
+ type: string;
420
+ }[];
421
+ categories: {
422
+ id: "nfts" | "defi" | "exchanges" | "cryptocurrencies" | "daos" | "people" | "dapps" | "organizations";
423
+ title: string;
424
+ }[];
425
+ tags: {
426
+ id: string;
427
+ }[];
428
+ metadata: {
429
+ id: string;
430
+ value?: any;
431
+ }[];
432
+ user: {
433
+ id: string;
434
+ };
435
+ author: {
436
+ id: string;
437
+ };
438
+ media?: {
439
+ id: string;
440
+ source: "IPFS_IMG" | "VIMEO" | "YOUTUBE" | "IPFS_VID";
441
+ size?: string | null | undefined;
442
+ name?: string | null | undefined;
443
+ type?: "GALLERY" | "ICON" | null | undefined;
444
+ caption?: string | null | undefined;
445
+ thumbnail?: string | null | undefined;
446
+ }[] | undefined;
447
+ events?: {
448
+ type: "CREATED" | "DEFAULT" | "MULTIDATE" | null;
449
+ date: string | null;
450
+ id?: string | null | undefined;
451
+ link?: string | null | undefined;
452
+ title?: string | null | undefined;
453
+ description?: string | null | undefined;
454
+ multiDateStart?: string | null | undefined;
455
+ multiDateEnd?: string | null | undefined;
456
+ continent?: string | null | undefined;
457
+ country?: string | null | undefined;
458
+ action?: "DELETE" | "EDIT" | "CREATE" | null | undefined;
459
+ }[] | null | undefined;
460
+ language?: "en" | "es" | "zh" | "ko" | undefined;
461
+ version?: number | undefined;
462
+ linkedWikis?: {
463
+ founders?: string[] | null | undefined;
464
+ blockchains?: string[] | null | undefined;
465
+ speakers?: string[] | null | undefined;
466
+ } | null | undefined;
467
+ }>, {
468
+ id: string;
469
+ title: string;
470
+ content: string;
471
+ summary: string;
472
+ images: {
473
+ id: string;
474
+ type: string;
475
+ }[];
476
+ categories: {
477
+ id: "nfts" | "defi" | "exchanges" | "cryptocurrencies" | "daos" | "people" | "dapps" | "organizations";
478
+ title: string;
479
+ }[];
480
+ tags: {
481
+ id: "Artists" | "AI" | "BinanceSmartChain" | "Blockchains" | "CEXes" | "Collections" | "Collectors" | "Conference" | "DEXes" | "Developers" | "Entertainment" | "Ethereum" | "Events" | "Forum" | "Founders" | "Festival" | "Games" | "Glossary" | "Hackathon" | "Marketplaces" | "Memecoins" | "Organizations" | "Online" | "PeopleInDeFi" | "Polkadot" | "Polygon" | "Protocols" | "Solana" | "Speakers" | "Stablecoins" | "Venture";
482
+ }[];
483
+ metadata: {
484
+ id: string;
485
+ value?: any;
486
+ }[];
487
+ user: {
488
+ id: string;
489
+ };
490
+ author: {
491
+ id: string;
492
+ };
493
+ language: "en" | "es" | "zh" | "ko";
494
+ version: number;
495
+ linkedWikis: {
496
+ founders?: string[] | null | undefined;
497
+ blockchains?: string[] | null | undefined;
498
+ speakers?: string[] | null | undefined;
499
+ } | null;
500
+ media?: {
501
+ id: string;
502
+ source: "IPFS_IMG" | "VIMEO" | "YOUTUBE" | "IPFS_VID";
503
+ size?: string | null | undefined;
504
+ name?: string | null | undefined;
505
+ type?: "GALLERY" | "ICON" | null | undefined;
506
+ caption?: string | null | undefined;
507
+ thumbnail?: string | null | undefined;
508
+ }[] | undefined;
509
+ events?: {
510
+ type: "CREATED" | "DEFAULT" | "MULTIDATE" | null;
511
+ date: string | null;
512
+ id?: string | null | undefined;
513
+ link?: string | null | undefined;
514
+ title?: string | null | undefined;
515
+ description?: string | null | undefined;
516
+ multiDateStart?: string | null | undefined;
517
+ multiDateEnd?: string | null | undefined;
518
+ continent?: string | null | undefined;
519
+ country?: string | null | undefined;
520
+ action?: "DELETE" | "EDIT" | "CREATE" | null | undefined;
521
+ }[] | null | undefined;
522
+ }, {
523
+ id: string;
524
+ title: string;
525
+ content: string;
526
+ summary: string;
527
+ images: {
528
+ id: string;
529
+ type: string;
530
+ }[];
531
+ categories: {
532
+ id: "nfts" | "defi" | "exchanges" | "cryptocurrencies" | "daos" | "people" | "dapps" | "organizations";
533
+ title: string;
534
+ }[];
535
+ tags: {
536
+ id: string;
537
+ }[];
538
+ metadata: {
539
+ id: string;
540
+ value?: any;
541
+ }[];
542
+ user: {
543
+ id: string;
544
+ };
545
+ author: {
546
+ id: string;
547
+ };
548
+ media?: {
549
+ id: string;
550
+ source: "IPFS_IMG" | "VIMEO" | "YOUTUBE" | "IPFS_VID";
551
+ size?: string | null | undefined;
552
+ name?: string | null | undefined;
553
+ type?: "GALLERY" | "ICON" | null | undefined;
554
+ caption?: string | null | undefined;
555
+ thumbnail?: string | null | undefined;
556
+ }[] | undefined;
557
+ events?: {
558
+ type: "CREATED" | "DEFAULT" | "MULTIDATE" | null;
559
+ date: string | null;
560
+ id?: string | null | undefined;
561
+ link?: string | null | undefined;
562
+ title?: string | null | undefined;
563
+ description?: string | null | undefined;
564
+ multiDateStart?: string | null | undefined;
565
+ multiDateEnd?: string | null | undefined;
566
+ continent?: string | null | undefined;
567
+ country?: string | null | undefined;
568
+ action?: "DELETE" | "EDIT" | "CREATE" | null | undefined;
569
+ }[] | null | undefined;
570
+ language?: "en" | "es" | "zh" | "ko" | undefined;
571
+ version?: number | undefined;
572
+ linkedWikis?: {
573
+ founders?: string[] | null | undefined;
574
+ blockchains?: string[] | null | undefined;
575
+ speakers?: string[] | null | undefined;
576
+ } | null | undefined;
577
+ }>;
578
+ type Wiki = z.infer<typeof Wiki>;
579
+ declare const Reference: z.ZodObject<{
580
+ id: z.ZodString;
581
+ description: z.ZodString;
582
+ timestamp: z.ZodNumber;
583
+ url: z.ZodString;
584
+ }, "strip", z.ZodTypeAny, {
585
+ id: string;
586
+ url: string;
587
+ description: string;
588
+ timestamp: number;
589
+ }, {
590
+ id: string;
591
+ url: string;
592
+ description: string;
593
+ timestamp: number;
594
+ }>;
595
+ type Reference = z.infer<typeof Reference>;
596
+
597
+ declare const calculateWikiScore: (wiki: Wiki) => number;
598
+
599
+ /**
600
+ * Counts the number of words in a given string.
601
+ * @param text - The input string to count words from.
602
+ * @returns The number of words in the string.
603
+ */
604
+ declare const countWords: (text: string) => number;
605
+ /**
606
+ * Checks if a given string is a valid URL.
607
+ * @param urlString - The string to check.
608
+ * @returns True if the string is a valid URL, false otherwise.
609
+ */
610
+ declare const isValidUrl: (urlString: string) => boolean;
611
+ /**
612
+ * Checks if all content links in the given text are verified.
613
+ * @param content - The content to check for links.
614
+ * @returns True if all links are verified, false otherwise.
615
+ */
616
+ declare const areContentLinksVerified: (content: string) => boolean;
617
+ /**
618
+ * Checks if the media in the wiki is valid.
619
+ * @param wiki - The wiki object to check.
620
+ * @returns True if the media is valid, false otherwise.
621
+ */
622
+ declare const isMediaValid: (wiki: Wiki) => boolean;
623
+ /**
624
+ * Checks if any media in the wiki is still uploading.
625
+ * @param wiki - The wiki object to check.
626
+ * @returns True if any media is still uploading, false otherwise.
627
+ */
628
+ declare const isAnyMediaUploading: (wiki: Wiki) => boolean;
629
+ /**
630
+ * Checks if the event URL is missing for an event wiki.
631
+ * @param wiki - The wiki object to check.
632
+ * @returns True if the event URL is missing, false otherwise.
633
+ */
634
+ declare const isEventUrlMissing: (wiki: Wiki) => boolean;
635
+ /**
636
+ * Checks if the event date is missing for an event wiki.
637
+ * @param wiki - The wiki object to check.
638
+ * @returns True if the event date is missing, false otherwise.
639
+ */
640
+ declare const isEventDateMissing: (wiki: Wiki) => boolean;
641
+ /**
642
+ * Checks if the wiki summary exceeds the maximum length.
643
+ * @param wiki - The wiki object to check.
644
+ * @returns True if the summary exceeds the limit, false otherwise.
645
+ */
646
+ declare const isSummaryTooLong: (wiki: Wiki) => boolean;
647
+ /**
648
+ * Checks if the wiki has no citations.
649
+ * @param wiki - The wiki object to check.
650
+ * @returns True if there are no citations, false otherwise.
651
+ */
652
+ declare const hasNoCitations: (wiki: Wiki) => boolean;
653
+ /**
654
+ * Validates a wiki object and returns the validation result.
655
+ * @param wiki - The wiki object to validate.
656
+ * @returns An object containing the validation result and an error message if applicable.
657
+ */
658
+ declare const validateWiki: (wiki: Wiki) => {
659
+ isValid: boolean;
660
+ error: string;
661
+ } | {
662
+ isValid: boolean;
663
+ error?: undefined;
664
+ };
665
+
666
+ declare const WIKI_SUMMARY_MAX_LENGTH = 255;
667
+ declare const WIKI_CONTENT_MIN_WORDS = 100;
668
+ declare const WIKI_TITLE_MAX_LENGTH = 60;
669
+ declare const MEDIA_UPLOAD_PENDING_SUFFIX = "default";
670
+ declare const MAX_MEDIA_COUNT = 25;
671
+ declare const IPFS_HASH_LENGTH = 46;
672
+ declare const EditorContentOverride = "%OVERRIDE@EDITOR@MARKDOWN%";
673
+ declare const CreateNewWikiSlug = "/*CREATE+NEW+WIKI*/";
674
+ declare const MIN_CONTENT_WORD_COUNT = 10;
675
+ declare const GOOD_CONTENT_WORD_COUNT = 500;
676
+ declare const IDEAL_CONTENT_WORD_COUNT = 1500;
677
+ declare const CONTENT_SCORE_WEIGHT = 0.8;
678
+ declare const INTERNAL_LINKS_SCORE_WEIGHT = 0.5;
679
+ declare const CITATIONS_SCORE_WEIGHT = 0.5;
680
+ declare const MEDIA_SCORE_WEIGHT = 0.3;
681
+ declare const TAGS_SCORE_WEIGHT = 0.3;
682
+ declare const SUMMARY_SCORE_WEIGHT = 0.5;
683
+ declare const SOCIAL_SCORE_WEIGHT = 0.5;
684
+ declare const IDEAL_INTERNAL_LINKS_COUNT = 10;
685
+ declare const IDEAL_CITATIONS_COUNT = 10;
686
+ declare const IDEAL_MEDIA_COUNT = 5;
687
+ declare const IDEAL_TAGS_COUNT = 3;
688
+ declare const IDEAL_SUMMARY_LENGTH = 100;
689
+ declare const IDEAL_SOCIAL_MEDIA_COUNT = 4;
690
+ declare const WHITELISTED_DOMAINS: string[];
691
+ declare const WHITELISTED_LINK_NAMES: string[];
692
+
693
+ export { BaseCategory, BaseEvents, CITATIONS_SCORE_WEIGHT, CONTENT_SCORE_WEIGHT, Category, CommonMetaIds, CreateNewWikiSlug, EditSpecificMetaIds, EditorContentOverride, EventType, GOOD_CONTENT_WORD_COUNT, IDEAL_CITATIONS_COUNT, IDEAL_CONTENT_WORD_COUNT, IDEAL_INTERNAL_LINKS_COUNT, IDEAL_MEDIA_COUNT, IDEAL_SOCIAL_MEDIA_COUNT, IDEAL_SUMMARY_LENGTH, IDEAL_TAGS_COUNT, INTERNAL_LINKS_SCORE_WEIGHT, IPFS_HASH_LENGTH, Image, LanguagesISO, LinkedWikiKey, MAX_MEDIA_COUNT, MEDIA_SCORE_WEIGHT, MEDIA_UPLOAD_PENDING_SUFFIX, MIN_CONTENT_WORD_COUNT, Media, MediaSource, MediaType, MetaData, ProfileData, ProfileLinks, Reference, SOCIAL_SCORE_WEIGHT, SUMMARY_SCORE_WEIGHT, TAGS_SCORE_WEIGHT, Tag, ValidatorCodes, WHITELISTED_DOMAINS, WHITELISTED_LINK_NAMES, WIKI_CONTENT_MIN_WORDS, WIKI_SUMMARY_MAX_LENGTH, WIKI_TITLE_MAX_LENGTH, Wiki, areContentLinksVerified, calculateWikiScore, countWords, hasNoCitations, isAnyMediaUploading, isEventDateMissing, isEventUrlMissing, isMediaValid, isSummaryTooLong, isValidUrl, validateWiki };