@ukwhatn/wikidot 4.0.7 → 4.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.
- package/dist/index.cjs +228 -36
- package/dist/index.d.cts +119 -11
- package/dist/index.d.ts +119 -11
- package/dist/index.js +226 -33
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -467,6 +467,24 @@ interface ForumThreadRef {
|
|
|
467
467
|
readonly category?: ForumCategoryRef | null;
|
|
468
468
|
}
|
|
469
469
|
/**
|
|
470
|
+
* Forum post reference interface
|
|
471
|
+
* Used to avoid direct dependency on ForumPost type
|
|
472
|
+
*/
|
|
473
|
+
interface ForumPostRef {
|
|
474
|
+
/**
|
|
475
|
+
* Post ID
|
|
476
|
+
*/
|
|
477
|
+
readonly id: number;
|
|
478
|
+
/**
|
|
479
|
+
* Post title
|
|
480
|
+
*/
|
|
481
|
+
readonly title: string;
|
|
482
|
+
/**
|
|
483
|
+
* Thread reference
|
|
484
|
+
*/
|
|
485
|
+
readonly thread: ForumThreadRef;
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
470
488
|
* Page reference interface
|
|
471
489
|
* Used to avoid direct dependency on Page type
|
|
472
490
|
*/
|
|
@@ -789,6 +807,86 @@ declare class PrivateMessageSentBox extends PrivateMessageCollection {
|
|
|
789
807
|
}
|
|
790
808
|
import { Element } from "domhandler";
|
|
791
809
|
/**
|
|
810
|
+
* Forum post revision data
|
|
811
|
+
*/
|
|
812
|
+
interface ForumPostRevisionData {
|
|
813
|
+
post: ForumPostRef;
|
|
814
|
+
id: number;
|
|
815
|
+
revNo: number;
|
|
816
|
+
createdBy: AbstractUser;
|
|
817
|
+
createdAt: Date;
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* Forum post revision (version in edit history)
|
|
821
|
+
*/
|
|
822
|
+
declare class ForumPostRevision {
|
|
823
|
+
/** Post this revision belongs to */
|
|
824
|
+
readonly post: ForumPostRef;
|
|
825
|
+
/** Revision ID */
|
|
826
|
+
readonly id: number;
|
|
827
|
+
/** Revision number (0 = initial version) */
|
|
828
|
+
readonly revNo: number;
|
|
829
|
+
/** Revision creator */
|
|
830
|
+
readonly createdBy: AbstractUser;
|
|
831
|
+
/** Revision creation date */
|
|
832
|
+
readonly createdAt: Date;
|
|
833
|
+
/** HTML content (internal cache) */
|
|
834
|
+
private _html;
|
|
835
|
+
constructor(data: ForumPostRevisionData);
|
|
836
|
+
/**
|
|
837
|
+
* Whether HTML content has been acquired
|
|
838
|
+
*/
|
|
839
|
+
isHtmlAcquired(): boolean;
|
|
840
|
+
/**
|
|
841
|
+
* Get HTML content (cached)
|
|
842
|
+
*/
|
|
843
|
+
get html(): string | null;
|
|
844
|
+
/**
|
|
845
|
+
* Set HTML content
|
|
846
|
+
*/
|
|
847
|
+
set html(value: string | null);
|
|
848
|
+
/**
|
|
849
|
+
* Get revision HTML content
|
|
850
|
+
* @returns HTML string
|
|
851
|
+
*/
|
|
852
|
+
getHtml(): WikidotResultAsync<string>;
|
|
853
|
+
toString(): string;
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* Forum post revision collection
|
|
857
|
+
*/
|
|
858
|
+
declare class ForumPostRevisionCollection extends Array<ForumPostRevision> {
|
|
859
|
+
readonly post: ForumPostRef;
|
|
860
|
+
constructor(post: ForumPostRef, revisions?: ForumPostRevision[]);
|
|
861
|
+
/**
|
|
862
|
+
* Find by ID
|
|
863
|
+
* @param id - Revision ID
|
|
864
|
+
* @returns Revision (undefined if not found)
|
|
865
|
+
*/
|
|
866
|
+
findById(id: number): ForumPostRevision | undefined;
|
|
867
|
+
/**
|
|
868
|
+
* Find by revision number
|
|
869
|
+
* @param revNo - Revision number
|
|
870
|
+
* @returns Revision (undefined if not found)
|
|
871
|
+
*/
|
|
872
|
+
findByRevNo(revNo: number): ForumPostRevision | undefined;
|
|
873
|
+
/**
|
|
874
|
+
* Get HTML for all revisions
|
|
875
|
+
* @returns Array of HTML strings
|
|
876
|
+
*/
|
|
877
|
+
getHtmls(): WikidotResultAsync<string[]>;
|
|
878
|
+
/**
|
|
879
|
+
* Parse revisions from HTML (internal method)
|
|
880
|
+
*/
|
|
881
|
+
private static _parse;
|
|
882
|
+
/**
|
|
883
|
+
* Get all revisions for a post
|
|
884
|
+
* @param post - Forum post reference
|
|
885
|
+
* @returns Revision collection
|
|
886
|
+
*/
|
|
887
|
+
static acquireAll(post: ForumPostRef): WikidotResultAsync<ForumPostRevisionCollection>;
|
|
888
|
+
}
|
|
889
|
+
/**
|
|
792
890
|
* Forum post data
|
|
793
891
|
*/
|
|
794
892
|
interface ForumPostData {
|
|
@@ -818,6 +916,7 @@ declare class ForumPost {
|
|
|
818
916
|
readonly editedAt: Date | null;
|
|
819
917
|
private _parentId;
|
|
820
918
|
private _source;
|
|
919
|
+
private _revisions;
|
|
821
920
|
constructor(data: ForumPostData);
|
|
822
921
|
/**
|
|
823
922
|
* Parent post ID
|
|
@@ -833,6 +932,15 @@ declare class ForumPost {
|
|
|
833
932
|
* @param title - New title (keeps current title if omitted)
|
|
834
933
|
*/
|
|
835
934
|
edit(source: string, title?: string): WikidotResultAsync<void>;
|
|
935
|
+
/**
|
|
936
|
+
* Whether the post has been edited (has revisions)
|
|
937
|
+
*/
|
|
938
|
+
get hasRevisions(): boolean;
|
|
939
|
+
/**
|
|
940
|
+
* Get post revisions (edit history)
|
|
941
|
+
* @returns Revision collection
|
|
942
|
+
*/
|
|
943
|
+
getRevisions(): WikidotResultAsync<ForumPostRevisionCollection>;
|
|
836
944
|
toString(): string;
|
|
837
945
|
}
|
|
838
946
|
/**
|
|
@@ -872,7 +980,7 @@ interface ForumThreadData {
|
|
|
872
980
|
/**
|
|
873
981
|
* Forum thread
|
|
874
982
|
*/
|
|
875
|
-
declare class
|
|
983
|
+
declare class ForumThread {
|
|
876
984
|
readonly site: Site;
|
|
877
985
|
readonly id: number;
|
|
878
986
|
readonly title: string;
|
|
@@ -894,23 +1002,23 @@ declare class ForumThread2 {
|
|
|
894
1002
|
/**
|
|
895
1003
|
* Reply to thread
|
|
896
1004
|
*/
|
|
897
|
-
reply(source: string, title?: string, parentPostId?: number | null): WikidotResultAsync<
|
|
1005
|
+
reply(source: string, title?: string, parentPostId?: number | null): WikidotResultAsync<ForumThread>;
|
|
898
1006
|
toString(): string;
|
|
899
1007
|
/**
|
|
900
1008
|
* Get thread by ID
|
|
901
1009
|
*/
|
|
902
|
-
static getFromId(site: Site, threadId: number, category?: ForumCategory | null): WikidotResultAsync<
|
|
1010
|
+
static getFromId(site: Site, threadId: number, category?: ForumCategory | null): WikidotResultAsync<ForumThread>;
|
|
903
1011
|
}
|
|
904
1012
|
/**
|
|
905
1013
|
* Forum thread collection
|
|
906
1014
|
*/
|
|
907
|
-
declare class ForumThreadCollection extends Array<
|
|
1015
|
+
declare class ForumThreadCollection extends Array<ForumThread> {
|
|
908
1016
|
readonly site: Site;
|
|
909
|
-
constructor(site: Site, threads?:
|
|
1017
|
+
constructor(site: Site, threads?: ForumThread[]);
|
|
910
1018
|
/**
|
|
911
1019
|
* Find by ID
|
|
912
1020
|
*/
|
|
913
|
-
findById(id: number):
|
|
1021
|
+
findById(id: number): ForumThread | undefined;
|
|
914
1022
|
/**
|
|
915
1023
|
* Get all threads in category
|
|
916
1024
|
*/
|
|
@@ -920,7 +1028,7 @@ declare class ForumThreadCollection extends Array<ForumThread2> {
|
|
|
920
1028
|
* @param site - Site instance
|
|
921
1029
|
* @param threadId - Thread ID
|
|
922
1030
|
*/
|
|
923
|
-
static fromId(site: Site, threadId: number): WikidotResultAsync<
|
|
1031
|
+
static fromId(site: Site, threadId: number): WikidotResultAsync<ForumThread>;
|
|
924
1032
|
/**
|
|
925
1033
|
* Get threads by thread IDs
|
|
926
1034
|
*/
|
|
@@ -960,7 +1068,7 @@ declare class ForumCategory {
|
|
|
960
1068
|
/**
|
|
961
1069
|
* Create thread
|
|
962
1070
|
*/
|
|
963
|
-
createThread(title: string, description: string, source: string): WikidotResultAsync<
|
|
1071
|
+
createThread(title: string, description: string, source: string): WikidotResultAsync<ForumThread>;
|
|
964
1072
|
toString(): string;
|
|
965
1073
|
}
|
|
966
1074
|
/**
|
|
@@ -1648,7 +1756,7 @@ declare class Page {
|
|
|
1648
1756
|
/**
|
|
1649
1757
|
* Get the discussion thread for the page
|
|
1650
1758
|
*/
|
|
1651
|
-
getDiscussion(): WikidotResultAsync<
|
|
1759
|
+
getDiscussion(): WikidotResultAsync<ForumThread | null>;
|
|
1652
1760
|
/**
|
|
1653
1761
|
* Get the list of meta tags for the page
|
|
1654
1762
|
* @returns Meta tag collection
|
|
@@ -1941,7 +2049,7 @@ declare class ForumAccessor {
|
|
|
1941
2049
|
* @param threadId - Thread ID
|
|
1942
2050
|
* @returns Thread
|
|
1943
2051
|
*/
|
|
1944
|
-
getThread(threadId: number): WikidotResultAsync<
|
|
2052
|
+
getThread(threadId: number): WikidotResultAsync<ForumThread>;
|
|
1945
2053
|
/**
|
|
1946
2054
|
* Get multiple threads
|
|
1947
2055
|
* @param threadIds - Array of thread IDs
|
|
@@ -2170,4 +2278,4 @@ declare function parseUser2(client: ClientRef, elem: cheerio2.Cheerio<AnyNode2>)
|
|
|
2170
2278
|
* @returns Parsed Date, or null on parse failure
|
|
2171
2279
|
*/
|
|
2172
2280
|
declare function parseOdate(elem: cheerio2.Cheerio<AnyNode2>): Date | null;
|
|
2173
|
-
export { wdOkAsync, wdOk, wdErrAsync, wdErr, userLookup, setupConsoleHandler, parseUser2 as parseUser, parseOdate, pageLookup, nullHandler, memberLookup, maskSensitiveData, logout, login, logger, isSuccessResponse, getLogger, fromPromise, consoleHandler, combineResults, amcResponseSchema, WikidotUser, WikidotStatusError, WikidotResultAsync, WikidotResult, WikidotError, UserType, UserIdentifier, UserData, UserCollection, UserAccessor, User, UnexpectedError, TargetExistsError, TargetError, SiteUnixName, SiteRef, SiteMemberData, SiteMember, SiteData, SiteChangeData, SiteChangeCollection, SiteChange, SiteApplicationData, SiteApplication, SiteAccessor, Site, SessionError, SessionCreateError, SearchPagesQueryParams, SearchPagesQuery, ResponseDataError, QuickModuleName, QuickModule, QMCUser, QMCPage, PrivateMessageSentBox, PrivateMessageInbox, PrivateMessageData, PrivateMessageCollection, PrivateMessageAccessor, PrivateMessage, PagesAccessor, PageVoteData, PageVoteCollection, PageVote, PageSourceData, PageSource, PageRevisionData, PageRevisionCollection, PageRevision, PageRef, PageMetaData, PageMetaCollection, PageMeta, PageFullname, PageFileData, PageFileCollection, PageFile, PageData, PageCollection, PageAccessor, Page, NotFoundException, NoElementError, MemberAccessor, LoginRequiredError, Logger, LogLevel, LogHandler, GuestUser, GetUserOptions, ForumThreadRef, ForumThreadData, ForumThreadCollection,
|
|
2281
|
+
export { wdOkAsync, wdOk, wdErrAsync, wdErr, userLookup, setupConsoleHandler, parseUser2 as parseUser, parseOdate, pageLookup, nullHandler, memberLookup, maskSensitiveData, logout, login, logger, isSuccessResponse, getLogger, fromPromise, consoleHandler, combineResults, amcResponseSchema, WikidotUser, WikidotStatusError, WikidotResultAsync, WikidotResult, WikidotError, UserType, UserIdentifier, UserData, UserCollection, UserAccessor, User, UnexpectedError, TargetExistsError, TargetError, SiteUnixName, SiteRef, SiteMemberData, SiteMember, SiteData, SiteChangeData, SiteChangeCollection, SiteChange, SiteApplicationData, SiteApplication, SiteAccessor, Site, SessionError, SessionCreateError, SearchPagesQueryParams, SearchPagesQuery, ResponseDataError, QuickModuleName, QuickModule, QMCUser, QMCPage, PrivateMessageSentBox, PrivateMessageInbox, PrivateMessageData, PrivateMessageCollection, PrivateMessageAccessor, PrivateMessage, PagesAccessor, PageVoteData, PageVoteCollection, PageVote, PageSourceData, PageSource, PageRevisionData, PageRevisionCollection, PageRevision, PageRef, PageMetaData, PageMetaCollection, PageMeta, PageFullname, PageFileData, PageFileCollection, PageFile, PageData, PageCollection, PageAccessor, Page, NotFoundException, NoElementError, MemberAccessor, LoginRequiredError, Logger, LogLevel, LogHandler, GuestUser, GetUserOptions, ForumThreadRef, ForumThreadData, ForumThreadCollection, ForumThread, ForumPostRevisionData, ForumPostRevisionCollection, ForumPostRevision, ForumPostRef, ForumPostData, ForumPostCollection, ForumPost, ForumCategoryRef, ForumCategoryData, ForumCategoryCollection, ForumCategory, ForumAccessor, ForbiddenError, DeletedUser, DateTimeString, DEFAULT_PER_PAGE, DEFAULT_MODULE_BODY, DEFAULT_AMC_CONFIG, ClientRef, ClientOptions, Client, AuthClientContext, AnonymousUser, AbstractUser, AMCSuccessResponse, AMCResponse, AMCRequestOptions, AMCRequestBody, AMCHttpError, AMCHeaderRef, AMCHeader, AMCError, AMCConfig, AMCClientRef, AMCClient };
|
package/dist/index.d.ts
CHANGED
|
@@ -467,6 +467,24 @@ interface ForumThreadRef {
|
|
|
467
467
|
readonly category?: ForumCategoryRef | null;
|
|
468
468
|
}
|
|
469
469
|
/**
|
|
470
|
+
* Forum post reference interface
|
|
471
|
+
* Used to avoid direct dependency on ForumPost type
|
|
472
|
+
*/
|
|
473
|
+
interface ForumPostRef {
|
|
474
|
+
/**
|
|
475
|
+
* Post ID
|
|
476
|
+
*/
|
|
477
|
+
readonly id: number;
|
|
478
|
+
/**
|
|
479
|
+
* Post title
|
|
480
|
+
*/
|
|
481
|
+
readonly title: string;
|
|
482
|
+
/**
|
|
483
|
+
* Thread reference
|
|
484
|
+
*/
|
|
485
|
+
readonly thread: ForumThreadRef;
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
470
488
|
* Page reference interface
|
|
471
489
|
* Used to avoid direct dependency on Page type
|
|
472
490
|
*/
|
|
@@ -789,6 +807,86 @@ declare class PrivateMessageSentBox extends PrivateMessageCollection {
|
|
|
789
807
|
}
|
|
790
808
|
import { Element } from "domhandler";
|
|
791
809
|
/**
|
|
810
|
+
* Forum post revision data
|
|
811
|
+
*/
|
|
812
|
+
interface ForumPostRevisionData {
|
|
813
|
+
post: ForumPostRef;
|
|
814
|
+
id: number;
|
|
815
|
+
revNo: number;
|
|
816
|
+
createdBy: AbstractUser;
|
|
817
|
+
createdAt: Date;
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* Forum post revision (version in edit history)
|
|
821
|
+
*/
|
|
822
|
+
declare class ForumPostRevision {
|
|
823
|
+
/** Post this revision belongs to */
|
|
824
|
+
readonly post: ForumPostRef;
|
|
825
|
+
/** Revision ID */
|
|
826
|
+
readonly id: number;
|
|
827
|
+
/** Revision number (0 = initial version) */
|
|
828
|
+
readonly revNo: number;
|
|
829
|
+
/** Revision creator */
|
|
830
|
+
readonly createdBy: AbstractUser;
|
|
831
|
+
/** Revision creation date */
|
|
832
|
+
readonly createdAt: Date;
|
|
833
|
+
/** HTML content (internal cache) */
|
|
834
|
+
private _html;
|
|
835
|
+
constructor(data: ForumPostRevisionData);
|
|
836
|
+
/**
|
|
837
|
+
* Whether HTML content has been acquired
|
|
838
|
+
*/
|
|
839
|
+
isHtmlAcquired(): boolean;
|
|
840
|
+
/**
|
|
841
|
+
* Get HTML content (cached)
|
|
842
|
+
*/
|
|
843
|
+
get html(): string | null;
|
|
844
|
+
/**
|
|
845
|
+
* Set HTML content
|
|
846
|
+
*/
|
|
847
|
+
set html(value: string | null);
|
|
848
|
+
/**
|
|
849
|
+
* Get revision HTML content
|
|
850
|
+
* @returns HTML string
|
|
851
|
+
*/
|
|
852
|
+
getHtml(): WikidotResultAsync<string>;
|
|
853
|
+
toString(): string;
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* Forum post revision collection
|
|
857
|
+
*/
|
|
858
|
+
declare class ForumPostRevisionCollection extends Array<ForumPostRevision> {
|
|
859
|
+
readonly post: ForumPostRef;
|
|
860
|
+
constructor(post: ForumPostRef, revisions?: ForumPostRevision[]);
|
|
861
|
+
/**
|
|
862
|
+
* Find by ID
|
|
863
|
+
* @param id - Revision ID
|
|
864
|
+
* @returns Revision (undefined if not found)
|
|
865
|
+
*/
|
|
866
|
+
findById(id: number): ForumPostRevision | undefined;
|
|
867
|
+
/**
|
|
868
|
+
* Find by revision number
|
|
869
|
+
* @param revNo - Revision number
|
|
870
|
+
* @returns Revision (undefined if not found)
|
|
871
|
+
*/
|
|
872
|
+
findByRevNo(revNo: number): ForumPostRevision | undefined;
|
|
873
|
+
/**
|
|
874
|
+
* Get HTML for all revisions
|
|
875
|
+
* @returns Array of HTML strings
|
|
876
|
+
*/
|
|
877
|
+
getHtmls(): WikidotResultAsync<string[]>;
|
|
878
|
+
/**
|
|
879
|
+
* Parse revisions from HTML (internal method)
|
|
880
|
+
*/
|
|
881
|
+
private static _parse;
|
|
882
|
+
/**
|
|
883
|
+
* Get all revisions for a post
|
|
884
|
+
* @param post - Forum post reference
|
|
885
|
+
* @returns Revision collection
|
|
886
|
+
*/
|
|
887
|
+
static acquireAll(post: ForumPostRef): WikidotResultAsync<ForumPostRevisionCollection>;
|
|
888
|
+
}
|
|
889
|
+
/**
|
|
792
890
|
* Forum post data
|
|
793
891
|
*/
|
|
794
892
|
interface ForumPostData {
|
|
@@ -818,6 +916,7 @@ declare class ForumPost {
|
|
|
818
916
|
readonly editedAt: Date | null;
|
|
819
917
|
private _parentId;
|
|
820
918
|
private _source;
|
|
919
|
+
private _revisions;
|
|
821
920
|
constructor(data: ForumPostData);
|
|
822
921
|
/**
|
|
823
922
|
* Parent post ID
|
|
@@ -833,6 +932,15 @@ declare class ForumPost {
|
|
|
833
932
|
* @param title - New title (keeps current title if omitted)
|
|
834
933
|
*/
|
|
835
934
|
edit(source: string, title?: string): WikidotResultAsync<void>;
|
|
935
|
+
/**
|
|
936
|
+
* Whether the post has been edited (has revisions)
|
|
937
|
+
*/
|
|
938
|
+
get hasRevisions(): boolean;
|
|
939
|
+
/**
|
|
940
|
+
* Get post revisions (edit history)
|
|
941
|
+
* @returns Revision collection
|
|
942
|
+
*/
|
|
943
|
+
getRevisions(): WikidotResultAsync<ForumPostRevisionCollection>;
|
|
836
944
|
toString(): string;
|
|
837
945
|
}
|
|
838
946
|
/**
|
|
@@ -872,7 +980,7 @@ interface ForumThreadData {
|
|
|
872
980
|
/**
|
|
873
981
|
* Forum thread
|
|
874
982
|
*/
|
|
875
|
-
declare class
|
|
983
|
+
declare class ForumThread {
|
|
876
984
|
readonly site: Site;
|
|
877
985
|
readonly id: number;
|
|
878
986
|
readonly title: string;
|
|
@@ -894,23 +1002,23 @@ declare class ForumThread2 {
|
|
|
894
1002
|
/**
|
|
895
1003
|
* Reply to thread
|
|
896
1004
|
*/
|
|
897
|
-
reply(source: string, title?: string, parentPostId?: number | null): WikidotResultAsync<
|
|
1005
|
+
reply(source: string, title?: string, parentPostId?: number | null): WikidotResultAsync<ForumThread>;
|
|
898
1006
|
toString(): string;
|
|
899
1007
|
/**
|
|
900
1008
|
* Get thread by ID
|
|
901
1009
|
*/
|
|
902
|
-
static getFromId(site: Site, threadId: number, category?: ForumCategory | null): WikidotResultAsync<
|
|
1010
|
+
static getFromId(site: Site, threadId: number, category?: ForumCategory | null): WikidotResultAsync<ForumThread>;
|
|
903
1011
|
}
|
|
904
1012
|
/**
|
|
905
1013
|
* Forum thread collection
|
|
906
1014
|
*/
|
|
907
|
-
declare class ForumThreadCollection extends Array<
|
|
1015
|
+
declare class ForumThreadCollection extends Array<ForumThread> {
|
|
908
1016
|
readonly site: Site;
|
|
909
|
-
constructor(site: Site, threads?:
|
|
1017
|
+
constructor(site: Site, threads?: ForumThread[]);
|
|
910
1018
|
/**
|
|
911
1019
|
* Find by ID
|
|
912
1020
|
*/
|
|
913
|
-
findById(id: number):
|
|
1021
|
+
findById(id: number): ForumThread | undefined;
|
|
914
1022
|
/**
|
|
915
1023
|
* Get all threads in category
|
|
916
1024
|
*/
|
|
@@ -920,7 +1028,7 @@ declare class ForumThreadCollection extends Array<ForumThread2> {
|
|
|
920
1028
|
* @param site - Site instance
|
|
921
1029
|
* @param threadId - Thread ID
|
|
922
1030
|
*/
|
|
923
|
-
static fromId(site: Site, threadId: number): WikidotResultAsync<
|
|
1031
|
+
static fromId(site: Site, threadId: number): WikidotResultAsync<ForumThread>;
|
|
924
1032
|
/**
|
|
925
1033
|
* Get threads by thread IDs
|
|
926
1034
|
*/
|
|
@@ -960,7 +1068,7 @@ declare class ForumCategory {
|
|
|
960
1068
|
/**
|
|
961
1069
|
* Create thread
|
|
962
1070
|
*/
|
|
963
|
-
createThread(title: string, description: string, source: string): WikidotResultAsync<
|
|
1071
|
+
createThread(title: string, description: string, source: string): WikidotResultAsync<ForumThread>;
|
|
964
1072
|
toString(): string;
|
|
965
1073
|
}
|
|
966
1074
|
/**
|
|
@@ -1648,7 +1756,7 @@ declare class Page {
|
|
|
1648
1756
|
/**
|
|
1649
1757
|
* Get the discussion thread for the page
|
|
1650
1758
|
*/
|
|
1651
|
-
getDiscussion(): WikidotResultAsync<
|
|
1759
|
+
getDiscussion(): WikidotResultAsync<ForumThread | null>;
|
|
1652
1760
|
/**
|
|
1653
1761
|
* Get the list of meta tags for the page
|
|
1654
1762
|
* @returns Meta tag collection
|
|
@@ -1941,7 +2049,7 @@ declare class ForumAccessor {
|
|
|
1941
2049
|
* @param threadId - Thread ID
|
|
1942
2050
|
* @returns Thread
|
|
1943
2051
|
*/
|
|
1944
|
-
getThread(threadId: number): WikidotResultAsync<
|
|
2052
|
+
getThread(threadId: number): WikidotResultAsync<ForumThread>;
|
|
1945
2053
|
/**
|
|
1946
2054
|
* Get multiple threads
|
|
1947
2055
|
* @param threadIds - Array of thread IDs
|
|
@@ -2170,4 +2278,4 @@ declare function parseUser2(client: ClientRef, elem: cheerio2.Cheerio<AnyNode2>)
|
|
|
2170
2278
|
* @returns Parsed Date, or null on parse failure
|
|
2171
2279
|
*/
|
|
2172
2280
|
declare function parseOdate(elem: cheerio2.Cheerio<AnyNode2>): Date | null;
|
|
2173
|
-
export { wdOkAsync, wdOk, wdErrAsync, wdErr, userLookup, setupConsoleHandler, parseUser2 as parseUser, parseOdate, pageLookup, nullHandler, memberLookup, maskSensitiveData, logout, login, logger, isSuccessResponse, getLogger, fromPromise, consoleHandler, combineResults, amcResponseSchema, WikidotUser, WikidotStatusError, WikidotResultAsync, WikidotResult, WikidotError, UserType, UserIdentifier, UserData, UserCollection, UserAccessor, User, UnexpectedError, TargetExistsError, TargetError, SiteUnixName, SiteRef, SiteMemberData, SiteMember, SiteData, SiteChangeData, SiteChangeCollection, SiteChange, SiteApplicationData, SiteApplication, SiteAccessor, Site, SessionError, SessionCreateError, SearchPagesQueryParams, SearchPagesQuery, ResponseDataError, QuickModuleName, QuickModule, QMCUser, QMCPage, PrivateMessageSentBox, PrivateMessageInbox, PrivateMessageData, PrivateMessageCollection, PrivateMessageAccessor, PrivateMessage, PagesAccessor, PageVoteData, PageVoteCollection, PageVote, PageSourceData, PageSource, PageRevisionData, PageRevisionCollection, PageRevision, PageRef, PageMetaData, PageMetaCollection, PageMeta, PageFullname, PageFileData, PageFileCollection, PageFile, PageData, PageCollection, PageAccessor, Page, NotFoundException, NoElementError, MemberAccessor, LoginRequiredError, Logger, LogLevel, LogHandler, GuestUser, GetUserOptions, ForumThreadRef, ForumThreadData, ForumThreadCollection,
|
|
2281
|
+
export { wdOkAsync, wdOk, wdErrAsync, wdErr, userLookup, setupConsoleHandler, parseUser2 as parseUser, parseOdate, pageLookup, nullHandler, memberLookup, maskSensitiveData, logout, login, logger, isSuccessResponse, getLogger, fromPromise, consoleHandler, combineResults, amcResponseSchema, WikidotUser, WikidotStatusError, WikidotResultAsync, WikidotResult, WikidotError, UserType, UserIdentifier, UserData, UserCollection, UserAccessor, User, UnexpectedError, TargetExistsError, TargetError, SiteUnixName, SiteRef, SiteMemberData, SiteMember, SiteData, SiteChangeData, SiteChangeCollection, SiteChange, SiteApplicationData, SiteApplication, SiteAccessor, Site, SessionError, SessionCreateError, SearchPagesQueryParams, SearchPagesQuery, ResponseDataError, QuickModuleName, QuickModule, QMCUser, QMCPage, PrivateMessageSentBox, PrivateMessageInbox, PrivateMessageData, PrivateMessageCollection, PrivateMessageAccessor, PrivateMessage, PagesAccessor, PageVoteData, PageVoteCollection, PageVote, PageSourceData, PageSource, PageRevisionData, PageRevisionCollection, PageRevision, PageRef, PageMetaData, PageMetaCollection, PageMeta, PageFullname, PageFileData, PageFileCollection, PageFile, PageData, PageCollection, PageAccessor, Page, NotFoundException, NoElementError, MemberAccessor, LoginRequiredError, Logger, LogLevel, LogHandler, GuestUser, GetUserOptions, ForumThreadRef, ForumThreadData, ForumThreadCollection, ForumThread, ForumPostRevisionData, ForumPostRevisionCollection, ForumPostRevision, ForumPostRef, ForumPostData, ForumPostCollection, ForumPost, ForumCategoryRef, ForumCategoryData, ForumCategoryCollection, ForumCategory, ForumAccessor, ForbiddenError, DeletedUser, DateTimeString, DEFAULT_PER_PAGE, DEFAULT_MODULE_BODY, DEFAULT_AMC_CONFIG, ClientRef, ClientOptions, Client, AuthClientContext, AnonymousUser, AbstractUser, AMCSuccessResponse, AMCResponse, AMCRequestOptions, AMCRequestBody, AMCHttpError, AMCHeaderRef, AMCHeader, AMCError, AMCConfig, AMCClientRef, AMCClient };
|