fandom.js 1.0.0 → 1.1.0

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 (106) hide show
  1. package/LICENSE +23 -0
  2. package/README.md +73 -1
  3. package/dist/client/client.d.ts +69 -0
  4. package/dist/client/client.d.ts.map +1 -0
  5. package/dist/client/client.js +74 -0
  6. package/dist/enums/index.d.ts +7 -0
  7. package/dist/enums/index.d.ts.map +1 -0
  8. package/dist/enums/index.js +6 -0
  9. package/dist/enums/log-type.d.ts +20 -0
  10. package/dist/enums/log-type.d.ts.map +1 -0
  11. package/dist/enums/log-type.js +20 -0
  12. package/dist/enums/namespace.d.ts +25 -0
  13. package/dist/enums/namespace.d.ts.map +1 -0
  14. package/dist/enums/namespace.js +25 -0
  15. package/dist/enums/protection-level.d.ts +9 -0
  16. package/dist/enums/protection-level.d.ts.map +1 -0
  17. package/dist/enums/protection-level.js +9 -0
  18. package/dist/enums/rc-show.d.ts +16 -0
  19. package/dist/enums/rc-show.d.ts.map +1 -0
  20. package/dist/enums/rc-show.js +16 -0
  21. package/dist/enums/rc-type.d.ts +11 -0
  22. package/dist/enums/rc-type.d.ts.map +1 -0
  23. package/dist/enums/rc-type.js +11 -0
  24. package/dist/enums/token-type.d.ts +13 -0
  25. package/dist/enums/token-type.d.ts.map +1 -0
  26. package/dist/enums/token-type.js +13 -0
  27. package/dist/errors/api-error.d.ts +6 -0
  28. package/dist/errors/api-error.d.ts.map +1 -0
  29. package/dist/errors/api-error.js +8 -0
  30. package/dist/events/events.d.ts +14 -0
  31. package/dist/events/events.d.ts.map +1 -0
  32. package/dist/events/events.js +3 -0
  33. package/dist/index.d.ts +17 -0
  34. package/dist/index.d.ts.map +1 -0
  35. package/dist/index.js +16 -0
  36. package/dist/managers/base-manager.d.ts +16 -0
  37. package/dist/managers/base-manager.d.ts.map +1 -0
  38. package/dist/managers/base-manager.js +12 -0
  39. package/dist/managers/category-manager.d.ts +15 -0
  40. package/dist/managers/category-manager.d.ts.map +1 -0
  41. package/dist/managers/category-manager.js +27 -0
  42. package/dist/managers/event-manager.d.ts +48 -0
  43. package/dist/managers/event-manager.d.ts.map +1 -0
  44. package/dist/managers/event-manager.js +110 -0
  45. package/dist/managers/meta-manager.d.ts +14 -0
  46. package/dist/managers/meta-manager.d.ts.map +1 -0
  47. package/dist/managers/meta-manager.js +20 -0
  48. package/dist/managers/page-manager.d.ts +26 -0
  49. package/dist/managers/page-manager.d.ts.map +1 -0
  50. package/dist/managers/page-manager.js +86 -0
  51. package/dist/managers/revision-manager.d.ts +32 -0
  52. package/dist/managers/revision-manager.d.ts.map +1 -0
  53. package/dist/managers/revision-manager.js +69 -0
  54. package/dist/managers/search-manager.d.ts +14 -0
  55. package/dist/managers/search-manager.d.ts.map +1 -0
  56. package/dist/managers/search-manager.js +24 -0
  57. package/dist/managers/user-manager.d.ts +34 -0
  58. package/dist/managers/user-manager.d.ts.map +1 -0
  59. package/dist/managers/user-manager.js +66 -0
  60. package/dist/package-constants.d.ts +5 -0
  61. package/dist/package-constants.d.ts.map +1 -0
  62. package/dist/package-constants.js +4 -0
  63. package/dist/request/rate-limiter.d.ts +13 -0
  64. package/dist/request/rate-limiter.d.ts.map +1 -0
  65. package/dist/request/rate-limiter.js +28 -0
  66. package/dist/request/request-manager.d.ts +29 -0
  67. package/dist/request/request-manager.d.ts.map +1 -0
  68. package/dist/request/request-manager.js +106 -0
  69. package/dist/structures/base-structure.d.ts +24 -0
  70. package/dist/structures/base-structure.d.ts.map +1 -0
  71. package/dist/structures/base-structure.js +13 -0
  72. package/dist/structures/page-structure.d.ts +81 -0
  73. package/dist/structures/page-structure.d.ts.map +1 -0
  74. package/dist/structures/page-structure.js +164 -0
  75. package/dist/structures/revision-structure.d.ts +46 -0
  76. package/dist/structures/revision-structure.d.ts.map +1 -0
  77. package/dist/structures/revision-structure.js +41 -0
  78. package/dist/structures/user-structure.d.ts +45 -0
  79. package/dist/structures/user-structure.d.ts.map +1 -0
  80. package/dist/structures/user-structure.js +52 -0
  81. package/dist/types/api.d.ts +14 -0
  82. package/dist/types/api.d.ts.map +1 -0
  83. package/dist/types/api.js +1 -0
  84. package/dist/types/client.d.ts +39 -0
  85. package/dist/types/client.d.ts.map +1 -0
  86. package/dist/types/client.js +1 -0
  87. package/dist/types/events.d.ts +141 -0
  88. package/dist/types/events.d.ts.map +1 -0
  89. package/dist/types/events.js +1 -0
  90. package/dist/types/index.d.ts +8 -0
  91. package/dist/types/index.d.ts.map +1 -0
  92. package/dist/types/index.js +7 -0
  93. package/dist/types/page.d.ts +105 -0
  94. package/dist/types/page.d.ts.map +1 -0
  95. package/dist/types/page.js +1 -0
  96. package/dist/types/revision.d.ts +83 -0
  97. package/dist/types/revision.d.ts.map +1 -0
  98. package/dist/types/revision.js +1 -0
  99. package/dist/types/site.d.ts +290 -0
  100. package/dist/types/site.d.ts.map +1 -0
  101. package/dist/types/site.js +1 -0
  102. package/dist/types/user.d.ts +100 -0
  103. package/dist/types/user.d.ts.map +1 -0
  104. package/dist/types/user.js +1 -0
  105. package/package.json +54 -8
  106. package/src/index.js +0 -0
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Represents the base URL of a wiki.
3
+ * @example "https://community.fandom.com"
4
+ */
5
+ export type WikiHost = string;
6
+ /**
7
+ * Options for configuring the client.
8
+ */
9
+ export interface ClientOptions {
10
+ /**
11
+ * The base URL of the wiki.
12
+ */
13
+ host: WikiHost;
14
+ /**
15
+ * The path to the API. Defaults to "/api.php".
16
+ */
17
+ apiPath?: string;
18
+ /**
19
+ * The user agent to use for requests.
20
+ */
21
+ userAgent?: string;
22
+ /**
23
+ * The maximum number of retries for failed requests.
24
+ */
25
+ maxRetries?: number;
26
+ /**
27
+ * The maximum number of items to cache.
28
+ */
29
+ cacheSize?: number;
30
+ /**
31
+ * Whether to enable polling for recent changes.
32
+ */
33
+ polling?: boolean;
34
+ /**
35
+ * The interval in milliseconds for polling.
36
+ */
37
+ pollingInterval?: number;
38
+ }
39
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/types/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC;AAE9B;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,141 @@
1
+ import { RCType } from "../enums/index.js";
2
+ /**
3
+ * Represents a recent change on the wiki.
4
+ */
5
+ export interface RecentChange {
6
+ /**
7
+ * The type of change.
8
+ */
9
+ type: RCType;
10
+ /**
11
+ * The namespace ID.
12
+ */
13
+ ns: number;
14
+ /**
15
+ * The title of the page.
16
+ */
17
+ title: string;
18
+ /**
19
+ * The page ID.
20
+ */
21
+ pageid: number;
22
+ /**
23
+ * The revision ID.
24
+ */
25
+ revid: number;
26
+ /**
27
+ * The old revision ID.
28
+ */
29
+ old_revid: number;
30
+ /**
31
+ * The recent change ID.
32
+ */
33
+ rcid: number;
34
+ /**
35
+ * The user who made the change.
36
+ */
37
+ user: string;
38
+ /**
39
+ * The timestamp of the change.
40
+ */
41
+ timestamp: string;
42
+ /**
43
+ * The comment associated with the change.
44
+ */
45
+ comment: string;
46
+ /**
47
+ * Whether the change was made by a bot.
48
+ */
49
+ bot?: boolean;
50
+ /**
51
+ * Whether the page is new.
52
+ */
53
+ new?: boolean;
54
+ /**
55
+ * Whether the change is minor.
56
+ */
57
+ minor?: boolean;
58
+ /**
59
+ * The log ID (if applicable).
60
+ */
61
+ logid?: number;
62
+ /**
63
+ * The log type (if applicable).
64
+ */
65
+ logtype?: string;
66
+ /**
67
+ * The log action (if applicable).
68
+ */
69
+ logaction?: string;
70
+ }
71
+ /**
72
+ * Represents a log event.
73
+ */
74
+ export interface LogEvent {
75
+ /**
76
+ * The log ID.
77
+ */
78
+ logid: number;
79
+ /**
80
+ * The namespace ID.
81
+ */
82
+ ns: number;
83
+ /**
84
+ * The title of the page.
85
+ */
86
+ title: string;
87
+ /**
88
+ * The page ID.
89
+ */
90
+ pageid: number;
91
+ /**
92
+ * The log type.
93
+ */
94
+ logtype: string;
95
+ /**
96
+ * The log action.
97
+ */
98
+ logaction: string;
99
+ /**
100
+ * The user who performed the action.
101
+ */
102
+ user: string;
103
+ /**
104
+ * The timestamp of the event.
105
+ */
106
+ timestamp: string;
107
+ /**
108
+ * The comment associated with the event.
109
+ */
110
+ comment: string;
111
+ /**
112
+ * Additional parameters for the log event.
113
+ */
114
+ params?: Record<string, unknown>;
115
+ }
116
+ /**
117
+ * Represents a file upload event.
118
+ */
119
+ export interface FileUploadEvent {
120
+ /**
121
+ * The title of the file.
122
+ */
123
+ title: string;
124
+ /**
125
+ * The user who uploaded the file.
126
+ */
127
+ user: string;
128
+ /**
129
+ * The timestamp of the upload.
130
+ */
131
+ timestamp: string;
132
+ /**
133
+ * The comment associated with the upload.
134
+ */
135
+ comment: string;
136
+ /**
137
+ * The URL of the uploaded file.
138
+ */
139
+ url: string;
140
+ }
141
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/types/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ export * from "./client.js";
2
+ export * from "./api.js";
3
+ export * from "./revision.js";
4
+ export * from "./page.js";
5
+ export * from "./user.js";
6
+ export * from "./events.js";
7
+ export * from "./site.js";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from "./client.js";
2
+ export * from "./api.js";
3
+ export * from "./revision.js";
4
+ export * from "./page.js";
5
+ export * from "./user.js";
6
+ export * from "./events.js";
7
+ export * from "./site.js";
@@ -0,0 +1,105 @@
1
+ import { APIRevision, RevisionData } from "./revision.js";
2
+ /**
3
+ * Represents category data for a page.
4
+ */
5
+ export interface CategoryData {
6
+ /**
7
+ * The namespace ID of the category.
8
+ */
9
+ ns: number;
10
+ /**
11
+ * The title of the category.
12
+ */
13
+ title: string;
14
+ }
15
+ /**
16
+ * Represents a page object returned by the API.
17
+ */
18
+ export interface APIPage {
19
+ /**
20
+ * The ID of the page.
21
+ */
22
+ pageid: number;
23
+ /**
24
+ * The namespace ID of the page.
25
+ */
26
+ ns: number;
27
+ /**
28
+ * The title of the page.
29
+ */
30
+ title: string;
31
+ /**
32
+ * The extract (summary) of the page.
33
+ */
34
+ extract?: string;
35
+ /**
36
+ * The revisions of the page.
37
+ */
38
+ revisions?: APIRevision[];
39
+ /**
40
+ * The categories the page belongs to.
41
+ */
42
+ categories?: CategoryData[];
43
+ /**
44
+ * The ID of the last revision.
45
+ */
46
+ lastrevid?: number;
47
+ /**
48
+ * The length of the page content.
49
+ */
50
+ length?: number;
51
+ /**
52
+ * The timestamp when the page was last touched.
53
+ */
54
+ touched?: string;
55
+ /**
56
+ * Allow other properties from the API.
57
+ */
58
+ [key: string]: unknown;
59
+ }
60
+ /**
61
+ * Represents a summary of a page.
62
+ */
63
+ export interface PageSummary {
64
+ /**
65
+ * The ID of the page.
66
+ */
67
+ pageid: number;
68
+ /**
69
+ * The namespace ID of the page.
70
+ */
71
+ ns: number;
72
+ /**
73
+ * The title of the page.
74
+ */
75
+ title: string;
76
+ /**
77
+ * The extract (summary) of the page.
78
+ */
79
+ extract?: string;
80
+ /**
81
+ * The revisions of the page.
82
+ */
83
+ revisions?: RevisionData[];
84
+ /**
85
+ * The categories the page belongs to.
86
+ */
87
+ categories?: CategoryData[];
88
+ /**
89
+ * The ID of the last revision.
90
+ */
91
+ lastrevid?: number;
92
+ /**
93
+ * The length of the page content.
94
+ */
95
+ length?: number;
96
+ /**
97
+ * The timestamp when the page was last touched.
98
+ */
99
+ touched?: string;
100
+ /**
101
+ * Allow other properties.
102
+ */
103
+ [key: string]: unknown;
104
+ }
105
+ //# sourceMappingURL=page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../src/types/page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,WAAW,EAAE,CAAC;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Represents a revision object returned by the API.
3
+ */
4
+ export interface APIRevision {
5
+ /**
6
+ * The ID of the revision.
7
+ */
8
+ revid: number;
9
+ /**
10
+ * The ID of the parent revision.
11
+ */
12
+ parentid: number;
13
+ /**
14
+ * The user who created the revision.
15
+ */
16
+ user: string;
17
+ /**
18
+ * The timestamp of the revision.
19
+ */
20
+ timestamp: string;
21
+ /**
22
+ * The comment associated with the revision.
23
+ */
24
+ comment: string;
25
+ /**
26
+ * The content of the revision (legacy format).
27
+ */
28
+ "*"?: string;
29
+ /**
30
+ * The title of the page.
31
+ */
32
+ title?: string;
33
+ /**
34
+ * The slots of the revision (modern format).
35
+ */
36
+ slots?: {
37
+ main?: {
38
+ "*"?: string;
39
+ };
40
+ Main?: {
41
+ "*"?: string;
42
+ };
43
+ [key: string]: unknown;
44
+ };
45
+ /**
46
+ * Whether the revision is minor.
47
+ */
48
+ minor?: boolean;
49
+ }
50
+ /**
51
+ * Represents processed revision data.
52
+ */
53
+ export interface RevisionData {
54
+ /**
55
+ * The ID of the revision.
56
+ */
57
+ revid: number;
58
+ /**
59
+ * The ID of the parent revision.
60
+ */
61
+ parentid: number;
62
+ /**
63
+ * The user who created the revision.
64
+ */
65
+ user: string;
66
+ /**
67
+ * The timestamp of the revision.
68
+ */
69
+ timestamp: string;
70
+ /**
71
+ * The comment associated with the revision.
72
+ */
73
+ comment: string;
74
+ /**
75
+ * The content of the revision.
76
+ */
77
+ content?: string;
78
+ /**
79
+ * Whether the revision is minor.
80
+ */
81
+ minor?: boolean;
82
+ }
83
+ //# sourceMappingURL=revision.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revision.d.ts","sourceRoot":"","sources":["../../src/types/revision.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,EAAE;YACL,GAAG,CAAC,EAAE,MAAM,CAAC;SACd,CAAC;QACF,IAAI,CAAC,EAAE;YACL,GAAG,CAAC,EAAE,MAAM,CAAC;SACd,CAAC;QACF,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,290 @@
1
+ /**
2
+ * Represents general site information.
3
+ */
4
+ export interface GeneralSiteInfo {
5
+ /**
6
+ * The main page of the wiki.
7
+ */
8
+ mainpage: string;
9
+ /**
10
+ * The base URL of the wiki.
11
+ */
12
+ base: string;
13
+ /**
14
+ * The name of the site.
15
+ */
16
+ sitename: string;
17
+ /**
18
+ * The URL of the logo.
19
+ */
20
+ logo: string;
21
+ /**
22
+ * The generator used by the wiki.
23
+ */
24
+ generator: string;
25
+ /**
26
+ * The PHP version.
27
+ */
28
+ phpversion: string;
29
+ /**
30
+ * The PHP SAPI.
31
+ */
32
+ phpsapi: string;
33
+ /**
34
+ * The database type.
35
+ */
36
+ dbtype: string;
37
+ /**
38
+ * The database version.
39
+ */
40
+ dbversion: string;
41
+ /**
42
+ * Whether image whitelist is enabled.
43
+ */
44
+ imagewhitelistenabled: string;
45
+ /**
46
+ * Language conversion settings.
47
+ */
48
+ langconversion: string;
49
+ /**
50
+ * Title conversion settings.
51
+ */
52
+ titleconversion: string;
53
+ /**
54
+ * Link prefix charset.
55
+ */
56
+ linkprefixcharset: string;
57
+ /**
58
+ * Link prefix.
59
+ */
60
+ linkprefix: string;
61
+ /**
62
+ * Link trail.
63
+ */
64
+ linktrail: string;
65
+ /**
66
+ * Legal title characters.
67
+ */
68
+ legaltitlechars: string;
69
+ /**
70
+ * Invalid username characters.
71
+ */
72
+ invalidusernamechars: string;
73
+ /**
74
+ * Fix Arabic unicode.
75
+ */
76
+ fixarabicunicode: string;
77
+ /**
78
+ * Fix Malayalam unicode.
79
+ */
80
+ fixmalayalamunicode: string;
81
+ /**
82
+ * Case sensitivity.
83
+ */
84
+ case: string;
85
+ /**
86
+ * Language code.
87
+ */
88
+ lang: string;
89
+ /**
90
+ * Fallback languages.
91
+ */
92
+ fallback: {
93
+ code: string;
94
+ }[];
95
+ /**
96
+ * Fallback 8-bit encoding.
97
+ */
98
+ fallback8bitEncoding: string;
99
+ /**
100
+ * Whether write API is enabled.
101
+ */
102
+ writeapi: string;
103
+ /**
104
+ * Maximum article size.
105
+ */
106
+ maxarticlesize: number;
107
+ /**
108
+ * Timezone.
109
+ */
110
+ timezone: string;
111
+ /**
112
+ * Time offset.
113
+ */
114
+ timeoffset: number;
115
+ /**
116
+ * Article path.
117
+ */
118
+ articlepath: string;
119
+ /**
120
+ * Script path.
121
+ */
122
+ scriptpath: string;
123
+ /**
124
+ * Script URL.
125
+ */
126
+ script: string;
127
+ /**
128
+ * Variant article path.
129
+ */
130
+ variantarticlepath: string;
131
+ /**
132
+ * Server URL.
133
+ */
134
+ server: string;
135
+ /**
136
+ * Server name.
137
+ */
138
+ servername: string;
139
+ /**
140
+ * Wiki ID.
141
+ */
142
+ wikiid: string;
143
+ /**
144
+ * Current time.
145
+ */
146
+ time: string;
147
+ /**
148
+ * Miser mode.
149
+ */
150
+ misermode: string;
151
+ /**
152
+ * Whether uploads are enabled.
153
+ */
154
+ uploadsenabled: string;
155
+ /**
156
+ * Maximum upload size.
157
+ */
158
+ maxuploadsize: number;
159
+ /**
160
+ * Minimum upload chunk size.
161
+ */
162
+ minuploadchunksize: number;
163
+ /**
164
+ * Gallery options.
165
+ */
166
+ galleryoptions: {
167
+ imagesPerRow: number;
168
+ imageWidth: number;
169
+ imageHeight: number;
170
+ captionLength: number;
171
+ showBytes: string;
172
+ showDimensions: string;
173
+ mode: string;
174
+ };
175
+ /**
176
+ * Thumbnail limits.
177
+ */
178
+ thumblimits: number[];
179
+ /**
180
+ * Image limits.
181
+ */
182
+ imagelimits: {
183
+ width: number;
184
+ height: number;
185
+ }[];
186
+ /**
187
+ * Favicon URL.
188
+ */
189
+ favicon: string;
190
+ /**
191
+ * Central ID.
192
+ */
193
+ centralid: string;
194
+ /**
195
+ * All central IDs.
196
+ */
197
+ allcentralids: Record<string, string>;
198
+ }
199
+ /**
200
+ * Represents namespace information.
201
+ */
202
+ export interface NamespaceInfo {
203
+ /**
204
+ * The ID of the namespace.
205
+ */
206
+ id: number;
207
+ /**
208
+ * Case sensitivity.
209
+ */
210
+ case: string;
211
+ /**
212
+ * Canonical name.
213
+ */
214
+ canonical?: string;
215
+ /**
216
+ * Local name.
217
+ */
218
+ "*": string;
219
+ /**
220
+ * Subpages enabled.
221
+ */
222
+ subpages?: string;
223
+ /**
224
+ * Content namespace.
225
+ */
226
+ content?: string;
227
+ /**
228
+ * Non-includable.
229
+ */
230
+ nonincludable?: string;
231
+ }
232
+ /**
233
+ * Represents site statistics.
234
+ */
235
+ export interface SiteStatistics {
236
+ /**
237
+ * Total pages.
238
+ */
239
+ pages: number;
240
+ /**
241
+ * Total articles.
242
+ */
243
+ articles: number;
244
+ /**
245
+ * Total edits.
246
+ */
247
+ edits: number;
248
+ /**
249
+ * Total images.
250
+ */
251
+ images: number;
252
+ /**
253
+ * Total users.
254
+ */
255
+ users: number;
256
+ /**
257
+ * Active users.
258
+ */
259
+ activeusers: number;
260
+ /**
261
+ * Admins.
262
+ */
263
+ admins: number;
264
+ /**
265
+ * Job queue length.
266
+ */
267
+ jobs: number;
268
+ }
269
+ /**
270
+ * Represents site information.
271
+ */
272
+ export interface SiteInfo {
273
+ /**
274
+ * General site information.
275
+ */
276
+ general: GeneralSiteInfo;
277
+ /**
278
+ * Namespace information.
279
+ */
280
+ namespaces: Record<string, NamespaceInfo>;
281
+ /**
282
+ * Site statistics.
283
+ */
284
+ statistics: SiteStatistics;
285
+ /**
286
+ * Allow other properties.
287
+ */
288
+ [key: string]: unknown;
289
+ }
290
+ //# sourceMappingURL=site.d.ts.map