# com.suibari.nagi.putPreferences

> Published by [suibari.com](https://lexicon.garden/identity/did:plc:uixgxpiqf4i63p6rgpu7ytmx)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:uixgxpiqf4i63p6rgpu7ytmx/com.suibari.nagi.putPreferences)
- [Documentation](https://lexicon.garden/lexicon/did:plc:uixgxpiqf4i63p6rgpu7ytmx/com.suibari.nagi.putPreferences/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:uixgxpiqf4i63p6rgpu7ytmx/com.suibari.nagi.putPreferences/examples)

## Definitions

### `com.suibari.nagi.putPreferences`

**Type**: `procedure`

同期対象の設定を書き込む。既読位置は (indexedAt, uri) が進むときだけ更新する単調マージ、お気に入りは updatedAt による後勝ち。どちらも省略でき、送った分だけが更新される。

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `feedTabs` | `array` | No |  |
| `replyFreq` | `integer` | No | botたんからの返信確率（0〜100%）。送らなければ変更しない。 |
| `preferredName` | `string` | No | botたんに呼んでほしい名前。空文字を送ると登録を解除し、表示名に戻す。送らなければ変更しない。 |
| `readPositions` | `array` | No |  |
| `emojiFavorites` | `array` | No |  |
| `feedTabsUpdatedAt` | `string` (datetime) | No | feedTabs を送るときは必須。保存済みより古ければ書き込まない。 |
| `emojiFavoritesUpdatedAt` | `string` (datetime) | No | emojiFavorites を送るときは必須。保存済みより古ければ書き込まない。 |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `feedTabs` | `array` | No |  |
| `replyFreq` | `integer` | No | botたんからの返信確率（0〜100%）。 |
| `preferredName` | `string` | No | botたんに呼んでほしい名前。省略時は未設定＝表示名で呼ばれる。 |
| `readPositions` | `array` | Yes | マージ後の確定値。送った位置が負けた場合は保存済みの方が返る。 |
| `emojiFavorites` | `array` | Yes |  |
| `feedTabsUpdatedAt` | `string` (datetime) | No |  |
| `emojiFavoritesUpdatedAt` | `string` (datetime) | No |  |

#### Errors

- **AuthRequired**
- **InvalidRequest**

## Raw Schema

```json
{
  "id": "com.suibari.nagi.putPreferences",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "properties": {
            "feedTabs": {
              "type": "array",
              "items": {
                "ref": "com.suibari.nagi.getPreferences#feedTab",
                "type": "ref"
              },
              "maxLength": 16
            },
            "replyFreq": {
              "type": "integer",
              "maximum": 100,
              "minimum": 0,
              "description": "botたんからの返信確率（0〜100%）。送らなければ変更しない。"
            },
            "preferredName": {
              "type": "string",
              "maxLength": 120,
              "description": "botたんに呼んでほしい名前。空文字を送ると登録を解除し、表示名に戻す。送らなければ変更しない。",
              "maxGraphemes": 40
            },
            "readPositions": {
              "type": "array",
              "items": {
                "ref": "com.suibari.nagi.getPreferences#readPosition",
                "type": "ref"
              },
              "maxLength": 16
            },
            "emojiFavorites": {
              "type": "array",
              "items": {
                "type": "unknown"
              },
              "maxLength": 32
            },
            "feedTabsUpdatedAt": {
              "type": "string",
              "format": "datetime",
              "description": "feedTabs を送るときは必須。保存済みより古ければ書き込まない。"
            },
            "emojiFavoritesUpdatedAt": {
              "type": "string",
              "format": "datetime",
              "description": "emojiFavorites を送るときは必須。保存済みより古ければ書き込まない。"
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "AuthRequired"
        },
        {
          "name": "InvalidRequest"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "readPositions",
            "emojiFavorites"
          ],
          "properties": {
            "feedTabs": {
              "type": "array",
              "items": {
                "ref": "com.suibari.nagi.getPreferences#feedTab",
                "type": "ref"
              },
              "maxLength": 16
            },
            "replyFreq": {
              "type": "integer",
              "maximum": 100,
              "minimum": 0,
              "description": "botたんからの返信確率（0〜100%）。"
            },
            "preferredName": {
              "type": "string",
              "maxLength": 120,
              "description": "botたんに呼んでほしい名前。省略時は未設定＝表示名で呼ばれる。",
              "maxGraphemes": 40
            },
            "readPositions": {
              "type": "array",
              "items": {
                "ref": "com.suibari.nagi.getPreferences#readPosition",
                "type": "ref"
              },
              "description": "マージ後の確定値。送った位置が負けた場合は保存済みの方が返る。"
            },
            "emojiFavorites": {
              "type": "array",
              "items": {
                "type": "unknown"
              },
              "maxLength": 32
            },
            "feedTabsUpdatedAt": {
              "type": "string",
              "format": "datetime"
            },
            "emojiFavoritesUpdatedAt": {
              "type": "string",
              "format": "datetime"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "同期対象の設定を書き込む。既読位置は (indexedAt, uri) が進むときだけ更新する単調マージ、お気に入りは updatedAt による後勝ち。どちらも省略でき、送った分だけが更新される。"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
