> ## Documentation Index
> Fetch the complete documentation index at: https://baileys.wiki/llms.txt
> Use this file to discover all available pages before exploring further.

# ContactAction

> Protobuf class ContactAction generated from WAProto.

Defined in: [WAProto/index.d.ts:11821](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L11821)

## Implements

* [`IContactAction`](/proto-reference/SyncActionValue/interfaces/IContactAction)

## Constructors

### new ContactAction()

> **new ContactAction**(`p`?): [`ContactAction`](/proto-reference/SyncActionValue/classes/ContactAction)

Defined in: [WAProto/index.d.ts:11822](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L11822)

#### Parameters

##### p?

[`IContactAction`](/proto-reference/SyncActionValue/interfaces/IContactAction)

#### Returns

[`ContactAction`](/proto-reference/SyncActionValue/classes/ContactAction)

## Properties

### firstName?

> `optional` **firstName**: `null` | `string`

Defined in: [WAProto/index.d.ts:11824](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L11824)

#### Implementation of

[`IContactAction`](/proto-reference/SyncActionValue/interfaces/IContactAction).[`firstName`](/proto-reference/SyncActionValue/interfaces/IContactAction#firstname)

***

### fullName?

> `optional` **fullName**: `null` | `string`

Defined in: [WAProto/index.d.ts:11823](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L11823)

#### Implementation of

[`IContactAction`](/proto-reference/SyncActionValue/interfaces/IContactAction).[`fullName`](/proto-reference/SyncActionValue/interfaces/IContactAction#fullname)

***

### lidJid?

> `optional` **lidJid**: `null` | `string`

Defined in: [WAProto/index.d.ts:11825](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L11825)

#### Implementation of

[`IContactAction`](/proto-reference/SyncActionValue/interfaces/IContactAction).[`lidJid`](/proto-reference/SyncActionValue/interfaces/IContactAction#lidjid)

***

### pnJid?

> `optional` **pnJid**: `null` | `string`

Defined in: [WAProto/index.d.ts:11827](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L11827)

#### Implementation of

[`IContactAction`](/proto-reference/SyncActionValue/interfaces/IContactAction).[`pnJid`](/proto-reference/SyncActionValue/interfaces/IContactAction#pnjid)

***

### saveOnPrimaryAddressbook?

> `optional` **saveOnPrimaryAddressbook**: `null` | `boolean`

Defined in: [WAProto/index.d.ts:11826](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L11826)

#### Implementation of

[`IContactAction`](/proto-reference/SyncActionValue/interfaces/IContactAction).[`saveOnPrimaryAddressbook`](/proto-reference/SyncActionValue/interfaces/IContactAction#saveonprimaryaddressbook)

***

### username?

> `optional` **username**: `null` | `string`

Defined in: [WAProto/index.d.ts:11828](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L11828)

#### Implementation of

[`IContactAction`](/proto-reference/SyncActionValue/interfaces/IContactAction).[`username`](/proto-reference/SyncActionValue/interfaces/IContactAction#username)

## Methods

### create()

> `static` **create**(`properties`?): [`ContactAction`](/proto-reference/SyncActionValue/classes/ContactAction)

Defined in: [WAProto/index.d.ts:11829](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L11829)

#### Parameters

##### properties?

[`IContactAction`](/proto-reference/SyncActionValue/interfaces/IContactAction)

#### Returns

[`ContactAction`](/proto-reference/SyncActionValue/classes/ContactAction)

***

### decode()

> `static` **decode**(`r`, `l`?): [`ContactAction`](/proto-reference/SyncActionValue/classes/ContactAction)

Defined in: [WAProto/index.d.ts:11831](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L11831)

#### Parameters

##### r

`Uint8Array`\<`ArrayBufferLike`> | `Reader`

##### l?

`number`

#### Returns

[`ContactAction`](/proto-reference/SyncActionValue/classes/ContactAction)

***

### encode()

> `static` **encode**(`m`, `w`?): `Writer`

Defined in: [WAProto/index.d.ts:11830](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L11830)

#### Parameters

##### m

[`IContactAction`](/proto-reference/SyncActionValue/interfaces/IContactAction)

##### w?

`Writer`

#### Returns

`Writer`

***

### fromObject()

> `static` **fromObject**(`d`): [`ContactAction`](/proto-reference/SyncActionValue/classes/ContactAction)

Defined in: [WAProto/index.d.ts:11832](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L11832)

#### Parameters

##### d

#### Returns

[`ContactAction`](/proto-reference/SyncActionValue/classes/ContactAction)

***

### getTypeUrl()

> `static` **getTypeUrl**(`typeUrlPrefix`?): `string`

Defined in: [WAProto/index.d.ts:11835](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L11835)

#### Parameters

##### typeUrlPrefix?

`string`

#### Returns

`string`

***

### toJSON()

> **toJSON**(): `object`

Defined in: [WAProto/index.d.ts:11834](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L11834)

#### Returns

`object`

***

### toObject()

> `static` **toObject**(`m`, `o`?): `object`

Defined in: [WAProto/index.d.ts:11833](https://github.com/WhiskeySockets/Baileys/blob/master/WAProto/index.d.ts#L11833)

#### Parameters

##### m

[`ContactAction`](/proto-reference/SyncActionValue/classes/ContactAction)

##### o?

`IConversionOptions`

#### Returns

`object`
