@ukwhatn/wikidot 4.0.4 → 4.0.6

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.d.cts CHANGED
@@ -1,120 +1,120 @@
1
1
  /**
2
- * Wikidotライブラリの基底エラークラス
3
- * 全てのカスタムエラーはこのクラスを継承する
2
+ * Base error class for the Wikidot library
3
+ * All custom errors inherit from this class
4
4
  */
5
5
  declare abstract class WikidotError extends Error {
6
- /** エラー名 */
6
+ /** Error name */
7
7
  readonly name: string;
8
8
  /**
9
- * @param message - エラーメッセージ
9
+ * @param message - Error message
10
10
  */
11
11
  constructor(message: string);
12
12
  }
13
13
  /**
14
- * 予期せぬエラー
15
- * 内部的な不整合やバグを表す
14
+ * Unexpected error
15
+ * Represents internal inconsistencies or bugs
16
16
  */
17
17
  declare class UnexpectedError extends WikidotError {}
18
18
  /**
19
- * Ajax Module Connector関連の基底エラー
19
+ * Base error for Ajax Module Connector related issues
20
20
  */
21
21
  declare class AMCError extends WikidotError {}
22
22
  /**
23
- * HTTPステータスコードエラー
24
- * AMCへのリクエストがHTTPエラーで失敗した場合
23
+ * HTTP status code error
24
+ * Thrown when an AMC request fails with an HTTP error
25
25
  */
26
26
  declare class AMCHttpError extends AMCError {
27
- /** HTTPステータスコード */
27
+ /** HTTP status code */
28
28
  readonly statusCode: number;
29
29
  /**
30
- * @param message - エラーメッセージ
31
- * @param statusCode - HTTPステータスコード
30
+ * @param message - Error message
31
+ * @param statusCode - HTTP status code
32
32
  */
33
33
  constructor(message: string, statusCode: number);
34
34
  }
35
35
  /**
36
- * Wikidotステータスコードエラー
37
- * AMCレスポンスのstatusokでない場合
36
+ * Wikidot status code error
37
+ * Thrown when AMC response status is not ok
38
38
  */
39
39
  declare class WikidotStatusError extends AMCError {
40
- /** Wikidotステータスコード文字列 */
40
+ /** Wikidot status code string */
41
41
  readonly statusCode: string;
42
42
  /**
43
- * @param message - エラーメッセージ
44
- * @param statusCode - ステータスコード(例: 'not_ok', 'try_again'
43
+ * @param message - Error message
44
+ * @param statusCode - Status code (e.g., 'not_ok', 'try_again')
45
45
  */
46
46
  constructor(message: string, statusCode: string);
47
47
  }
48
48
  /**
49
- * レスポンスデータエラー
50
- * レスポンスのパースに失敗した場合
49
+ * Response data error
50
+ * Thrown when response parsing fails
51
51
  */
52
52
  declare class ResponseDataError extends AMCError {}
53
53
  /**
54
- * セッション関連の基底エラー
54
+ * Base error for session related issues
55
55
  */
56
56
  declare class SessionError extends WikidotError {}
57
57
  /**
58
- * セッション作成失敗エラー
59
- * ログイン試行が失敗した場合にスロー
58
+ * Session creation failure error
59
+ * Thrown when a login attempt fails
60
60
  */
61
61
  declare class SessionCreateError extends SessionError {}
62
62
  /**
63
- * ログイン必須エラー
64
- * 認証が必要な操作を未ログイン状態で実行した場合にスロー
63
+ * Login required error
64
+ * Thrown when an authenticated operation is attempted without login
65
65
  */
66
66
  declare class LoginRequiredError extends SessionError {
67
67
  constructor(message?: string);
68
68
  }
69
69
  /**
70
- * リソース未発見エラー
71
- * 要求されたリソースが存在しない場合
70
+ * Resource not found error
71
+ * Thrown when the requested resource does not exist
72
72
  */
73
73
  declare class NotFoundException extends WikidotError {}
74
74
  /**
75
- * リソース既存エラー
76
- * 作成しようとしたリソースが既に存在する場合
75
+ * Resource already exists error
76
+ * Thrown when attempting to create a resource that already exists
77
77
  */
78
78
  declare class TargetExistsError extends WikidotError {}
79
79
  /**
80
- * ターゲット状態エラー
81
- * リソースが操作不可能な状態の場合(ロック中など)
80
+ * Target state error
81
+ * Thrown when a resource is in an inoperable state (e.g., locked)
82
82
  */
83
83
  declare class TargetError extends WikidotError {}
84
84
  /**
85
- * アクセス拒否エラー
86
- * 権限不足で操作が拒否された場合
85
+ * Access denied error
86
+ * Thrown when an operation is denied due to insufficient permissions
87
87
  */
88
88
  declare class ForbiddenError extends WikidotError {}
89
89
  /**
90
- * HTML要素未発見エラー
91
- * パース中に必要な要素が見つからない場合
90
+ * HTML element not found error
91
+ * Thrown when a required element is not found during parsing
92
92
  */
93
93
  declare class NoElementError extends WikidotError {}
94
94
  /**
95
- * ロギング機能を提供するモジュール
95
+ * Module providing logging functionality
96
96
  *
97
- * このモジュールは、ライブラリ全体で使用されるロガーを設定し、提供する。
98
- * デフォルトでは出力を行わず、アプリケーション側でのログ制御を可能にする。
97
+ * This module configures and provides loggers used throughout the library.
98
+ * By default, it does not output anything, allowing application-side log control.
99
99
  */
100
100
  /**
101
- * ログレベル
101
+ * Log level
102
102
  */
103
103
  type LogLevel = "debug" | "info" | "warn" | "error";
104
104
  /**
105
- * ロガーハンドラー
105
+ * Logger handler
106
106
  */
107
107
  type LogHandler = (level: LogLevel, name: string, message: string, ...args: unknown[]) => void;
108
108
  /**
109
- * NullHandler: 何も出力しない(デフォルト)
109
+ * NullHandler: Outputs nothing (default)
110
110
  */
111
111
  declare const nullHandler: LogHandler;
112
112
  /**
113
- * ConsoleHandler: コンソールに出力する
113
+ * ConsoleHandler: Outputs to console
114
114
  */
115
115
  declare const consoleHandler: LogHandler;
116
116
  /**
117
- * ロガークラス
117
+ * Logger class
118
118
  */
119
119
  declare class Logger {
120
120
  private readonly name;
@@ -122,19 +122,19 @@ declare class Logger {
122
122
  private level;
123
123
  constructor(name: string, handler?: LogHandler, level?: LogLevel);
124
124
  /**
125
- * ハンドラーを設定
125
+ * Set handler
126
126
  */
127
127
  setHandler(handler: LogHandler): void;
128
128
  /**
129
- * ログレベルを設定
129
+ * Set log level
130
130
  */
131
131
  setLevel(level: LogLevel): void;
132
132
  /**
133
- * 指定レベルがログ出力対象かどうか
133
+ * Check if the specified level should be logged
134
134
  */
135
135
  private shouldLog;
136
136
  /**
137
- * ログ出力
137
+ * Output log
138
138
  */
139
139
  private log;
140
140
  debug(message: string, ...args: unknown[]): void;
@@ -143,67 +143,67 @@ declare class Logger {
143
143
  error(message: string, ...args: unknown[]): void;
144
144
  }
145
145
  /**
146
- * ロガーを取得
147
- * @param name - ロガー名(デフォルト: "wikidot"
148
- * @returns ロガーインスタンス
146
+ * Get logger
147
+ * @param name - Logger name (default: "wikidot")
148
+ * @returns Logger instance
149
149
  */
150
150
  declare function getLogger(name?: string): Logger;
151
151
  /**
152
- * コンソール出力用ハンドラを設定
153
- * @param logger - 設定するロガー
154
- * @param level - ログレベル(デフォルト: "warn"
152
+ * Setup console output handler
153
+ * @param logger - Logger to configure
154
+ * @param level - Log level (default: "warn")
155
155
  */
156
156
  declare function setupConsoleHandler(logger: Logger, level?: LogLevel): void;
157
157
  /**
158
- * パッケージ全体で使用されるデフォルトロガー
158
+ * Default logger used throughout the package
159
159
  */
160
160
  declare const logger: Logger;
161
- /** 日時型(ISO 8601形式) */
161
+ /** DateTime type (ISO 8601 format) */
162
162
  type DateTimeString = string;
163
- /** ユーザーIDまたはユーザー名 */
163
+ /** User ID or username */
164
164
  type UserIdentifier = number | string;
165
- /** サイトUNIX */
165
+ /** Site UNIX name */
166
166
  type SiteUnixName = string;
167
- /** ページフルネーム(カテゴリ:名前) */
167
+ /** Page fullname (category:name) */
168
168
  type PageFullname = string;
169
169
  import { Result, ResultAsync } from "neverthrow";
170
- /** 同期Result型エイリアス */
170
+ /** Synchronous Result type alias */
171
171
  type WikidotResult<T> = Result<T, WikidotError>;
172
- /** 非同期Result型エイリアス */
172
+ /** Asynchronous Result type alias */
173
173
  type WikidotResultAsync<T> = ResultAsync<T, WikidotError>;
174
- /** 成功Resultを生成 */
174
+ /** Create success Result */
175
175
  declare const wdOk: <T>(value: T) => WikidotResult<T>;
176
- /** エラーResultを生成 */
176
+ /** Create error Result */
177
177
  declare const wdErr: <E extends WikidotError>(error: E) => WikidotResult<never>;
178
- /** 成功ResultAsyncを生成 */
178
+ /** Create success ResultAsync */
179
179
  declare const wdOkAsync: <T>(value: T) => WikidotResultAsync<T>;
180
- /** エラーResultAsyncを生成 */
180
+ /** Create error ResultAsync */
181
181
  declare const wdErrAsync: <E extends WikidotError>(error: E) => WikidotResultAsync<never>;
182
- /** Promiseからの変換 */
182
+ /** Convert from Promise */
183
183
  declare const fromPromise: <T>(promise: Promise<T>, errorMapper: (error: unknown) => WikidotError) => WikidotResultAsync<T>;
184
- /** 複数ResultAsyncの結合 */
184
+ /** Combine multiple ResultAsync */
185
185
  declare const combineResults: <T>(results: WikidotResultAsync<T>[]) => WikidotResultAsync<T[]>;
186
186
  /**
187
- * Ajax Module Connector設定
187
+ * Ajax Module Connector configuration
188
188
  */
189
189
  interface AMCConfig {
190
- /** リクエストタイムアウト(ミリ秒) */
190
+ /** Request timeout (milliseconds) */
191
191
  timeout: number;
192
- /** リトライ上限回数 */
192
+ /** Maximum retry count */
193
193
  retryLimit: number;
194
- /** リトライ基本間隔(ミリ秒) */
194
+ /** Base retry interval (milliseconds) */
195
195
  retryInterval: number;
196
- /** 最大バックオフ(ミリ秒) */
196
+ /** Maximum backoff (milliseconds) */
197
197
  maxBackoff: number;
198
- /** バックオフ係数 */
198
+ /** Backoff factor */
199
199
  backoffFactor: number;
200
- /** 最大並列リクエスト数 */
200
+ /** Maximum concurrent requests */
201
201
  semaphoreLimit: number;
202
202
  }
203
- /** デフォルトAMC設定 */
203
+ /** Default AMC configuration */
204
204
  declare const DEFAULT_AMC_CONFIG: AMCConfig;
205
205
  /**
206
- * AMCリクエストヘッダーを管理するクラス
206
+ * Class for managing AMC request headers
207
207
  */
208
208
  declare class AMCHeader {
209
209
  private cookies;
@@ -211,7 +211,7 @@ declare class AMCHeader {
211
211
  private userAgent;
212
212
  private referer;
213
213
  /**
214
- * @param options - ヘッダー初期化オプション
214
+ * @param options - Header initialization options
215
215
  */
216
216
  constructor(options?: {
217
217
  contentType?: string;
@@ -219,35 +219,35 @@ declare class AMCHeader {
219
219
  referer?: string;
220
220
  });
221
221
  /**
222
- * Cookieを設定する
223
- * @param name - Cookie
224
- * @param value - Cookie
222
+ * Set a cookie
223
+ * @param name - Cookie name
224
+ * @param value - Cookie value
225
225
  */
226
226
  setCookie(name: string, value: string): void;
227
227
  /**
228
- * Cookieを削除する
229
- * @param name - Cookie
228
+ * Delete a cookie
229
+ * @param name - Cookie name
230
230
  */
231
231
  deleteCookie(name: string): void;
232
232
  /**
233
- * Cookieを取得する
234
- * @param name - Cookie
235
- * @returns Cookie値、存在しない場合はundefined
233
+ * Get a cookie
234
+ * @param name - Cookie name
235
+ * @returns Cookie value, undefined if not exists
236
236
  */
237
237
  getCookie(name: string): string | undefined;
238
238
  /**
239
- * HTTPヘッダーオブジェクトを取得する
240
- * @returns ヘッダー辞書
239
+ * Get HTTP headers object
240
+ * @returns Headers dictionary
241
241
  */
242
242
  getHeaders(): Record<string, string>;
243
243
  }
244
244
  import { z } from "zod";
245
245
  /**
246
- * AMCリクエストボディの値型
246
+ * AMC request body value type
247
247
  */
248
248
  type AMCRequestBodyValue = string | number | boolean | null | undefined | Record<string, unknown> | AMCRequestBodyValue[];
249
249
  /**
250
- * AMCリクエストボディの型定義
250
+ * AMC request body type definition
251
251
  */
252
252
  interface AMCRequestBody {
253
253
  moduleName?: string;
@@ -256,7 +256,7 @@ interface AMCRequestBody {
256
256
  [key: string]: AMCRequestBodyValue;
257
257
  }
258
258
  /**
259
- * AMCレスポンスのベーススキーマ
259
+ * AMC response base schema
260
260
  */
261
261
  declare const baseSchema: z.ZodObject<{
262
262
  status: z.ZodString;
@@ -264,15 +264,15 @@ declare const baseSchema: z.ZodObject<{
264
264
  message: z.ZodOptional<z.ZodString>;
265
265
  }>;
266
266
  /**
267
- * AMCレスポンススキーマ
267
+ * AMC response schema
268
268
  */
269
269
  declare const amcResponseSchema: z.ZodType<z.infer<typeof baseSchema> & Record<string, unknown>>;
270
270
  /**
271
- * AMCレスポンス型
271
+ * AMC response type
272
272
  */
273
273
  type AMCResponse = z.infer<typeof amcResponseSchema>;
274
274
  /**
275
- * 成功したAMCレスポンス
275
+ * Successful AMC response
276
276
  */
277
277
  interface AMCSuccessResponse {
278
278
  status: "ok";
@@ -280,99 +280,99 @@ interface AMCSuccessResponse {
280
280
  [key: string]: unknown;
281
281
  }
282
282
  /**
283
- * AMCレスポンスが成功かどうかを判定する型ガード
284
- * @param response - AMCレスポンス
285
- * @returns 成功レスポンスの場合true
283
+ * Type guard to check if AMC response is successful
284
+ * @param response - AMC response
285
+ * @returns true if response is successful
286
286
  */
287
287
  declare function isSuccessResponse(response: AMCResponse): response is AMCSuccessResponse;
288
288
  /**
289
- * 機密情報をマスクする(ログ出力用)
290
- * @param body - マスク対象のリクエストボディ
291
- * @returns マスクされたボディ
289
+ * Mask sensitive information (for logging)
290
+ * @param body - Request body to mask
291
+ * @returns Masked body
292
292
  */
293
293
  declare function maskSensitiveData(body: AMCRequestBody): Record<string, unknown>;
294
294
  /**
295
- * AMCリクエストオプション
295
+ * AMC request options
296
296
  */
297
297
  interface AMCRequestOptions {
298
- /** サイト名(デフォルト: www */
298
+ /** Site name (default: www) */
299
299
  siteName?: string;
300
- /** SSL対応(省略時は自動検出) */
300
+ /** SSL support (auto-detected if omitted) */
301
301
  sslSupported?: boolean;
302
- /** エラーを例外として投げずに結果に含める(デフォルト: false */
302
+ /** Include errors in results instead of throwing (default: false) */
303
303
  returnExceptions?: boolean;
304
304
  }
305
305
  /**
306
- * Ajax Module Connectorクライアント
307
- * Wikidot AMCエンドポイントへのリクエストを管理する
306
+ * Ajax Module Connector client
307
+ * Manages requests to Wikidot AMC endpoint
308
308
  */
309
309
  declare class AMCClient {
310
- /** kyインスタンス */
310
+ /** ky instance */
311
311
  private readonly ky;
312
- /** 並列リクエスト制限 */
312
+ /** Concurrent request limiter */
313
313
  private readonly limit;
314
- /** ヘッダー管理 */
314
+ /** Header manager */
315
315
  readonly header: AMCHeader;
316
- /** 設定 */
316
+ /** Configuration */
317
317
  readonly config: AMCConfig;
318
- /** ベースドメイン */
318
+ /** Base domain */
319
319
  readonly domain: string;
320
- /** SSL対応状況のキャッシュ */
320
+ /** SSL support status cache */
321
321
  private sslCache;
322
322
  /**
323
- * @param config - AMC設定(省略時はデフォルト値)
324
- * @param domain - ベースドメイン(デフォルト: wikidot.com
323
+ * @param config - AMC configuration (uses defaults if omitted)
324
+ * @param domain - Base domain (default: wikidot.com)
325
325
  */
326
326
  constructor(config?: Partial<AMCConfig>, domain?: string);
327
327
  /**
328
- * サイトの存在とSSL対応状況を確認する
329
- * @param siteName - サイト名
330
- * @returns SSL対応状況(true: HTTPSfalse: HTTP
328
+ * Check site existence and SSL support status
329
+ * @param siteName - Site name
330
+ * @returns SSL support status (true: HTTPS, false: HTTP)
331
331
  */
332
332
  checkSiteSSL(siteName: string): WikidotResultAsync<boolean>;
333
333
  /**
334
- * AMCリクエストを実行する
335
- * @param bodies - リクエストボディ配列
336
- * @param siteName - サイト名(省略時はwww
337
- * @param sslSupported - SSL対応(省略時は自動検出)
338
- * @returns レスポンス配列
334
+ * Execute AMC request
335
+ * @param bodies - Request body array
336
+ * @param siteName - Site name (default: www)
337
+ * @param sslSupported - SSL support (auto-detected if omitted)
338
+ * @returns Response array
339
339
  */
340
340
  request(bodies: AMCRequestBody[], siteName?: string, sslSupported?: boolean): WikidotResultAsync<AMCResponse[]>;
341
341
  /**
342
- * AMCリクエストを実行する(オプション指定版)
343
- * @param bodies - リクエストボディ配列
344
- * @param options - リクエストオプション
345
- * @returns レスポンス配列(returnExceptionstrueの場合はエラーも含む)
342
+ * Execute AMC request (with options)
343
+ * @param bodies - Request body array
344
+ * @param options - Request options
345
+ * @returns Response array (includes errors if returnExceptions is true)
346
346
  */
347
347
  requestWithOptions(bodies: AMCRequestBody[], options?: AMCRequestOptions): WikidotResultAsync<(AMCResponse | WikidotError)[]>;
348
348
  /**
349
- * 単一リクエストを実行する内部メソッド
350
- * @param body - リクエストボディ
351
- * @param url - リクエストURL
352
- * @returns レスポンス
349
+ * Internal method to execute a single request
350
+ * @param body - Request body
351
+ * @param url - Request URL
352
+ * @returns Response
353
353
  */
354
354
  private singleRequest;
355
355
  }
356
356
  /**
357
- * クライアント参照インターフェース
358
- * Client型への直接依存を避けるために使用
357
+ * Client reference interface
358
+ * Used to avoid direct dependency on Client type
359
359
  */
360
360
  interface ClientRef {
361
361
  /**
362
- * ログインが必要な操作の前に呼び出す
363
- * @returns ログインしていない場合はエラー
362
+ * Call before operations that require login
363
+ * @returns Error if not logged in
364
364
  */
365
365
  requireLogin(): {
366
366
  isErr(): boolean;
367
367
  error?: Error;
368
368
  };
369
369
  /**
370
- * ログイン済みかどうか
370
+ * Whether logged in
371
371
  */
372
372
  isLoggedIn(): boolean;
373
373
  }
374
374
  /**
375
- * AMCHeaderの最小インターフェース
375
+ * Minimal AMCHeader interface
376
376
  */
377
377
  interface AMCHeaderRef {
378
378
  getHeaders(): Record<string, string>;
@@ -380,155 +380,155 @@ interface AMCHeaderRef {
380
380
  deleteCookie(name: string): void;
381
381
  }
382
382
  /**
383
- * AMCClientの最小インターフェース
383
+ * Minimal AMCClient interface
384
384
  */
385
385
  interface AMCClientRef {
386
386
  header: AMCHeaderRef;
387
387
  request(bodies: AMCRequestBody[]): WikidotResultAsync<AMCResponse[]>;
388
388
  }
389
389
  /**
390
- * 認証処理で必要なクライアントコンテキスト
391
- * auth.tsclient.tsに直接依存することを避けるために使用
390
+ * Client context required for authentication
391
+ * Used to avoid auth.ts directly depending on client.ts
392
392
  */
393
393
  interface AuthClientContext {
394
394
  amcClient: AMCClientRef;
395
395
  }
396
396
  /**
397
- * サイト参照インターフェース
398
- * Site型への直接依存を避けるために使用
397
+ * Site reference interface
398
+ * Used to avoid direct dependency on Site type
399
399
  */
400
400
  interface SiteRef {
401
401
  /**
402
- * サイトID
402
+ * Site ID
403
403
  */
404
404
  readonly id: number;
405
405
  /**
406
- * UNIX名(例: scp-jp
406
+ * UNIX name (e.g., scp-jp)
407
407
  */
408
408
  readonly unixName: string;
409
409
  /**
410
- * ドメイン
410
+ * Domain
411
411
  */
412
412
  readonly domain: string;
413
413
  /**
414
- * SSL対応フラグ
414
+ * SSL support flag
415
415
  */
416
416
  readonly sslSupported: boolean;
417
417
  /**
418
- * クライアント参照
418
+ * Client reference
419
419
  */
420
420
  readonly client: ClientRef;
421
421
  /**
422
- * AMCリクエストを実行
422
+ * Execute AMC request
423
423
  */
424
424
  amcRequest(bodies: AMCRequestBody[]): WikidotResultAsync<AMCResponse[]>;
425
425
  /**
426
- * 単一のAMCリクエストを実行
426
+ * Execute single AMC request
427
427
  */
428
428
  amcRequestSingle(body: AMCRequestBody): WikidotResultAsync<AMCResponse>;
429
429
  }
430
430
  /**
431
- * フォーラムカテゴリ参照インターフェース
431
+ * Forum category reference interface
432
432
  */
433
433
  interface ForumCategoryRef {
434
434
  /**
435
- * カテゴリID
435
+ * Category ID
436
436
  */
437
437
  readonly id: number;
438
438
  /**
439
- * カテゴリタイトル
439
+ * Category title
440
440
  */
441
441
  readonly title: string;
442
442
  /**
443
- * サイト参照
443
+ * Site reference
444
444
  */
445
445
  readonly site: SiteRef;
446
446
  }
447
447
  /**
448
- * フォーラムスレッド参照インターフェース
449
- * ForumThread型への直接依存を避けるために使用
448
+ * Forum thread reference interface
449
+ * Used to avoid direct dependency on ForumThread type
450
450
  */
451
451
  interface ForumThreadRef {
452
452
  /**
453
- * スレッドID
453
+ * Thread ID
454
454
  */
455
455
  readonly id: number;
456
456
  /**
457
- * スレッドタイトル
457
+ * Thread title
458
458
  */
459
459
  readonly title: string;
460
460
  /**
461
- * サイト参照
461
+ * Site reference
462
462
  */
463
463
  readonly site: SiteRef;
464
464
  /**
465
- * カテゴリ参照(存在する場合)
465
+ * Category reference (if exists)
466
466
  */
467
467
  readonly category?: ForumCategoryRef | null;
468
468
  }
469
469
  /**
470
- * ページ参照インターフェース
471
- * Page型への直接依存を避けるために使用
470
+ * Page reference interface
471
+ * Used to avoid direct dependency on Page type
472
472
  */
473
473
  interface PageRef {
474
474
  /**
475
- * ページID(取得後に設定される)
475
+ * Page ID (set after retrieval)
476
476
  */
477
477
  readonly id: number | null;
478
478
  /**
479
- * フルネーム(category:name 形式)
479
+ * Fullname (category:name format)
480
480
  */
481
481
  readonly fullname: string;
482
482
  /**
483
- * ページ名
483
+ * Page name
484
484
  */
485
485
  readonly name: string;
486
486
  /**
487
- * カテゴリ
487
+ * Category
488
488
  */
489
489
  readonly category: string;
490
490
  /**
491
- * サイト参照
491
+ * Site reference
492
492
  */
493
493
  readonly site: SiteRef;
494
494
  }
495
495
  /**
496
- * ユーザー名とパスワードでWikidotにログインする
497
- * @param client - クライアントコンテキスト(AMCClientを持つオブジェクト)
498
- * @param username - ユーザー名
499
- * @param password - パスワード
500
- * @returns 成功時はvoid、失敗時はSessionCreateError
496
+ * Login to Wikidot with username and password
497
+ * @param client - Client context (object with AMCClient)
498
+ * @param username - Username
499
+ * @param password - Password
500
+ * @returns void on success, SessionCreateError on failure
501
501
  */
502
502
  declare function login(client: AuthClientContext, username: string, password: string): WikidotResultAsync<void>;
503
503
  /**
504
- * ログアウトする
505
- * @param client - クライアントコンテキスト(AMCClientを持つオブジェクト)
506
- * @returns 成功時はvoid
504
+ * Logout from Wikidot
505
+ * @param client - Client context (object with AMCClient)
506
+ * @returns void on success
507
507
  */
508
508
  declare function logout(client: AuthClientContext): WikidotResultAsync<void>;
509
509
  /**
510
- * ユーザー種別
510
+ * User type
511
511
  */
512
512
  type UserType = "user" | "deleted" | "anonymous" | "guest" | "wikidot";
513
513
  /**
514
- * ユーザー基底インターフェース
514
+ * User base interface
515
515
  */
516
516
  interface AbstractUser {
517
- /** クライアント */
517
+ /** Client */
518
518
  readonly client: ClientRef;
519
- /** ユーザーID */
519
+ /** User ID */
520
520
  readonly id: number;
521
- /** ユーザー名 */
521
+ /** Username */
522
522
  readonly name: string;
523
- /** UNIX形式のユーザー名 */
523
+ /** UNIX format username */
524
524
  readonly unixName: string | null;
525
- /** アバターURL */
525
+ /** Avatar URL */
526
526
  readonly avatarUrl: string | null;
527
- /** IPアドレス(匿名ユーザーの場合のみ) */
527
+ /** IP address (only for anonymous users) */
528
528
  readonly ip: string | null;
529
- /** ユーザー種別 */
529
+ /** User type */
530
530
  readonly userType: UserType;
531
- /** ユーザー種別を判定 */
531
+ /** Check user type */
532
532
  isUser(): boolean;
533
533
  isDeletedUser(): boolean;
534
534
  isAnonymousUser(): boolean;
@@ -536,21 +536,21 @@ interface AbstractUser {
536
536
  isWikidotUser(): boolean;
537
537
  }
538
538
  /**
539
- * 匿名ユーザー
539
+ * Anonymous user
540
540
  */
541
541
  declare class AnonymousUser implements AbstractUser {
542
542
  readonly client: ClientRef;
543
- /** ユーザーID(匿名は0 */
543
+ /** User ID (0 for anonymous) */
544
544
  readonly id: number;
545
- /** ユーザー名(匿名は"Anonymous" */
545
+ /** Username ("Anonymous" for anonymous users) */
546
546
  readonly name: string;
547
- /** UNIX形式のユーザー名 */
547
+ /** UNIX format username */
548
548
  readonly unixName: string;
549
- /** アバターURL(匿名はnull */
549
+ /** Avatar URL (null for anonymous) */
550
550
  readonly avatarUrl: string | null;
551
- /** IPアドレス */
551
+ /** IP address */
552
552
  readonly ip: string;
553
- /** ユーザー種別 */
553
+ /** User type */
554
554
  readonly userType: UserType;
555
555
  constructor(client: ClientRef, ip: string);
556
556
  isUser(): boolean;
@@ -561,21 +561,21 @@ declare class AnonymousUser implements AbstractUser {
561
561
  toString(): string;
562
562
  }
563
563
  /**
564
- * 削除済みユーザー
564
+ * Deleted user
565
565
  */
566
566
  declare class DeletedUser implements AbstractUser {
567
567
  readonly client: ClientRef;
568
- /** 削除済みユーザーID */
568
+ /** Deleted user ID */
569
569
  readonly id: number;
570
- /** ユーザー名(削除済みは"account deleted" */
570
+ /** Username ("account deleted" for deleted users) */
571
571
  readonly name: string;
572
- /** UNIX形式のユーザー名 */
572
+ /** UNIX format username */
573
573
  readonly unixName: string;
574
- /** アバターURL(削除済みはnull */
574
+ /** Avatar URL (null for deleted) */
575
575
  readonly avatarUrl: string | null;
576
- /** IPアドレス(削除済みはnull */
576
+ /** IP address (null for deleted) */
577
577
  readonly ip: string | null;
578
- /** ユーザー種別 */
578
+ /** User type */
579
579
  readonly userType: UserType;
580
580
  constructor(client: ClientRef, id: number);
581
581
  isUser(): boolean;
@@ -586,21 +586,21 @@ declare class DeletedUser implements AbstractUser {
586
586
  toString(): string;
587
587
  }
588
588
  /**
589
- * ゲストユーザー
589
+ * Guest user
590
590
  */
591
591
  declare class GuestUser implements AbstractUser {
592
592
  readonly client: ClientRef;
593
- /** ユーザーID(ゲストは0 */
593
+ /** User ID (0 for guest) */
594
594
  readonly id: number;
595
- /** ゲスト名 */
595
+ /** Guest name */
596
596
  readonly name: string;
597
- /** UNIX形式のユーザー名(ゲストはnull */
597
+ /** UNIX format username (null for guest) */
598
598
  readonly unixName: string | null;
599
- /** アバターURLGravatarの場合あり) */
599
+ /** Avatar URL (may be Gravatar) */
600
600
  readonly avatarUrl: string | null;
601
- /** IPアドレス(ゲストはnull */
601
+ /** IP address (null for guest) */
602
602
  readonly ip: string | null;
603
- /** ユーザー種別 */
603
+ /** User type */
604
604
  readonly userType: UserType;
605
605
  constructor(client: ClientRef, name: string, avatarUrl?: string | null);
606
606
  isUser(): boolean;
@@ -611,30 +611,30 @@ declare class GuestUser implements AbstractUser {
611
611
  toString(): string;
612
612
  }
613
613
  /**
614
- * ユーザーコレクション
614
+ * User collection
615
615
  */
616
616
  declare class UserCollection extends Array<User | null> {
617
617
  constructor(users?: (User | null)[]);
618
618
  /**
619
- * ユーザー名で検索
620
- * @param name - ユーザー名
621
- * @returns ユーザーまたはundefined
619
+ * Find by username
620
+ * @param name - Username
621
+ * @returns User or undefined
622
622
  */
623
623
  findByName(name: string): User | undefined;
624
624
  /**
625
- * ユーザーIDで検索
626
- * @param id - ユーザーID
627
- * @returns ユーザーまたはundefined
625
+ * Find by user ID
626
+ * @param id - User ID
627
+ * @returns User or undefined
628
628
  */
629
629
  findById(id: number): User | undefined;
630
630
  /**
631
- * nullを除いたユーザーのみを返す
632
- * @returns null以外のユーザー配列
631
+ * Return only non-null users
632
+ * @returns Array of non-null users
633
633
  */
634
634
  filterNonNull(): User[];
635
635
  }
636
636
  /**
637
- * ユーザーデータ
637
+ * User data
638
638
  */
639
639
  interface UserData {
640
640
  id: number;
@@ -644,37 +644,37 @@ interface UserData {
644
644
  unixName?: string;
645
645
  }
646
646
  /**
647
- * 通常ユーザー
647
+ * Regular user
648
648
  */
649
649
  declare class User implements AbstractUser {
650
650
  readonly client: ClientRef;
651
- /** ユーザーID */
651
+ /** User ID */
652
652
  readonly id: number;
653
- /** ユーザー名 */
653
+ /** Username */
654
654
  readonly name: string;
655
- /** 表示名 */
655
+ /** Display name */
656
656
  readonly displayName: string | null;
657
- /** アバターURL */
657
+ /** Avatar URL */
658
658
  readonly avatarUrl: string | null;
659
- /** UNIX形式のユーザー名 */
659
+ /** UNIX format username */
660
660
  readonly unixName: string;
661
- /** IPアドレス(通常ユーザーではnull */
661
+ /** IP address (null for regular users) */
662
662
  readonly ip: string | null;
663
- /** ユーザー種別 */
663
+ /** User type */
664
664
  readonly userType: UserType;
665
665
  constructor(client: ClientRef, data: UserData);
666
666
  /**
667
- * ユーザー名からユーザーを取得する
668
- * @param client - クライアント
669
- * @param name - ユーザー名
670
- * @returns ユーザー(存在しない場合はnull
667
+ * Get user from username
668
+ * @param client - Client
669
+ * @param name - Username
670
+ * @returns User (null if not found)
671
671
  */
672
672
  static fromName(client: ClientRef, name: string): WikidotResultAsync<User | null>;
673
673
  /**
674
- * 複数ユーザー名からユーザーを取得する
675
- * @param client - クライアント
676
- * @param names - ユーザー名配列
677
- * @returns ユーザーコレクション
674
+ * Get users from multiple usernames
675
+ * @param client - Client
676
+ * @param names - Array of usernames
677
+ * @returns User collection
678
678
  */
679
679
  static fromNames(client: ClientRef, names: string[]): WikidotResultAsync<UserCollection>;
680
680
  isUser(): boolean;
@@ -685,21 +685,21 @@ declare class User implements AbstractUser {
685
685
  toString(): string;
686
686
  }
687
687
  /**
688
- * Wikidotシステムユーザー
688
+ * Wikidot system user
689
689
  */
690
690
  declare class WikidotUser implements AbstractUser {
691
691
  readonly client: ClientRef;
692
- /** ユーザーID(Wikidotシステムは0 */
692
+ /** User ID (0 for Wikidot system) */
693
693
  readonly id: number;
694
- /** ユーザー名 */
694
+ /** Username */
695
695
  readonly name: string;
696
- /** UNIX形式のユーザー名 */
696
+ /** UNIX format username */
697
697
  readonly unixName: string;
698
- /** アバターURL(システムユーザーはnull */
698
+ /** Avatar URL (null for system user) */
699
699
  readonly avatarUrl: string | null;
700
- /** IPアドレス(システムユーザーはnull */
700
+ /** IP address (null for system user) */
701
701
  readonly ip: string | null;
702
- /** ユーザー種別 */
702
+ /** User type */
703
703
  readonly userType: UserType;
704
704
  constructor(client: ClientRef);
705
705
  isUser(): boolean;
@@ -710,7 +710,7 @@ declare class WikidotUser implements AbstractUser {
710
710
  toString(): string;
711
711
  }
712
712
  /**
713
- * プライベートメッセージデータ
713
+ * Private message data
714
714
  */
715
715
  interface PrivateMessageData {
716
716
  client: Client;
@@ -722,7 +722,7 @@ interface PrivateMessageData {
722
722
  createdAt: Date;
723
723
  }
724
724
  /**
725
- * プライベートメッセージ
725
+ * Private message
726
726
  */
727
727
  declare class PrivateMessage {
728
728
  readonly client: Client;
@@ -734,62 +734,62 @@ declare class PrivateMessage {
734
734
  readonly createdAt: Date;
735
735
  constructor(data: PrivateMessageData);
736
736
  /**
737
- * メッセージIDからメッセージを取得する
738
- * @param client - クライアント
739
- * @param messageId - メッセージID
740
- * @returns プライベートメッセージ
737
+ * Get message by message ID
738
+ * @param client - Client instance
739
+ * @param messageId - Message ID
740
+ * @returns Private message
741
741
  */
742
742
  static fromId(client: Client, messageId: number): WikidotResultAsync<PrivateMessage>;
743
743
  /**
744
- * プライベートメッセージを送信する
745
- * @param client - クライアント
746
- * @param recipient - 受信者
747
- * @param subject - 件名
748
- * @param body - 本文
744
+ * Send private message
745
+ * @param client - Client instance
746
+ * @param recipient - Recipient
747
+ * @param subject - Subject
748
+ * @param body - Body
749
749
  */
750
750
  static send(client: Client, recipient: User, subject: string, body: string): WikidotResultAsync<void>;
751
751
  toString(): string;
752
752
  }
753
753
  /**
754
- * プライベートメッセージコレクション
754
+ * Private message collection
755
755
  */
756
756
  declare class PrivateMessageCollection extends Array<PrivateMessage> {
757
757
  readonly client: Client;
758
758
  constructor(client: Client, messages?: PrivateMessage[]);
759
759
  /**
760
- * IDで検索
760
+ * Find by ID
761
761
  */
762
762
  findById(id: number): PrivateMessage | undefined;
763
763
  /**
764
- * メッセージIDのリストからメッセージを取得する
764
+ * Get messages from list of message IDs
765
765
  */
766
766
  static fromIds(client: Client, messageIds: number[]): WikidotResultAsync<PrivateMessageCollection>;
767
767
  /**
768
- * モジュールからメッセージを取得する内部メソッド
768
+ * Internal method to get messages from module
769
769
  */
770
770
  protected static acquireFromModule(client: Client, moduleName: string): WikidotResultAsync<PrivateMessageCollection>;
771
771
  }
772
772
  /**
773
- * 受信箱
773
+ * Inbox
774
774
  */
775
775
  declare class PrivateMessageInbox extends PrivateMessageCollection {
776
776
  /**
777
- * 受信箱のメッセージをすべて取得する
777
+ * Get all messages in inbox
778
778
  */
779
779
  static acquire(client: Client): WikidotResultAsync<PrivateMessageInbox>;
780
780
  }
781
781
  /**
782
- * 送信箱
782
+ * Sent box
783
783
  */
784
784
  declare class PrivateMessageSentBox extends PrivateMessageCollection {
785
785
  /**
786
- * 送信箱のメッセージをすべて取得する
786
+ * Get all messages in sent box
787
787
  */
788
788
  static acquire(client: Client): WikidotResultAsync<PrivateMessageSentBox>;
789
789
  }
790
790
  import { Element } from "domhandler";
791
791
  /**
792
- * フォーラム投稿データ
792
+ * Forum post data
793
793
  */
794
794
  interface ForumPostData {
795
795
  thread: ForumThreadRef;
@@ -804,7 +804,7 @@ interface ForumPostData {
804
804
  parentId?: number | null;
805
805
  }
806
806
  /**
807
- * フォーラム投稿
807
+ * Forum post
808
808
  */
809
809
  declare class ForumPost {
810
810
  readonly thread: ForumThreadRef;
@@ -820,44 +820,44 @@ declare class ForumPost {
820
820
  private _source;
821
821
  constructor(data: ForumPostData);
822
822
  /**
823
- * 親投稿ID
823
+ * Parent post ID
824
824
  */
825
825
  get parentId(): number | null;
826
826
  /**
827
- * ソースコード(Wikidot記法)を取得
827
+ * Get source code (Wikidot syntax)
828
828
  */
829
829
  getSource(): WikidotResultAsync<string>;
830
830
  /**
831
- * 投稿を編集する
832
- * @param source - 新しいソース(Wikidot記法)
833
- * @param title - 新しいタイトル(省略時は現在のタイトルを維持)
831
+ * Edit post
832
+ * @param source - New source (Wikidot syntax)
833
+ * @param title - New title (keeps current title if omitted)
834
834
  */
835
835
  edit(source: string, title?: string): WikidotResultAsync<void>;
836
836
  toString(): string;
837
837
  }
838
838
  /**
839
- * フォーラム投稿コレクション
839
+ * Forum post collection
840
840
  */
841
841
  declare class ForumPostCollection extends Array<ForumPost> {
842
842
  readonly thread: ForumThreadRef;
843
843
  constructor(thread: ForumThreadRef, posts?: ForumPost[]);
844
844
  /**
845
- * IDで検索
846
- * @param id - 投稿ID
847
- * @returns 投稿(存在しない場合はundefined
845
+ * Find by ID
846
+ * @param id - Post ID
847
+ * @returns Post (undefined if not found)
848
848
  */
849
849
  findById(id: number): ForumPost | undefined;
850
850
  /**
851
- * HTMLから投稿をパースする(内部メソッド)
851
+ * Parse posts from HTML (internal method)
852
852
  */
853
853
  private static _parse;
854
854
  /**
855
- * スレッド内の全投稿を取得
855
+ * Get all posts in a thread
856
856
  */
857
857
  static acquireAllInThread(thread: ForumThreadRef): WikidotResultAsync<ForumPostCollection>;
858
858
  }
859
859
  /**
860
- * フォーラムスレッドデータ
860
+ * Forum thread data
861
861
  */
862
862
  interface ForumThreadData {
863
863
  site: Site;
@@ -870,7 +870,7 @@ interface ForumThreadData {
870
870
  category?: ForumCategory | null;
871
871
  }
872
872
  /**
873
- * フォーラムスレッド
873
+ * Forum thread
874
874
  */
875
875
  declare class ForumThread2 {
876
876
  readonly site: Site;
@@ -884,50 +884,50 @@ declare class ForumThread2 {
884
884
  private _posts;
885
885
  constructor(data: ForumThreadData);
886
886
  /**
887
- * スレッドURL
887
+ * Get thread URL
888
888
  */
889
889
  getUrl(): string;
890
890
  /**
891
- * 投稿一覧を取得
891
+ * Get post list
892
892
  */
893
893
  getPosts(): WikidotResultAsync<ForumPostCollection>;
894
894
  /**
895
- * スレッドに返信
895
+ * Reply to thread
896
896
  */
897
897
  reply(source: string, title?: string, parentPostId?: number | null): WikidotResultAsync<ForumThread2>;
898
898
  toString(): string;
899
899
  /**
900
- * IDからスレッドを取得
900
+ * Get thread by ID
901
901
  */
902
902
  static getFromId(site: Site, threadId: number, category?: ForumCategory | null): WikidotResultAsync<ForumThread2>;
903
903
  }
904
904
  /**
905
- * フォーラムスレッドコレクション
905
+ * Forum thread collection
906
906
  */
907
907
  declare class ForumThreadCollection extends Array<ForumThread2> {
908
908
  readonly site: Site;
909
909
  constructor(site: Site, threads?: ForumThread2[]);
910
910
  /**
911
- * IDで検索
911
+ * Find by ID
912
912
  */
913
913
  findById(id: number): ForumThread2 | undefined;
914
914
  /**
915
- * カテゴリ内の全スレッドを取得
915
+ * Get all threads in category
916
916
  */
917
917
  static acquireAllInCategory(category: ForumCategory): WikidotResultAsync<ForumThreadCollection>;
918
918
  /**
919
- * スレッドIDから単一のスレッドを取得
920
- * @param site - サイト
921
- * @param threadId - スレッドID
919
+ * Get a single thread by thread ID
920
+ * @param site - Site instance
921
+ * @param threadId - Thread ID
922
922
  */
923
923
  static fromId(site: Site, threadId: number): WikidotResultAsync<ForumThread2>;
924
924
  /**
925
- * スレッドIDからスレッドを取得
925
+ * Get threads by thread IDs
926
926
  */
927
927
  static acquireFromThreadIds(site: Site, threadIds: number[], category?: ForumCategory | null): WikidotResultAsync<ForumThreadCollection>;
928
928
  }
929
929
  /**
930
- * フォーラムカテゴリデータ
930
+ * Forum category data
931
931
  */
932
932
  interface ForumCategoryData {
933
933
  site: Site;
@@ -938,7 +938,7 @@ interface ForumCategoryData {
938
938
  postsCount: number;
939
939
  }
940
940
  /**
941
- * フォーラムカテゴリ
941
+ * Forum category
942
942
  */
943
943
  declare class ForumCategory {
944
944
  readonly site: Site;
@@ -950,76 +950,76 @@ declare class ForumCategory {
950
950
  private _threads;
951
951
  constructor(data: ForumCategoryData);
952
952
  /**
953
- * スレッド一覧を取得
953
+ * Get thread list
954
954
  */
955
955
  getThreads(): WikidotResultAsync<ForumThreadCollection>;
956
956
  /**
957
- * スレッド一覧を再取得
957
+ * Reload thread list
958
958
  */
959
959
  reloadThreads(): WikidotResultAsync<ForumThreadCollection>;
960
960
  /**
961
- * スレッドを作成
961
+ * Create thread
962
962
  */
963
963
  createThread(title: string, description: string, source: string): WikidotResultAsync<ForumThread2>;
964
964
  toString(): string;
965
965
  }
966
966
  /**
967
- * フォーラムカテゴリコレクション
967
+ * Forum category collection
968
968
  */
969
969
  declare class ForumCategoryCollection extends Array<ForumCategory> {
970
970
  readonly site: Site;
971
971
  constructor(site: Site, categories?: ForumCategory[]);
972
972
  /**
973
- * IDで検索
973
+ * Find by ID
974
974
  */
975
975
  findById(id: number): ForumCategory | undefined;
976
976
  /**
977
- * サイトの全カテゴリを取得
977
+ * Get all categories for a site
978
978
  */
979
979
  static acquireAll(site: Site): WikidotResultAsync<ForumCategoryCollection>;
980
980
  }
981
981
  /**
982
- * QuickModuleモジュール名
982
+ * QuickModule module name
983
983
  */
984
984
  type QuickModuleName = "MemberLookupQModule" | "UserLookupQModule" | "PageLookupQModule";
985
985
  /**
986
- * QuickModuleユーザー情報
986
+ * QuickModule user information
987
987
  */
988
988
  interface QMCUser {
989
989
  id: number;
990
990
  name: string;
991
991
  }
992
992
  /**
993
- * QuickModuleページ情報
993
+ * QuickModule page information
994
994
  */
995
995
  interface QMCPage {
996
996
  title: string;
997
997
  unixName: string;
998
998
  }
999
999
  /**
1000
- * サイトメンバーを検索
1001
- * @param siteId - サイトID
1002
- * @param query - 検索クエリ(ユーザー名の一部)
1003
- * @returns マッチしたユーザー一覧
1000
+ * Search site members
1001
+ * @param siteId - Site ID
1002
+ * @param query - Search query (partial username)
1003
+ * @returns List of matching users
1004
1004
  */
1005
1005
  declare function memberLookup(siteId: number, query: string): WikidotResultAsync<QMCUser[]>;
1006
1006
  /**
1007
- * Wikidot全体からユーザーを検索
1008
- * @param siteId - サイトID(任意のサイトIDで可)
1009
- * @param query - 検索クエリ(ユーザー名の一部)
1010
- * @returns マッチしたユーザー一覧
1007
+ * Search users across all Wikidot
1008
+ * @param siteId - Site ID (any site ID works)
1009
+ * @param query - Search query (partial username)
1010
+ * @returns List of matching users
1011
1011
  */
1012
1012
  declare function userLookup(siteId: number, query: string): WikidotResultAsync<QMCUser[]>;
1013
1013
  /**
1014
- * サイト内のページを検索
1015
- * @param siteId - サイトID
1016
- * @param query - 検索クエリ(ページ名の一部)
1017
- * @returns マッチしたページ一覧
1014
+ * Search pages within site
1015
+ * @param siteId - Site ID
1016
+ * @param query - Search query (partial page name)
1017
+ * @returns List of matching pages
1018
1018
  */
1019
1019
  declare function pageLookup(siteId: number, query: string): WikidotResultAsync<QMCPage[]>;
1020
1020
  /**
1021
- * QuickModule API(後方互換性のため維持)
1022
- * @deprecated 代わりに個別の関数(memberLookup, userLookup, pageLookup)を使用してください
1021
+ * QuickModule API (maintained for backwards compatibility)
1022
+ * @deprecated Use individual functions (memberLookup, userLookup, pageLookup) instead
1023
1023
  */
1024
1024
  declare const QuickModule: {
1025
1025
  memberLookup: typeof memberLookup;
@@ -1027,7 +1027,7 @@ declare const QuickModule: {
1027
1027
  pageLookup: typeof pageLookup;
1028
1028
  };
1029
1029
  /**
1030
- * サイト参加申請データ
1030
+ * Site membership application data
1031
1031
  */
1032
1032
  interface SiteApplicationData {
1033
1033
  site: Site;
@@ -1035,7 +1035,7 @@ interface SiteApplicationData {
1035
1035
  text: string;
1036
1036
  }
1037
1037
  /**
1038
- * サイト参加申請
1038
+ * Site membership application
1039
1039
  */
1040
1040
  declare class SiteApplication {
1041
1041
  readonly site: Site;
@@ -1043,26 +1043,26 @@ declare class SiteApplication {
1043
1043
  readonly text: string;
1044
1044
  constructor(data: SiteApplicationData);
1045
1045
  /**
1046
- * 未処理の参加申請をすべて取得する
1047
- * @param site - 対象サイト
1046
+ * Get all pending membership applications
1047
+ * @param site - Target site
1048
1048
  */
1049
1049
  static acquireAll(site: Site): WikidotResultAsync<SiteApplication[]>;
1050
1050
  /**
1051
- * 申請を処理する内部メソッド
1051
+ * Internal method to process application
1052
1052
  */
1053
1053
  private process;
1054
1054
  /**
1055
- * 参加申請を承認する
1055
+ * Accept membership application
1056
1056
  */
1057
1057
  accept(): WikidotResultAsync<void>;
1058
1058
  /**
1059
- * 参加申請を拒否する
1059
+ * Decline membership application
1060
1060
  */
1061
1061
  decline(): WikidotResultAsync<void>;
1062
1062
  toString(): string;
1063
1063
  }
1064
1064
  /**
1065
- * サイトメンバーデータ
1065
+ * Site member data
1066
1066
  */
1067
1067
  interface SiteMemberData {
1068
1068
  site: Site;
@@ -1070,7 +1070,7 @@ interface SiteMemberData {
1070
1070
  joinedAt: Date | null;
1071
1071
  }
1072
1072
  /**
1073
- * サイトメンバー
1073
+ * Site member
1074
1074
  */
1075
1075
  declare class SiteMember {
1076
1076
  readonly site: Site;
@@ -1078,80 +1078,80 @@ declare class SiteMember {
1078
1078
  readonly joinedAt: Date | null;
1079
1079
  constructor(data: SiteMemberData);
1080
1080
  /**
1081
- * HTMLからメンバー情報をパースする
1081
+ * Parse member information from HTML
1082
1082
  */
1083
1083
  private static parse;
1084
1084
  /**
1085
- * サイトメンバー一覧を取得する
1086
- * @param site - 対象サイト
1087
- * @param group - グループ("admins", "moderators", または空文字で全メンバー)
1085
+ * Get site member list
1086
+ * @param site - Target site
1087
+ * @param group - Group ("admins", "moderators", or empty string for all members)
1088
1088
  */
1089
1089
  static getMembers(site: Site, group?: "admins" | "moderators" | ""): WikidotResultAsync<SiteMember[]>;
1090
1090
  /**
1091
- * グループ変更の内部メソッド
1091
+ * Internal method to change group
1092
1092
  */
1093
1093
  private changeGroup;
1094
1094
  /**
1095
- * モデレーターに昇格
1095
+ * Promote to moderator
1096
1096
  */
1097
1097
  toModerator(): WikidotResultAsync<void>;
1098
1098
  /**
1099
- * モデレーター権限を削除
1099
+ * Remove moderator privileges
1100
1100
  */
1101
1101
  removeModerator(): WikidotResultAsync<void>;
1102
1102
  /**
1103
- * 管理者に昇格
1103
+ * Promote to admin
1104
1104
  */
1105
1105
  toAdmin(): WikidotResultAsync<void>;
1106
1106
  /**
1107
- * 管理者権限を削除
1107
+ * Remove admin privileges
1108
1108
  */
1109
1109
  removeAdmin(): WikidotResultAsync<void>;
1110
1110
  toString(): string;
1111
1111
  }
1112
1112
  /**
1113
- * サイトメンバー操作アクセサ
1113
+ * Site member operations accessor
1114
1114
  */
1115
1115
  declare class MemberAccessor {
1116
1116
  readonly site: Site;
1117
1117
  constructor(site: Site);
1118
1118
  /**
1119
- * 全メンバーを取得する
1120
- * @returns メンバー一覧
1119
+ * Get all members
1120
+ * @returns Member list
1121
1121
  */
1122
1122
  getAll(): WikidotResultAsync<SiteMember[]>;
1123
1123
  /**
1124
- * モデレーター一覧を取得する
1125
- * @returns モデレーター一覧
1124
+ * Get moderator list
1125
+ * @returns Moderator list
1126
1126
  */
1127
1127
  getModerators(): WikidotResultAsync<SiteMember[]>;
1128
1128
  /**
1129
- * 管理者一覧を取得する
1130
- * @returns 管理者一覧
1129
+ * Get admin list
1130
+ * @returns Admin list
1131
1131
  */
1132
1132
  getAdmins(): WikidotResultAsync<SiteMember[]>;
1133
1133
  /**
1134
- * 未処理の参加申請を取得する
1135
- * @returns 参加申請一覧
1134
+ * Get pending membership applications
1135
+ * @returns Application list
1136
1136
  */
1137
1137
  getApplications(): WikidotResultAsync<SiteApplication[]>;
1138
1138
  /**
1139
- * メンバーを検索する
1140
- * @param query - 検索クエリ(ユーザー名の一部)
1141
- * @returns マッチしたユーザー一覧(QMCUser形式)
1139
+ * Search members
1140
+ * @param query - Search query (part of username)
1141
+ * @returns Matched user list (QMCUser format)
1142
1142
  */
1143
1143
  lookup(query: string): WikidotResultAsync<QMCUser[]>;
1144
1144
  /**
1145
- * ユーザーをサイトに招待する
1146
- * @param user - 招待するユーザー
1147
- * @param text - 招待メッセージ
1145
+ * Invite user to site
1146
+ * @param user - User to invite
1147
+ * @param text - Invitation message
1148
1148
  */
1149
1149
  invite(user: User, text: string): WikidotResultAsync<void>;
1150
1150
  }
1151
1151
  import * as cheerio from "cheerio";
1152
1152
  import { AnyNode } from "domhandler";
1153
1153
  /**
1154
- * ページファイルデータ
1154
+ * Page file data
1155
1155
  */
1156
1156
  interface PageFileData {
1157
1157
  page: Page;
@@ -1162,7 +1162,7 @@ interface PageFileData {
1162
1162
  size: number;
1163
1163
  }
1164
1164
  /**
1165
- * ページ添付ファイル
1165
+ * Page attachment file
1166
1166
  */
1167
1167
  declare class PageFile {
1168
1168
  readonly page: Page;
@@ -1175,30 +1175,30 @@ declare class PageFile {
1175
1175
  toString(): string;
1176
1176
  }
1177
1177
  /**
1178
- * ページファイルコレクション
1178
+ * Page file collection
1179
1179
  */
1180
1180
  declare class PageFileCollection extends Array<PageFile> {
1181
1181
  readonly page: Page;
1182
1182
  constructor(page: Page, files?: PageFile[]);
1183
1183
  /**
1184
- * IDで検索
1184
+ * Find by ID
1185
1185
  */
1186
1186
  findById(id: number): PageFile | undefined;
1187
1187
  /**
1188
- * 名前で検索
1188
+ * Find by name
1189
1189
  */
1190
1190
  findByName(name: string): PageFile | undefined;
1191
1191
  /**
1192
- * サイズ文字列をバイト数に変換
1192
+ * Convert size string to bytes
1193
1193
  */
1194
1194
  private static parseSize;
1195
1195
  /**
1196
- * ページに添付されたファイル一覧を取得する
1196
+ * Get list of files attached to page
1197
1197
  */
1198
1198
  static acquire(page: Page): WikidotResultAsync<PageFileCollection>;
1199
1199
  }
1200
1200
  /**
1201
- * ページメタタグデータ
1201
+ * Page meta tag data
1202
1202
  */
1203
1203
  interface PageMetaData {
1204
1204
  page: PageRef;
@@ -1206,7 +1206,7 @@ interface PageMetaData {
1206
1206
  content: string;
1207
1207
  }
1208
1208
  /**
1209
- * ページメタタグ
1209
+ * Page meta tag
1210
1210
  */
1211
1211
  declare class PageMeta {
1212
1212
  readonly page: PageRef;
@@ -1214,68 +1214,68 @@ declare class PageMeta {
1214
1214
  content: string;
1215
1215
  constructor(data: PageMetaData);
1216
1216
  /**
1217
- * メタタグの値を更新する
1218
- * @param content - 新しい値
1217
+ * Update meta tag value
1218
+ * @param content - New value
1219
1219
  */
1220
1220
  update(content: string): WikidotResultAsync<void>;
1221
1221
  /**
1222
- * メタタグを削除する
1222
+ * Delete meta tag
1223
1223
  */
1224
1224
  delete(): WikidotResultAsync<void>;
1225
1225
  toString(): string;
1226
1226
  }
1227
1227
  /**
1228
- * ページメタタグコレクション
1228
+ * Page meta tag collection
1229
1229
  */
1230
1230
  declare class PageMetaCollection extends Array<PageMeta> {
1231
1231
  readonly page: PageRef;
1232
1232
  constructor(page: PageRef, metas?: PageMeta[]);
1233
1233
  /**
1234
- * 名前で検索
1235
- * @param name - メタタグ名
1236
- * @returns メタタグ(存在しない場合はundefined
1234
+ * Find by name
1235
+ * @param name - Meta tag name
1236
+ * @returns Meta tag (undefined if not found)
1237
1237
  */
1238
1238
  findByName(name: string): PageMeta | undefined;
1239
1239
  /**
1240
- * ページのメタタグを取得する
1241
- * @param page - ページ参照
1242
- * @returns メタタグコレクション
1240
+ * Get page meta tags
1241
+ * @param page - Page reference
1242
+ * @returns Meta tag collection
1243
1243
  */
1244
1244
  static acquire(page: PageRef): WikidotResultAsync<PageMetaCollection>;
1245
1245
  /**
1246
- * メタタグを設定する
1247
- * @param page - ページ参照
1248
- * @param name - メタタグ名
1249
- * @param content - メタタグの値
1246
+ * Set meta tag
1247
+ * @param page - Page reference
1248
+ * @param name - Meta tag name
1249
+ * @param content - Meta tag value
1250
1250
  */
1251
1251
  static setMeta(page: PageRef, name: string, content: string): WikidotResultAsync<void>;
1252
1252
  /**
1253
- * メタタグを削除する
1254
- * @param page - ページ参照
1255
- * @param name - メタタグ名
1253
+ * Delete meta tag
1254
+ * @param page - Page reference
1255
+ * @param name - Meta tag name
1256
1256
  */
1257
1257
  static deleteMeta(page: PageRef, name: string): WikidotResultAsync<void>;
1258
1258
  }
1259
1259
  /**
1260
- * ページソースデータ
1260
+ * Page source data
1261
1261
  */
1262
1262
  interface PageSourceData {
1263
1263
  page: Page;
1264
1264
  wikiText: string;
1265
1265
  }
1266
1266
  /**
1267
- * ページのソースコード(Wikidot記法)
1267
+ * Page source code (Wikidot syntax)
1268
1268
  */
1269
1269
  declare class PageSource {
1270
- /** ソースが属するページ */
1270
+ /** Page this source belongs to */
1271
1271
  readonly page: Page;
1272
- /** ソースコード(Wikidot記法) */
1272
+ /** Source code (Wikidot syntax) */
1273
1273
  readonly wikiText: string;
1274
1274
  constructor(data: PageSourceData);
1275
1275
  toString(): string;
1276
1276
  }
1277
1277
  /**
1278
- * ページリビジョンデータ
1278
+ * Page revision data
1279
1279
  */
1280
1280
  interface PageRevisionData {
1281
1281
  page: Page;
@@ -1286,87 +1286,87 @@ interface PageRevisionData {
1286
1286
  comment: string;
1287
1287
  }
1288
1288
  /**
1289
- * ページのリビジョン(編集履歴のバージョン)
1289
+ * Page revision (version in edit history)
1290
1290
  */
1291
1291
  declare class PageRevision {
1292
- /** リビジョンが属するページ */
1292
+ /** Page this revision belongs to */
1293
1293
  readonly page: Page;
1294
- /** リビジョンID */
1294
+ /** Revision ID */
1295
1295
  readonly id: number;
1296
- /** リビジョン番号 */
1296
+ /** Revision number */
1297
1297
  readonly revNo: number;
1298
- /** リビジョン作成者 */
1298
+ /** Revision creator */
1299
1299
  readonly createdBy: AbstractUser;
1300
- /** リビジョン作成日時 */
1300
+ /** Revision creation date */
1301
1301
  readonly createdAt: Date;
1302
- /** 編集コメント */
1302
+ /** Edit comment */
1303
1303
  readonly comment: string;
1304
- /** ソースコード(内部キャッシュ) */
1304
+ /** Source code (internal cache) */
1305
1305
  private _source;
1306
- /** HTML表示(内部キャッシュ) */
1306
+ /** HTML display (internal cache) */
1307
1307
  private _html;
1308
1308
  constructor(data: PageRevisionData);
1309
1309
  /**
1310
- * ソースコードが取得済みかどうか
1310
+ * Whether source code has been acquired
1311
1311
  */
1312
1312
  isSourceAcquired(): boolean;
1313
1313
  /**
1314
- * HTML表示が取得済みかどうか
1314
+ * Whether HTML display has been acquired
1315
1315
  */
1316
1316
  isHtmlAcquired(): boolean;
1317
1317
  /**
1318
- * ソースコード(キャッシュ済み)を取得
1318
+ * Get source code (cached)
1319
1319
  */
1320
1320
  get source(): PageSource | null;
1321
1321
  /**
1322
- * ソースコードを設定
1322
+ * Set source code
1323
1323
  */
1324
1324
  set source(value: PageSource | null);
1325
1325
  /**
1326
- * HTML表示(キャッシュ済み)を取得
1326
+ * Get HTML display (cached)
1327
1327
  */
1328
1328
  get html(): string | null;
1329
1329
  /**
1330
- * HTML表示を設定
1330
+ * Set HTML display
1331
1331
  */
1332
1332
  set html(value: string | null);
1333
1333
  /**
1334
- * リビジョンのソースを取得する(REV-001
1335
- * @returns ソース文字列
1334
+ * Get revision source (REV-001)
1335
+ * @returns Source string
1336
1336
  */
1337
1337
  getSource(): WikidotResultAsync<string>;
1338
1338
  /**
1339
- * リビジョンのHTMLを取得する(REV-002
1340
- * @returns HTML文字列
1339
+ * Get revision HTML (REV-002)
1340
+ * @returns HTML string
1341
1341
  */
1342
1342
  getHtml(): WikidotResultAsync<string>;
1343
1343
  toString(): string;
1344
1344
  }
1345
1345
  /**
1346
- * ページリビジョンコレクション
1346
+ * Page revision collection
1347
1347
  */
1348
1348
  declare class PageRevisionCollection extends Array<PageRevision> {
1349
1349
  readonly page: Page | null;
1350
1350
  constructor(page: Page | null, revisions?: PageRevision[]);
1351
1351
  /**
1352
- * IDで検索
1353
- * @param id - リビジョンID
1354
- * @returns リビジョン(存在しない場合はundefined
1352
+ * Find by ID
1353
+ * @param id - Revision ID
1354
+ * @returns Revision (undefined if not found)
1355
1355
  */
1356
1356
  findById(id: number): PageRevision | undefined;
1357
1357
  /**
1358
- * 全リビジョンのソースを一括取得する
1359
- * @returns ソース文字列の配列
1358
+ * Get sources for all revisions
1359
+ * @returns Array of source strings
1360
1360
  */
1361
1361
  getSources(): WikidotResultAsync<string[]>;
1362
1362
  /**
1363
- * 全リビジョンのHTMLを一括取得する
1364
- * @returns HTML文字列の配列
1363
+ * Get HTML for all revisions
1364
+ * @returns Array of HTML strings
1365
1365
  */
1366
1366
  getHtmls(): WikidotResultAsync<string[]>;
1367
1367
  }
1368
1368
  /**
1369
- * ページ投票データ
1369
+ * Page vote data
1370
1370
  */
1371
1371
  interface PageVoteData {
1372
1372
  page: Page;
@@ -1374,132 +1374,132 @@ interface PageVoteData {
1374
1374
  value: number;
1375
1375
  }
1376
1376
  /**
1377
- * ページへの投票(レーティング)
1377
+ * Page vote (rating)
1378
1378
  */
1379
1379
  declare class PageVote {
1380
- /** 投票が属するページ */
1380
+ /** Page this vote belongs to */
1381
1381
  readonly page: Page;
1382
- /** 投票したユーザー */
1382
+ /** User who voted */
1383
1383
  readonly user: AbstractUser;
1384
- /** 投票値(+1/-1 または 数値) */
1384
+ /** Vote value (+1/-1 or numeric) */
1385
1385
  readonly value: number;
1386
1386
  constructor(data: PageVoteData);
1387
1387
  toString(): string;
1388
1388
  }
1389
1389
  /**
1390
- * ページ投票コレクション
1390
+ * Page vote collection
1391
1391
  */
1392
1392
  declare class PageVoteCollection extends Array<PageVote> {
1393
1393
  readonly page: Page;
1394
1394
  constructor(page: Page, votes?: PageVote[]);
1395
1395
  /**
1396
- * ユーザーで検索
1397
- * @param user - 検索するユーザー
1398
- * @returns 投票(存在しない場合はundefined
1396
+ * Find by user
1397
+ * @param user - User to search for
1398
+ * @returns Vote (undefined if not found)
1399
1399
  */
1400
1400
  findByUser(user: AbstractUser): PageVote | undefined;
1401
1401
  }
1402
1402
  /**
1403
- * ページ検索クエリのパラメータ
1403
+ * Page search query parameters
1404
1404
  */
1405
1405
  interface SearchPagesQueryParams {
1406
- /** ページタイプ(例: 'normal', 'admin' */
1406
+ /** Page type (e.g., 'normal', 'admin') */
1407
1407
  pagetype?: string;
1408
- /** カテゴリ名 */
1408
+ /** Category name */
1409
1409
  category?: string;
1410
- /** 検索対象タグ(AND条件) */
1410
+ /** Tags to search (AND condition) */
1411
1411
  tags?: string | string[];
1412
- /** 親ページ名 */
1412
+ /** Parent page name */
1413
1413
  parent?: string;
1414
- /** リンク先ページ名 */
1414
+ /** Linked page name */
1415
1415
  linkTo?: string;
1416
- /** 作成日時条件 */
1416
+ /** Created date condition */
1417
1417
  createdAt?: string;
1418
- /** 更新日時条件 */
1418
+ /** Updated date condition */
1419
1419
  updatedAt?: string;
1420
- /** 作成者 */
1420
+ /** Creator */
1421
1421
  createdBy?: AbstractUser | string;
1422
- /** レーティング条件 */
1422
+ /** Rating condition */
1423
1423
  rating?: string;
1424
- /** 投票数条件 */
1424
+ /** Vote count condition */
1425
1425
  votes?: string;
1426
- /** ページ名条件 */
1426
+ /** Page name condition */
1427
1427
  name?: string;
1428
- /** フルネーム(完全一致) */
1428
+ /** Fullname (exact match) */
1429
1429
  fullname?: string;
1430
- /** 範囲指定 */
1430
+ /** Range specification */
1431
1431
  range?: string;
1432
- /** ソート順(例: 'created_at desc' */
1432
+ /** Sort order (e.g., 'created_at desc') */
1433
1433
  order?: string;
1434
- /** 取得開始位置 */
1434
+ /** Start offset */
1435
1435
  offset?: number;
1436
- /** 取得件数制限 */
1436
+ /** Result limit */
1437
1437
  limit?: number;
1438
- /** 1ページあたり件数 */
1438
+ /** Items per page */
1439
1439
  perPage?: number;
1440
- /** 個別表示 */
1440
+ /** Separate display */
1441
1441
  separate?: string;
1442
- /** ラッパー表示 */
1442
+ /** Wrapper display */
1443
1443
  wrapper?: string;
1444
1444
  }
1445
1445
  /**
1446
- * デフォルトの1ページあたり件数
1446
+ * Default items per page
1447
1447
  */
1448
1448
  declare const DEFAULT_PER_PAGE = 250;
1449
1449
  /**
1450
- * デフォルトのモジュールボディフィールド
1450
+ * Default module body fields
1451
1451
  */
1452
1452
  declare const DEFAULT_MODULE_BODY: readonly ["fullname", "category", "name", "title", "created_at", "created_by_linked", "updated_at", "updated_by_linked", "commented_at", "commented_by_linked", "parent_fullname", "comments", "size", "children", "rating_votes", "rating", "rating_percent", "revisions", "tags", "_tags"];
1453
1453
  /**
1454
- * ページ検索クエリ
1454
+ * Page search query
1455
1455
  */
1456
1456
  declare class SearchPagesQuery {
1457
- /** ページタイプ */
1457
+ /** Page type */
1458
1458
  pagetype: string;
1459
- /** カテゴリ */
1459
+ /** Category */
1460
1460
  category: string;
1461
- /** タグ */
1461
+ /** Tags */
1462
1462
  tags: string | string[] | null;
1463
- /** 親ページ */
1463
+ /** Parent page */
1464
1464
  parent: string | null;
1465
- /** リンク先 */
1465
+ /** Link target */
1466
1466
  linkTo: string | null;
1467
- /** 作成日時条件 */
1467
+ /** Created date condition */
1468
1468
  createdAt: string | null;
1469
- /** 更新日時条件 */
1469
+ /** Updated date condition */
1470
1470
  updatedAt: string | null;
1471
- /** 作成者 */
1471
+ /** Creator */
1472
1472
  createdBy: AbstractUser | string | null;
1473
- /** レーティング条件 */
1473
+ /** Rating condition */
1474
1474
  rating: string | null;
1475
- /** 投票数条件 */
1475
+ /** Vote count condition */
1476
1476
  votes: string | null;
1477
- /** ページ名条件 */
1477
+ /** Page name condition */
1478
1478
  name: string | null;
1479
- /** フルネーム条件 */
1479
+ /** Fullname condition */
1480
1480
  fullname: string | null;
1481
- /** 範囲 */
1481
+ /** Range */
1482
1482
  range: string | null;
1483
- /** ソート順 */
1483
+ /** Sort order */
1484
1484
  order: string;
1485
- /** オフセット */
1485
+ /** Offset */
1486
1486
  offset: number;
1487
- /** 取得件数制限 */
1487
+ /** Result limit */
1488
1488
  limit: number | null;
1489
- /** 1ページあたり件数 */
1489
+ /** Items per page */
1490
1490
  perPage: number;
1491
- /** 個別表示 */
1491
+ /** Separate display */
1492
1492
  separate: string;
1493
- /** ラッパー表示 */
1493
+ /** Wrapper display */
1494
1494
  wrapper: string;
1495
1495
  constructor(params?: SearchPagesQueryParams);
1496
1496
  /**
1497
- * 辞書形式に変換
1497
+ * Convert to dictionary format
1498
1498
  */
1499
1499
  asDict(): Record<string, unknown>;
1500
1500
  }
1501
1501
  /**
1502
- * ページデータ
1502
+ * Page data
1503
1503
  */
1504
1504
  interface PageData {
1505
1505
  site: Site;
@@ -1524,7 +1524,7 @@ interface PageData {
1524
1524
  commentedAt: Date | null;
1525
1525
  }
1526
1526
  /**
1527
- * Wikidotページ
1527
+ * Wikidot page
1528
1528
  */
1529
1529
  declare class Page {
1530
1530
  readonly site: Site;
@@ -1553,82 +1553,82 @@ declare class Page {
1553
1553
  private _votes;
1554
1554
  constructor(data: PageData);
1555
1555
  /**
1556
- * ページURLを取得
1556
+ * Get page URL
1557
1557
  */
1558
1558
  getUrl(): string;
1559
1559
  /**
1560
- * ページIDが取得済みかどうか
1560
+ * Whether page ID has been acquired
1561
1561
  */
1562
1562
  isIdAcquired(): boolean;
1563
1563
  /**
1564
- * ページIDを取得
1564
+ * Get page ID
1565
1565
  */
1566
1566
  get id(): number | null;
1567
1567
  /**
1568
- * ページIDを設定
1568
+ * Set page ID
1569
1569
  */
1570
1570
  set id(value: number | null);
1571
1571
  /**
1572
- * ソースコードを取得
1572
+ * Get source code
1573
1573
  */
1574
1574
  get source(): PageSource | null;
1575
1575
  /**
1576
- * ソースコードを設定
1576
+ * Set source code
1577
1577
  */
1578
1578
  set source(value: PageSource | null);
1579
1579
  /**
1580
- * リビジョン履歴を取得
1580
+ * Get revision history
1581
1581
  */
1582
1582
  get revisions(): PageRevisionCollection | null;
1583
1583
  /**
1584
- * リビジョン履歴を設定
1584
+ * Set revision history
1585
1585
  */
1586
1586
  set revisions(value: PageRevisionCollection | null);
1587
1587
  /**
1588
- * 投票情報を取得
1588
+ * Get vote information
1589
1589
  */
1590
1590
  get votes(): PageVoteCollection | null;
1591
1591
  /**
1592
- * 投票情報を設定
1592
+ * Set vote information
1593
1593
  */
1594
1594
  set votes(value: PageVoteCollection | null);
1595
1595
  /**
1596
- * 最新リビジョンを取得
1596
+ * Get latest revision
1597
1597
  */
1598
1598
  get latestRevision(): PageRevision | undefined;
1599
1599
  /**
1600
- * ページIDを確保する(未取得の場合は自動取得)
1601
- * @param operation - 操作名(エラーメッセージ用)
1602
- * @throws IDの取得に失敗した場合
1600
+ * Ensure page ID is available (auto-acquire if not yet acquired)
1601
+ * @param operation - Operation name (for error message)
1602
+ * @throws If ID acquisition fails
1603
1603
  */
1604
1604
  private ensureId;
1605
1605
  /**
1606
- * ページを削除する
1606
+ * Delete page
1607
1607
  */
1608
1608
  destroy(): WikidotResultAsync<void>;
1609
1609
  /**
1610
- * タグを保存する
1610
+ * Save tags
1611
1611
  */
1612
1612
  commitTags(): WikidotResultAsync<void>;
1613
1613
  /**
1614
- * 親ページを設定する
1615
- * @param parentFullname - 親ページのフルネーム(nullで解除)
1614
+ * Set parent page
1615
+ * @param parentFullname - Parent page fullname (null to remove)
1616
1616
  */
1617
1617
  setParent(parentFullname: string | null): WikidotResultAsync<void>;
1618
1618
  /**
1619
- * ページに投票する
1620
- * @param value - 投票値
1621
- * @returns 新しいレーティング
1619
+ * Vote on page
1620
+ * @param value - Vote value
1621
+ * @returns New rating
1622
1622
  */
1623
1623
  vote(value: number): WikidotResultAsync<number>;
1624
1624
  /**
1625
- * 投票をキャンセルする
1626
- * @returns 新しいレーティング
1625
+ * Cancel vote
1626
+ * @returns New rating
1627
1627
  */
1628
1628
  cancelVote(): WikidotResultAsync<number>;
1629
1629
  /**
1630
- * ページを編集する
1631
- * @param options - 編集オプション
1630
+ * Edit the page
1631
+ * @param options - Edit options
1632
1632
  */
1633
1633
  edit(options: {
1634
1634
  title?: string;
@@ -1637,90 +1637,105 @@ declare class Page {
1637
1637
  forceEdit?: boolean;
1638
1638
  }): WikidotResultAsync<void>;
1639
1639
  /**
1640
- * ページ名を変更する
1641
- * @param newFullname - 新しいフルネーム
1640
+ * Rename the page
1641
+ * @param newFullname - New fullname
1642
1642
  */
1643
1643
  rename(newFullname: string): WikidotResultAsync<void>;
1644
1644
  /**
1645
- * ページに添付されたファイル一覧を取得する
1645
+ * Get list of files attached to the page
1646
1646
  */
1647
1647
  getFiles(): WikidotResultAsync<PageFileCollection>;
1648
1648
  /**
1649
- * ページのディスカッションスレッドを取得する
1649
+ * Get the discussion thread for the page
1650
1650
  */
1651
1651
  getDiscussion(): WikidotResultAsync<import("../forum").ForumThread | null>;
1652
1652
  /**
1653
- * ページのメタタグ一覧を取得する
1654
- * @returns メタタグコレクション
1653
+ * Get the list of meta tags for the page
1654
+ * @returns Meta tag collection
1655
1655
  */
1656
1656
  getMetas(): WikidotResultAsync<PageMetaCollection>;
1657
1657
  /**
1658
- * メタタグを設定する
1659
- * @param name - メタタグ名
1660
- * @param content - メタタグの値
1658
+ * Set a meta tag
1659
+ * @param name - Meta tag name
1660
+ * @param content - Meta tag value
1661
1661
  */
1662
1662
  setMeta(name: string, content: string): WikidotResultAsync<void>;
1663
1663
  /**
1664
- * メタタグを削除する
1665
- * @param name - メタタグ名
1664
+ * Delete a meta tag
1665
+ * @param name - Meta tag name
1666
1666
  */
1667
1667
  deleteMeta(name: string): WikidotResultAsync<void>;
1668
+ /**
1669
+ * Get page source (auto-acquire if not yet acquired)
1670
+ * @returns Page source
1671
+ */
1672
+ getSource(): WikidotResultAsync<PageSource>;
1673
+ /**
1674
+ * Get revision history (auto-acquire if not yet acquired)
1675
+ * @returns Revision collection
1676
+ */
1677
+ getRevisions(): WikidotResultAsync<PageRevisionCollection>;
1678
+ /**
1679
+ * Get vote information (auto-acquire if not yet acquired)
1680
+ * @returns Vote collection
1681
+ */
1682
+ getVotes(): WikidotResultAsync<PageVoteCollection>;
1668
1683
  toString(): string;
1669
1684
  }
1670
1685
  /**
1671
- * ページコレクション
1686
+ * Page collection
1672
1687
  */
1673
1688
  declare class PageCollection extends Array<Page> {
1674
1689
  readonly site: Site;
1675
1690
  constructor(site: Site, pages?: Page[]);
1676
1691
  /**
1677
- * フルネームで検索
1678
- * @param fullname - ページのフルネーム
1679
- * @returns ページ(存在しない場合はundefined
1692
+ * Find by fullname
1693
+ * @param fullname - Page fullname
1694
+ * @returns Page (undefined if not found)
1680
1695
  */
1681
1696
  findByFullname(fullname: string): Page | undefined;
1682
1697
  /**
1683
- * ページIDを一括取得
1698
+ * Acquire page IDs in bulk
1684
1699
  */
1685
1700
  getPageIds(): WikidotResultAsync<PageCollection>;
1686
1701
  /**
1687
- * ページソースを一括取得
1702
+ * Acquire page sources in bulk
1688
1703
  */
1689
1704
  getPageSources(): WikidotResultAsync<PageCollection>;
1690
1705
  /**
1691
- * ページリビジョンを一括取得
1706
+ * Acquire page revisions in bulk
1692
1707
  */
1693
1708
  getPageRevisions(): WikidotResultAsync<PageCollection>;
1694
1709
  /**
1695
- * ページ投票を一括取得
1710
+ * Acquire page votes in bulk
1696
1711
  */
1697
1712
  getPageVotes(): WikidotResultAsync<PageCollection>;
1698
1713
  /**
1699
- * ページIDを一括取得する内部メソッド
1714
+ * Internal method to acquire page IDs in bulk
1700
1715
  */
1701
1716
  static acquirePageIds(site: Site, pages: Page[]): WikidotResultAsync<PageCollection>;
1702
1717
  /**
1703
- * ページソースを一括取得する内部メソッド
1718
+ * Internal method to acquire page sources in bulk
1704
1719
  */
1705
1720
  static acquirePageSources(site: Site, pages: Page[]): WikidotResultAsync<PageCollection>;
1706
1721
  /**
1707
- * ページリビジョンを一括取得する内部メソッド
1722
+ * Internal method to acquire page revisions in bulk
1708
1723
  */
1709
1724
  static acquirePageRevisions(site: Site, pages: Page[]): WikidotResultAsync<PageCollection>;
1710
1725
  /**
1711
- * ページ投票を一括取得する内部メソッド
1726
+ * Internal method to acquire page votes in bulk
1712
1727
  */
1713
1728
  static acquirePageVotes(site: Site, pages: Page[]): WikidotResultAsync<PageCollection>;
1714
1729
  /**
1715
- * ListPagesModuleレスポンスをパース
1730
+ * Parse ListPagesModule response
1716
1731
  */
1717
1732
  static parse(site: Site, htmlBody: cheerio.CheerioAPI, _parseUser: (element: cheerio.Cheerio<AnyNode>) => AbstractUser): PageCollection;
1718
1733
  /**
1719
- * ページ検索
1734
+ * Search pages
1720
1735
  */
1721
1736
  static searchPages(site: Site, parseUser: (element: cheerio.Cheerio<AnyNode>) => AbstractUser, query?: SearchPagesQuery | null): WikidotResultAsync<PageCollection>;
1722
1737
  /**
1723
- * ページを作成または編集
1738
+ * Create or edit a page
1724
1739
  */
1725
1740
  static createOrEdit(site: Site, fullname: string, options?: {
1726
1741
  pageId?: number | null;
@@ -1732,7 +1747,7 @@ declare class PageCollection extends Array<Page> {
1732
1747
  }): WikidotResultAsync<void>;
1733
1748
  }
1734
1749
  /**
1735
- * サイト変更履歴データ
1750
+ * Site change history data
1736
1751
  */
1737
1752
  interface SiteChangeData {
1738
1753
  site: Site;
@@ -1745,7 +1760,7 @@ interface SiteChangeData {
1745
1760
  comment: string;
1746
1761
  }
1747
1762
  /**
1748
- * サイト変更履歴
1763
+ * Site change history
1749
1764
  */
1750
1765
  declare class SiteChange {
1751
1766
  readonly site: Site;
@@ -1758,22 +1773,22 @@ declare class SiteChange {
1758
1773
  readonly comment: string;
1759
1774
  constructor(data: SiteChangeData);
1760
1775
  /**
1761
- * ページURL
1776
+ * Get page URL
1762
1777
  */
1763
1778
  getPageUrl(): string;
1764
1779
  toString(): string;
1765
1780
  }
1766
1781
  /**
1767
- * サイト変更履歴コレクション
1782
+ * Site change history collection
1768
1783
  */
1769
1784
  declare class SiteChangeCollection extends Array<SiteChange> {
1770
1785
  readonly site: Site;
1771
1786
  constructor(site: Site, changes?: SiteChange[]);
1772
1787
  /**
1773
- * 最近の変更履歴を取得する
1774
- * @param site - サイト
1775
- * @param options - オプション
1776
- * @returns 変更履歴コレクション
1788
+ * Get recent change history
1789
+ * @param site - Site instance
1790
+ * @param options - Options
1791
+ * @returns Change history collection
1777
1792
  */
1778
1793
  static acquire(site: Site, options?: {
1779
1794
  perPage?: number;
@@ -1782,21 +1797,21 @@ declare class SiteChangeCollection extends Array<SiteChange> {
1782
1797
  }): WikidotResultAsync<SiteChangeCollection>;
1783
1798
  }
1784
1799
  /**
1785
- * 単一ページ操作アクセサ
1800
+ * Single page operations accessor
1786
1801
  */
1787
1802
  declare class PageAccessor {
1788
1803
  readonly site: Site;
1789
1804
  constructor(site: Site);
1790
1805
  /**
1791
- * UNIX名からページを取得する
1792
- * @param unixName - ページのUNIX名(例: 'scp-173'
1793
- * @returns ページ(存在しない場合はnull
1806
+ * Get page by UNIX name
1807
+ * @param unixName - Page UNIX name (e.g., 'scp-173')
1808
+ * @returns Page (null if not found)
1794
1809
  */
1795
1810
  get(unixName: string): WikidotResultAsync<Page | null>;
1796
1811
  /**
1797
- * ページを作成する
1798
- * @param fullname - ページのフルネーム(例: 'scp-173'
1799
- * @param options - 作成オプション
1812
+ * Create a page
1813
+ * @param fullname - Page fullname (e.g., 'scp-173')
1814
+ * @param options - Creation options
1800
1815
  * @returns void
1801
1816
  */
1802
1817
  create(fullname: string, options?: {
@@ -1807,28 +1822,28 @@ declare class PageAccessor {
1807
1822
  }): WikidotResultAsync<void>;
1808
1823
  }
1809
1824
  /**
1810
- * ページ一覧操作アクセサ
1825
+ * Page list operations accessor
1811
1826
  */
1812
1827
  declare class PagesAccessor {
1813
1828
  readonly site: Site;
1814
1829
  constructor(site: Site);
1815
1830
  /**
1816
- * 条件に合うページを検索する
1817
- * @param params - 検索条件
1818
- * @returns ページコレクション
1831
+ * Search pages matching conditions
1832
+ * @param params - Search conditions
1833
+ * @returns Page collection
1819
1834
  */
1820
1835
  search(params?: SearchPagesQueryParams): WikidotResultAsync<PageCollection>;
1821
1836
  /**
1822
- * 全ページを取得する
1823
- * @returns ページコレクション
1837
+ * Get all pages
1838
+ * @returns Page collection
1824
1839
  */
1825
1840
  all(): WikidotResultAsync<PageCollection>;
1826
1841
  /**
1827
- * 最近の変更履歴を取得する
1828
- * @param options - オプション
1829
- * @param options.perPage - 1ページあたりの件数(デフォルト: 20
1830
- * @param options.page - ページ番号(デフォルト: 1
1831
- * @returns 変更履歴コレクション
1842
+ * Get recent changes
1843
+ * @param options - Options
1844
+ * @param options.perPage - Items per page (default: 20)
1845
+ * @param options.page - Page number (default: 1)
1846
+ * @returns Change history collection
1832
1847
  */
1833
1848
  getRecentChanges(options?: {
1834
1849
  perPage?: number;
@@ -1836,7 +1851,7 @@ declare class PagesAccessor {
1836
1851
  }): WikidotResultAsync<SiteChangeCollection>;
1837
1852
  }
1838
1853
  /**
1839
- * サイトデータ
1854
+ * Site data
1840
1855
  */
1841
1856
  interface SiteData {
1842
1857
  id: number;
@@ -1846,111 +1861,111 @@ interface SiteData {
1846
1861
  sslSupported: boolean;
1847
1862
  }
1848
1863
  /**
1849
- * サイトクラス
1864
+ * Site class
1850
1865
  */
1851
1866
  declare class Site {
1852
1867
  readonly client: Client;
1853
- /** サイトID */
1868
+ /** Site ID */
1854
1869
  readonly id: number;
1855
- /** サイトタイトル */
1870
+ /** Site title */
1856
1871
  readonly title: string;
1857
- /** UNIX名(例: scp-jp */
1872
+ /** UNIX name (e.g., scp-jp) */
1858
1873
  readonly unixName: string;
1859
- /** ドメイン */
1874
+ /** Domain */
1860
1875
  readonly domain: string;
1861
- /** SSL対応フラグ */
1876
+ /** SSL support flag */
1862
1877
  readonly sslSupported: boolean;
1863
- /** ページアクセサ */
1878
+ /** Page accessor */
1864
1879
  private _page;
1865
- /** ページ一覧アクセサ */
1880
+ /** Pages accessor */
1866
1881
  private _pages;
1867
- /** フォーラムアクセサ */
1882
+ /** Forum accessor */
1868
1883
  private _forum;
1869
- /** メンバーアクセサ */
1884
+ /** Member accessor */
1870
1885
  private _member;
1871
1886
  constructor(client: Client, data: SiteData);
1872
1887
  /**
1873
- * ページアクセサを取得
1888
+ * Get page accessor
1874
1889
  */
1875
1890
  get page(): PageAccessor;
1876
1891
  /**
1877
- * ページ一覧アクセサを取得
1892
+ * Get pages accessor
1878
1893
  */
1879
1894
  get pages(): PagesAccessor;
1880
1895
  /**
1881
- * フォーラムアクセサを取得
1896
+ * Get forum accessor
1882
1897
  */
1883
1898
  get forum(): ForumAccessor;
1884
1899
  /**
1885
- * メンバーアクセサを取得
1900
+ * Get member accessor
1886
1901
  */
1887
1902
  get member(): MemberAccessor;
1888
1903
  /**
1889
- * サイトのベースURLを取得
1904
+ * Get base URL of the site
1890
1905
  */
1891
1906
  getBaseUrl(): string;
1892
1907
  /**
1893
- * サイトへのAMCリクエストを実行
1894
- * @param bodies - リクエストボディ配列
1895
- * @returns AMCレスポンス配列
1908
+ * Execute AMC request to this site
1909
+ * @param bodies - Request body array
1910
+ * @returns AMC response array
1896
1911
  */
1897
1912
  amcRequest(bodies: AMCRequestBody[]): WikidotResultAsync<AMCResponse[]>;
1898
1913
  /**
1899
- * 単一のAMCリクエストを実行
1900
- * @param body - リクエストボディ
1901
- * @returns AMCレスポンス
1914
+ * Execute a single AMC request
1915
+ * @param body - Request body
1916
+ * @returns AMC response
1902
1917
  */
1903
1918
  amcRequestSingle(body: AMCRequestBody): WikidotResultAsync<AMCResponse>;
1904
1919
  /**
1905
- * UNIX名からサイトを取得する
1906
- * @param client - クライアント
1907
- * @param unixName - サイトのUNIX名(例: 'scp-jp'
1908
- * @returns サイト
1920
+ * Get site from UNIX name
1921
+ * @param client - Client
1922
+ * @param unixName - Site UNIX name (e.g., 'scp-jp')
1923
+ * @returns Site
1909
1924
  */
1910
1925
  static fromUnixName(client: Client, unixName: string): WikidotResultAsync<Site>;
1911
1926
  toString(): string;
1912
1927
  }
1913
1928
  /**
1914
- * フォーラム操作アクセサ
1929
+ * Forum operations accessor
1915
1930
  */
1916
1931
  declare class ForumAccessor {
1917
1932
  readonly site: Site;
1918
1933
  constructor(site: Site);
1919
1934
  /**
1920
- * フォーラムカテゴリ一覧を取得
1921
- * @returns カテゴリ一覧
1935
+ * Get forum category list
1936
+ * @returns Category list
1922
1937
  */
1923
1938
  getCategories(): WikidotResultAsync<ForumCategoryCollection>;
1924
1939
  /**
1925
- * スレッドを取得
1926
- * @param threadId - スレッドID
1927
- * @returns スレッド
1940
+ * Get thread
1941
+ * @param threadId - Thread ID
1942
+ * @returns Thread
1928
1943
  */
1929
1944
  getThread(threadId: number): WikidotResultAsync<ForumThread2>;
1930
1945
  /**
1931
- * 複数スレッドを取得
1932
- * @param threadIds - スレッドID配列
1933
- * @returns スレッドコレクション
1946
+ * Get multiple threads
1947
+ * @param threadIds - Array of thread IDs
1948
+ * @returns Thread collection
1934
1949
  */
1935
1950
  getThreads(threadIds: number[]): WikidotResultAsync<ForumThreadCollection>;
1936
1951
  }
1937
1952
  /**
1938
- * サイト操作アクセサ
1953
+ * Site operations accessor
1939
1954
  */
1940
1955
  declare class SiteAccessor {
1941
1956
  readonly client: Client;
1942
1957
  constructor(client: Client);
1943
1958
  /**
1944
- * UNIX名からサイトを取得する
1959
+ * Get site by UNIX name
1945
1960
  *
1946
- * @param unixName - サイトのUNIX名(例: 'scp-jp'
1947
- * @returns Result型でラップされたサイトオブジェクト
1961
+ * @param unixName - Site UNIX name (e.g., 'scp-jp')
1962
+ * @returns Site object wrapped in Result type
1948
1963
  *
1949
1964
  * @example
1950
1965
  * ```typescript
1951
1966
  * const siteResult = await client.site.get('scp-jp');
1952
1967
  * if (!siteResult.isOk()) {
1953
- * throw new Error('サイトの取得に失敗しました');
1968
+ * throw new Error('Failed to get site');
1954
1969
  * }
1955
1970
  * const site = siteResult.value;
1956
1971
  * ```
@@ -1958,148 +1973,148 @@ declare class SiteAccessor {
1958
1973
  get(unixName: string): WikidotResultAsync<Site>;
1959
1974
  }
1960
1975
  /**
1961
- * ユーザー取得オプション
1976
+ * User retrieval options
1962
1977
  */
1963
1978
  interface GetUserOptions {
1964
- /** ユーザーが見つからない場合にエラーを発生させる(デフォルト: false */
1979
+ /** Throw error if user not found (default: false) */
1965
1980
  raiseWhenNotFound?: boolean;
1966
1981
  }
1967
1982
  /**
1968
- * ユーザー操作アクセサ
1983
+ * User operations accessor
1969
1984
  */
1970
1985
  declare class UserAccessor {
1971
1986
  readonly client: Client;
1972
1987
  constructor(client: Client);
1973
1988
  /**
1974
- * ユーザー名からユーザーを取得する
1989
+ * Get user by username
1975
1990
  *
1976
- * @param name - ユーザー名
1977
- * @param options - 取得オプション
1978
- * @returns Result型でラップされたユーザー(存在しない場合はnullraiseWhenNotFoundtrueの場合はエラー)
1991
+ * @param name - Username
1992
+ * @param options - Retrieval options
1993
+ * @returns User wrapped in Result type (null if not found, error if raiseWhenNotFound is true)
1979
1994
  *
1980
1995
  * @example
1981
1996
  * ```typescript
1982
1997
  * const userResult = await client.user.get('username');
1983
1998
  * if (!userResult.isOk()) {
1984
- * throw new Error('ユーザーの取得に失敗しました');
1999
+ * throw new Error('Failed to get user');
1985
2000
  * }
1986
2001
  * const user = userResult.value;
1987
2002
  * ```
1988
2003
  */
1989
2004
  get(name: string, options?: GetUserOptions): WikidotResultAsync<User | null>;
1990
2005
  /**
1991
- * 複数ユーザー名からユーザーを取得する
1992
- * @param names - ユーザー名配列
1993
- * @param options - 取得オプション
1994
- * @returns ユーザーコレクション(存在しないユーザーはnullraiseWhenNotFoundtrueの場合はエラー)
2006
+ * Get users from multiple usernames
2007
+ * @param names - Array of usernames
2008
+ * @param options - Retrieval options
2009
+ * @returns User collection (null for non-existent users, error if raiseWhenNotFound is true)
1995
2010
  */
1996
2011
  getMany(names: string[], options?: GetUserOptions): WikidotResultAsync<UserCollection>;
1997
2012
  }
1998
2013
  /**
1999
- * クライアント作成オプション
2014
+ * Client creation options
2000
2015
  */
2001
2016
  interface ClientOptions {
2002
- /** Wikidotユーザー名 */
2017
+ /** Wikidot username */
2003
2018
  username?: string;
2004
- /** Wikidotパスワード */
2019
+ /** Wikidot password */
2005
2020
  password?: string;
2006
- /** ベースドメイン(デフォルト: wikidot.com */
2021
+ /** Base domain (default: wikidot.com) */
2007
2022
  domain?: string;
2008
- /** AMC設定オーバーライド */
2023
+ /** AMC configuration override */
2009
2024
  amcConfig?: Partial<AMCConfig>;
2010
2025
  }
2011
2026
  /**
2012
- * Wikidotクライアント
2013
- * ライブラリのメインエントリポイント
2027
+ * Wikidot client
2028
+ * Main entry point of the library
2014
2029
  */
2015
2030
  declare class Client {
2016
- /** AMCクライアント */
2031
+ /** AMC client */
2017
2032
  readonly amcClient: AMCClient;
2018
- /** ベースドメイン */
2033
+ /** Base domain */
2019
2034
  readonly domain: string;
2020
- /** ユーザー操作アクセサ */
2035
+ /** User operations accessor */
2021
2036
  readonly user: UserAccessor;
2022
- /** サイト操作アクセサ */
2037
+ /** Site operations accessor */
2023
2038
  readonly site: SiteAccessor;
2024
- /** プライベートメッセージ操作アクセサ */
2039
+ /** Private message operations accessor */
2025
2040
  readonly privateMessage: PrivateMessageAccessor;
2026
- /** ログイン中のユーザー名 */
2041
+ /** Username of the logged-in user */
2027
2042
  private _username;
2028
- /** ログイン中のユーザー */
2043
+ /** Logged-in user */
2029
2044
  private _me;
2030
2045
  /**
2031
- * プライベートコンストラクタ
2032
- * createメソッドを使用してインスタンスを作成する
2046
+ * Private constructor
2047
+ * Use the create method to create an instance
2033
2048
  */
2034
2049
  private constructor();
2035
2050
  /**
2036
- * ログイン中のユーザー名を取得
2051
+ * Get the username of the logged-in user
2037
2052
  */
2038
2053
  get username(): string | null;
2039
2054
  /**
2040
- * ログイン中のユーザーを取得
2041
- * ログインしていない場合はnull
2055
+ * Get the logged-in user
2056
+ * Returns null if not logged in
2042
2057
  */
2043
2058
  get me(): User | null;
2044
2059
  /**
2045
- * クライアントを作成する
2060
+ * Create a client
2046
2061
  *
2047
- * @param options - クライアントオプション
2048
- * @returns Result型でラップされたクライアントインスタンス
2062
+ * @param options - Client options
2063
+ * @returns Client instance wrapped in Result type
2049
2064
  *
2050
2065
  * @example
2051
2066
  * ```typescript
2052
2067
  * import { Client } from '@ukwhatn/wikidot';
2053
2068
  *
2054
- * // クライアントを作成
2069
+ * // Create a client
2055
2070
  * const clientResult = await Client.create({
2056
2071
  * username: 'your_username',
2057
2072
  * password: 'your_password',
2058
2073
  * });
2059
2074
  *
2060
- * // Result型なのでisOk()でチェック後、.valueで取得
2075
+ * // Result type requires isOk() check before accessing .value
2061
2076
  * if (!clientResult.isOk()) {
2062
- * throw new Error('クライアントの作成に失敗しました');
2077
+ * throw new Error('Failed to create client');
2063
2078
  * }
2064
2079
  * const client = clientResult.value;
2065
2080
  *
2066
- * // これでclient.site等にアクセス可能
2081
+ * // Now you can access client.site, etc.
2067
2082
  * const siteResult = await client.site.get('scp-jp');
2068
2083
  * ```
2069
2084
  */
2070
2085
  static create(options?: ClientOptions): WikidotResultAsync<Client>;
2071
2086
  /**
2072
- * 未認証クライアントを作成する
2073
- * @param options - クライアントオプション(認証情報以外)
2074
- * @returns クライアントインスタンス
2087
+ * Create an unauthenticated client
2088
+ * @param options - Client options (excluding credentials)
2089
+ * @returns Client instance
2075
2090
  */
2076
2091
  static createAnonymous(options?: Omit<ClientOptions, "username" | "password">): Client;
2077
2092
  /**
2078
- * ログイン状態を確認する
2079
- * @returns ログイン済みならtrue
2093
+ * Check login status
2094
+ * @returns true if logged in
2080
2095
  */
2081
2096
  isLoggedIn(): boolean;
2082
2097
  /**
2083
- * ログインを要求する
2084
- * ログイン済みでない場合はLoginRequiredErrorを返す
2085
- * @returns 成功時はvoid
2098
+ * Require login
2099
+ * Returns LoginRequiredError if not logged in
2100
+ * @returns void on success
2086
2101
  */
2087
2102
  requireLogin(): WikidotResult<void>;
2088
2103
  /**
2089
- * クライアントをクローズする
2090
- * セッションがある場合はログアウトを試みる
2104
+ * Close the client
2105
+ * Attempts to logout if a session exists
2091
2106
  */
2092
2107
  close(): WikidotResultAsync<void>;
2093
2108
  }
2094
2109
  /**
2095
- * プライベートメッセージ操作アクセサ
2110
+ * Private message operations accessor
2096
2111
  *
2097
2112
  * @example
2098
2113
  * ```typescript
2099
- * // 受信箱を取得
2114
+ * // Get inbox
2100
2115
  * const inboxResult = await client.privateMessage.inbox();
2101
2116
  * if (!inboxResult.isOk()) {
2102
- * throw new Error('受信箱の取得に失敗しました');
2117
+ * throw new Error('Failed to get inbox');
2103
2118
  * }
2104
2119
  * const inbox = inboxResult.value;
2105
2120
  * ```
@@ -2108,51 +2123,51 @@ declare class PrivateMessageAccessor {
2108
2123
  readonly client: Client;
2109
2124
  constructor(client: Client);
2110
2125
  /**
2111
- * メッセージIDからメッセージを取得する
2126
+ * Get message by message ID
2112
2127
  *
2113
- * @param id - メッセージID
2114
- * @returns Result型でラップされたメッセージオブジェクト
2128
+ * @param id - Message ID
2129
+ * @returns Message object wrapped in Result type
2115
2130
  */
2116
2131
  get(id: number): WikidotResultAsync<PrivateMessage>;
2117
2132
  /**
2118
- * 複数のメッセージIDからメッセージを取得する
2119
- * @param ids - メッセージID配列
2120
- * @returns メッセージコレクション
2133
+ * Get messages from multiple message IDs
2134
+ * @param ids - Array of message IDs
2135
+ * @returns Message collection
2121
2136
  */
2122
2137
  getMessages(ids: number[]): WikidotResultAsync<PrivateMessageCollection>;
2123
2138
  /**
2124
- * 受信箱のメッセージ一覧を取得する
2125
- * @returns 受信箱
2139
+ * Get inbox message list
2140
+ * @returns Inbox
2126
2141
  */
2127
2142
  inbox(): WikidotResultAsync<PrivateMessageInbox>;
2128
2143
  /**
2129
- * 送信箱のメッセージ一覧を取得する
2130
- * @returns 送信箱
2144
+ * Get sent box message list
2145
+ * @returns Sent box
2131
2146
  */
2132
2147
  sentBox(): WikidotResultAsync<PrivateMessageSentBox>;
2133
2148
  /**
2134
- * プライベートメッセージを送信する
2135
- * @param recipient - 受信者
2136
- * @param subject - 件名
2137
- * @param body - 本文
2149
+ * Send a private message
2150
+ * @param recipient - Recipient
2151
+ * @param subject - Subject
2152
+ * @param body - Body
2138
2153
  */
2139
2154
  send(recipient: User, subject: string, body: string): WikidotResultAsync<void>;
2140
2155
  }
2141
2156
  import * as cheerio2 from "cheerio";
2142
2157
  import { AnyNode as AnyNode2 } from "domhandler";
2143
2158
  /**
2144
- * printuser要素をパースし、ユーザーオブジェクトを返す
2159
+ * Parse printuser element and return user object
2145
2160
  *
2146
- * @param client - Wikidotクライアント
2147
- * @param elem - パース対象の要素(printuserクラスがついた要素)
2148
- * @returns パースされて得られたユーザーオブジェクト
2161
+ * @param client - Wikidot client
2162
+ * @param elem - Element to parse (element with printuser class)
2163
+ * @returns Parsed user object
2149
2164
  */
2150
2165
  declare function parseUser2(client: ClientRef, elem: cheerio2.Cheerio<AnyNode2>): AbstractUser;
2151
2166
  /**
2152
- * odate要素から日時をパースする
2167
+ * Parse date from odate element
2153
2168
  *
2154
- * @param elem - パース対象の要素(odate要素)
2155
- * @returns パースされたDate、パース失敗時はnull
2169
+ * @param elem - Element to parse (odate element)
2170
+ * @returns Parsed Date, or null on parse failure
2156
2171
  */
2157
2172
  declare function parseOdate(elem: cheerio2.Cheerio<AnyNode2>): Date | null;
2158
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, ForumThread2 as ForumThread, 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 };