> For AI agents: the complete documentation index is available at https://types-mediawiki-response.pages.dev/zh/llms.txt, the full documentation bundle is available at https://types-mediawiki-response.pages.dev/zh/llms-full.txt.

# Interface: ApiVisualEditorResponse

Defined in: [extensions/visualeditor.ts:175](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/extensions/visualeditor.ts#L175)

Response of `action=visualeditor` for `paction=parse`, `wikitext` and
`metadata`, which share one payload. The other `paction` values return
different shapes — see [ApiVisualEditorTemplatesUsedResponse](https://types-mediawiki-response.pages.dev/zh/api/extensions/visualeditor/ApiVisualEditorTemplatesUsedResponse.md) and
[ApiVisualEditorParseFragmentResponse](https://types-mediawiki-response.pages.dev/zh/api/extensions/visualeditor/ApiVisualEditorParseFragmentResponse.md).

## Extends

- [`ApiEnvelope`](https://types-mediawiki-response.pages.dev/zh/api/core/ApiEnvelope.md)

## Properties

### batchcomplete?

> `optional` **batchcomplete?**: `true`

Defined in: [envelope/index.ts:178](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/envelope/index.ts#L178)

Present and `true` when all data for the current batch of pages has been
returned. Continuation may still be ongoing: the generator runs again for
the next batch of pages, and list/meta modules may continue independently.
Serialized as a real boolean under `formatversion=2`.

#### Inherited from

[`ApiEnvelope`](https://types-mediawiki-response.pages.dev/zh/api/core/ApiEnvelope.md).[`batchcomplete`](https://types-mediawiki-response.pages.dev/zh/api/core/ApiEnvelope.md#batchcomplete)

***

### curtimestamp?

> `optional` **curtimestamp?**: `string`

Defined in: [envelope/index.ts:187](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/envelope/index.ts#L187)

Current server time (ISO 8601), present when the request set `curtimestamp`.

#### Inherited from

[`ApiEnvelope`](https://types-mediawiki-response.pages.dev/zh/api/core/ApiEnvelope.md).[`curtimestamp`](https://types-mediawiki-response.pages.dev/zh/api/core/ApiEnvelope.md#curtimestamp)

***

### errorlang?

> `optional` **errorlang?**: `string`

Defined in: [envelope/index.ts:199](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/envelope/index.ts#L199)

Language error messages are rendered in (`responselanginfo=1`).

#### Inherited from

[`ApiEnvelope`](https://types-mediawiki-response.pages.dev/zh/api/core/ApiEnvelope.md).[`errorlang`](https://types-mediawiki-response.pages.dev/zh/api/core/ApiEnvelope.md#errorlang)

***

### requestid?

> `optional` **requestid?**: `string`

Defined in: [envelope/index.ts:190](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/envelope/index.ts#L190)

Opaque value echoed back from the request's `requestid` parameter.

#### Inherited from

[`ApiEnvelope`](https://types-mediawiki-response.pages.dev/zh/api/core/ApiEnvelope.md).[`requestid`](https://types-mediawiki-response.pages.dev/zh/api/core/ApiEnvelope.md#requestid)

***

### servedby?

> `optional` **servedby?**: `string`

Defined in: [envelope/index.ts:184](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/envelope/index.ts#L184)

Identifier of the server that handled the request. Present by default on
error responses; on successful responses only when explicitly requested.

#### Inherited from

[`ApiEnvelope`](https://types-mediawiki-response.pages.dev/zh/api/core/ApiEnvelope.md).[`servedby`](https://types-mediawiki-response.pages.dev/zh/api/core/ApiEnvelope.md#servedby)

***

### uselang?

> `optional` **uselang?**: `string`

Defined in: [envelope/index.ts:196](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/envelope/index.ts#L196)

Language of the interface strings in the response (`responselanginfo=1`).

#### Inherited from

[`ApiEnvelope`](https://types-mediawiki-response.pages.dev/zh/api/core/ApiEnvelope.md).[`uselang`](https://types-mediawiki-response.pages.dev/zh/api/core/ApiEnvelope.md#uselang)

***

### visualeditor

> **visualeditor**: [`ApiVisualEditorPageFrame`](https://types-mediawiki-response.pages.dev/zh/api/extensions/visualeditor/ApiVisualEditorPageFrame.md) & `object`

Defined in: [extensions/visualeditor.ts:177](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/extensions/visualeditor.ts#L177)

Result of `action=visualeditor` for the `paction` values sharing this payload.

#### Type Declaration

##### basetimestamp

> **basetimestamp**: `string`

Base timestamp for edit-conflict detection.

##### blockinfo

> **blockinfo**: [`ApiBlockInfo`](https://types-mediawiki-response.pages.dev/zh/api/core/ApiBlockInfo.md) | `null`

Block state of the requesting user; `null` when not blocked.

##### canEdit

> **canEdit**: `boolean`

Whether the user may edit this page at all.

##### checkboxesDef

> **checkboxesDef**: `unknown`\[] | `Record`\<`string`, [`ApiVisualEditorCheckboxDef`](https://types-mediawiki-response.pages.dev/zh/api/extensions/visualeditor/ApiVisualEditorCheckboxDef.md)>

Definitions of the save-form fields, keyed by element id. An empty PHP
map, so `[]` when no field applies to the requesting user.

##### checkboxesMessages

> **checkboxesMessages**: `unknown`\[] | `Record`\<`string`, `string`>

Plain text of the messages referenced by `checkboxesDef`. An empty PHP
map, so `[]` when there are no messages.

##### copyrightWarning

> **copyrightWarning**: `string`

Copyright warning HTML; `""` when none applies.

##### etag?

> `optional` **etag?**: `string`

Restbase/Parsoid ETag for conditional requests.

##### notices

> **notices**: `unknown`\[] | `Record`\<`string`, `string`>

Notices the editor should show above the form, keyed by message name
(e.g. `newarticletext` for a page that does not exist yet). An empty PHP
map, so `[]` when there is nothing to show.

##### oldid

> **oldid**: `number`

Revision id the content was taken from.

##### protectedClasses

> **protectedClasses**: `string`

CSS classes for protection state, joined into one string (`""` when none).

##### starttimestamp

> **starttimestamp**: `string`

Server timestamp when the request started.

##### wouldautocreate?

> `optional` **wouldautocreate?**: `boolean`

Whether an auto-created temporary account would be used for the edit.

###### Since

MediaWiki 1.41

***

### warnings?

> `optional` **warnings?**: [`ApiWarnings`](https://types-mediawiki-response.pages.dev/zh/api/core/ApiWarnings.md)

Defined in: [envelope/index.ts:193](https://github.com/BearBin1215/types-mediawiki-response/blob/c1e25ea2ef2684b43c79e05d6e0dd36e33fbc9a3/src/envelope/index.ts#L193)

Non-fatal warnings; shape depends on `errorformat` (see [ApiWarnings](https://types-mediawiki-response.pages.dev/zh/api/core/ApiWarnings.md)).

#### Inherited from

[`ApiEnvelope`](https://types-mediawiki-response.pages.dev/zh/api/core/ApiEnvelope.md).[`warnings`](https://types-mediawiki-response.pages.dev/zh/api/core/ApiEnvelope.md#warnings)
