openapi: 3.0.2
info:
  title: Federated-SNS(FeS) API
  version: '1.0'
servers:
  - url: https://federated-sns-server01.research.global.fujitsu.com/xrpc
  - url: https://federated-sns-server02.research.global.fujitsu.com/xrpc
paths:
  /com.atproto.server.createSession:
    post:
      tags:
        - com.atproto.server
      summary: 認証セッションを作成。
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - identifier
                - password
              properties:
                identifier:
                  type: string
                  description: 認証ユーザーのサーバーでサポートされているhandleまたはその他の識別子。
                password:
                  type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                required:
                  - accessJwt
                  - refreshJwt
                  - handle
                  - did
                properties:
                  accessJwt:
                    type: string
                  refreshJwt:
                    type: string
                  handle:
                    type: string
                    format: handle
                  did:
                    type: string
                    format: did
                  email:
                    type: string
        '400':
          description: Invalid input
      security:
      - Bearer: []
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
  /com.atproto.server.deleteSession:
    post:
      tags:
        - com.atproto.server
      summary: 現在のセッションを削除。
      responses:
        '200':
          description: Session successfully deleted
      security:
      - Bearer: []
      - ApiKeyAuth: []
  /com.atproto.server.describeServer:
    get:
      tags:
        - com.atproto.server
      summary: サーバの説明ドキュメントを取得する
      responses:
        '200':
          description: サーバの説明ドキュメントを取得する
          content:
            application/json:
              schema:
                type: object
                required:
                  - availableUserDomains
                properties:
                  inviteCodeRequired:
                    type: boolean
                  availableUserDomains:
                    type: array
                    items:
                      type: string
                  links:
                    $ref: '#/components/schemas/Links'
      security:
      - Bearer: []
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
  /com.atproto.server.getSession:
    get:
      tags:
        - com.atproto.server
      summary: 現在のセッションに関する情報を取得。
      responses:
        '200':
          description: 現在のセッションに関する情報
          content:
            application/json:
              schema:
                type: object
                required:
                  - handle
                  - did
                properties:
                  handle:
                    type: string
                    format: handle
                  did:
                    type: string
                    format: did
                  email:
                    type: string
      security:
      - Bearer: []
      - ApiKeyAuth: []
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
  /com.atproto.server.refreshSession:
    post:
      tags:
        - com.atproto.server
      summary: セッションを更新。
      responses:
        '200':
          description: 更新されたセッション情報
          content:
            application/json:
              schema:
                type: object
                required:
                  - accessJwt
                  - refreshJwt
                  - handle
                  - did
                properties:
                  accessJwt:
                    type: string
                  refreshJwt:
                    type: string
                  handle:
                    type: string
                    format: handle
                  did:
                    type: string
                    format: did
        '400':
          description: AccountTakedown
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      security:
      - Bearer: []
      - ApiKeyAuth: []
      parameters:
        - $ref: '#/components/parameters/AcceptHeader'
  /com.atproto.server.resetPassword:
    post:
      tags:
        - com.atproto.server
      summary: トークンを使用してユーザーアカウントのパスワードをリセット。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - token
                - password
              properties:
                token:
                  type: string
                password:
                  type: string
      responses:
        '200':
          description: パスワードリセット成功
        '400':
          description: InvalidToken
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: ExpiredToken
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - Bearer: []
      - ApiKeyAuth: []
      parameters:
        - $ref: '#/components/parameters/ContentTypeHeader'
  /com.atproto.identity.resolveHandle:
    get:
      tags:
        - com.atproto.identity
      summary: handleのDIDを解決。
      description: handleのDIDを解決。
      parameters:
        - in: query
          name: handle
          schema:
            type: string
            format: handle
          description: 解決するhandle。指定しない場合は、ホスト自身のhandleを解決します。
        - $ref: '#/components/parameters/AcceptHeader'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResolveHandleOutput'
      security:
      - Bearer: []
      - ApiKeyAuth: []
  /com.atproto.repo.uploadBlob:
    post:
      tags:
        - com.atproto.repo
      summary: リポジトリに追加する新しいBlobデータをアップロード。
      description: リポジトリに追加する新しいBlobデータをアップロード。
      requestBody:
        required: true
        content:
          '*/*': { }
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadBlobOutput'
      security:
      - Bearer: []
      - ApiKeyAuth: []
      parameters:
      - $ref: '#/components/parameters/AcceptHeader'
      - $ref: '#/components/parameters/ContentTypeHeader'
  /app.fujitsu.channel.listChannelInfo:
    get:
      tags:
        - app.fujitsu.channel
      summary: アクターが追加されているチャネルを取得。
      operationId: app.fujitsu.channel.listJoinedChannels
      responses:
        '200':
          description: チャネルの設定情報を取得する
          content:
            application/json:
              schema:
                type: object
                required:
                  - channelInfo
                properties:
                  channelInfo:
                    type: array
                    items:
                      $ref: '#/components/schemas/ChannelInfo'
      security:
      - Bearer: []
      - ApiKeyAuth: []
      parameters:
      - $ref: '#/components/parameters/AcceptHeader'
  /app.fujitsu.channel.listJoinedChannels:
    get:
      tags:
        - app.fujitsu.channel
      summary: アクターが追加されているチャネルを取得。
      operationId: app.fujitsu.channel.listJoinedChannels
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                required:
                  - channelDids
                properties:
                  channelDids:
                    type: array
                    items:
                      type: string
                      format: did
      security:
      - Bearer: []
      - ApiKeyAuth: []
      parameters:
      - $ref: '#/components/parameters/AcceptHeader'
  /app.fujitsu.channel.listRecords:
    get:
      tags:
        - app.fujitsu.channel
      summary: チャネルのレコードのリストを取得。
      operationId: app.fujitsu.channel.listRecords
      parameters:
        - name: channelRepo
          in: query
          required: true
          schema:
            type: string
            format: at-identifier
          description: チャネルのhandleまたはDID。
        - name: collection
          in: query
          required: true
          schema:
            type: string
            format: nsid
            default: app.bsky.feed.post
          description: レコードタイプの Namespaced Identifier (NSID)。ここでは "app.bsky.feed.post" を指定してください。NSID は ATProtocol においてスキーマやエンドポイントなどを参照するために使用される識別子です。詳しくは ATProtocol 公式リファレンスを参照してください。
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
          description: 返されるレコードの数。
        - name: cursor
          in: query
          schema:
            type: string
        - name: reverse
          in: query
          schema:
            type: boolean
          description: 返されるレコードの順序を逆にするか?
        - $ref: '#/components/parameters/AcceptHeader'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                required:
                  - records
                properties:
                  cursor:
                    type: string
                  records:
                    type: array
                    items:
                      $ref: '#/components/schemas/Record'
      security:
      - Bearer: []
      - ApiKeyAuth: []
  /app.fujitsu.channel.getChannelView:
    get:
      tags:
        - app.fujitsu.channel
      description: ChannelのタイムラインView。
      parameters:
        - name: channelDid
          in: query
          required: true
          schema:
            type: string
            format: did
        - name: algorithm
          in: query
          schema:
            type: string
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: cursor
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/AcceptHeader'
      responses:
        '200':
          description: 指定したチャネルのタイムライン
          content:
            application/json:
              schema:
                type: object
                required:
                  - channelDid
                  - feed
                properties:
                  cursor:
                    type: string
                  channelDid:
                    type: string
                  feed:
                    type: array
                    items:
                      $ref: '#/components/schemas/FeedViewPost'
      security:
      - Bearer: []
      - ApiKeyAuth: []
  /app.fujitsu.channel.createRecord:
    post:
      tags:
        - app.fujitsu.channel
      summary: 新しいレコードをチャネルに作成。
      description: 新しいレコードを作成。
      operationId: app.fujitsu.channel.createRecord
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - channelRepo
                - collection
                - record
              properties:
                channelRepo:
                  type: string
                  format: at-identifier
                  description: The handle or DID of the channel.
                collection:
                  type: string
                  format: nsid
                  default: app.bsky.feed.post
                  description: レコードタイプの Namespaced Identifier (NSID)。ここでは "app.bsky.feed.post" を指定してください。NSID は ATProtocol においてスキーマやエンドポイントなどを参照するために使用される識別子です。詳しくは ATProtocol 公式リファレンスを参照してください。
                rkey:
                  type: string
                  description: レコードキー
                validate:
                  type: boolean
                  default: true
                  description: レコードを検証するか?
                record:
                  type: object
                  description: 作成するレコード。
                swapCommit:
                  type: string
                  format: cid
                  description: cidによる前のコミットと比較およびスワップします。
      responses:
        '200':
          description: Record created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateRecordOutput'
        '400':
          description: InvalidSwap
          content: { }
      security:
      - Bearer: []
      - ApiKeyAuth: []
      parameters:
      - $ref: '#/components/parameters/AcceptHeader'
components:
  schemas:
    ProfileViewBasic:
      type: object
      required:
        - did
        - handle
      properties:
        did:
          type: string
          format: did
        handle:
          type: string
          format: handle
        displayName:
          type: string
          maxLength: 640
        avatar:
          type: string
        viewer:
          $ref: '#/components/schemas/ViewerState'
        labels:
          type: array
          items:
            $ref: '#/components/schemas/Label'
    ProfileView:
      type: object
      required:
        - did
        - handle
      properties:
        did:
          type: string
          format: did
        handle:
          type: string
          format: handle
        displayName:
          type: string
          maxLength: 640
        description:
          type: string
          maxLength: 2560
        avatar:
          type: string
        indexedAt:
          type: string
          format: date-time
        viewer:
          $ref: '#/components/schemas/ViewerState'
        labels:
          type: array
          items:
            $ref: '#/components/schemas/Label'
    GeneratorView:
      type: object
      required:
        - uri
        - cid
        - did
        - creator
        - displayName
        - indexedAt
      properties:
        uri:
          type: string
          format: at-uri
        cid:
          type: string
          format: cid
        did:
          type: string
          format: did
        creator:
          $ref: '#/components/schemas/ProfileView'
        displayName:
          type: string
          maxLength: 640
        description:
          type: string
          description: Max graphemes 300, maxLength 3000
        descriptionFacets:
          type: array
          items:
            $ref: '#/components/schemas/RichTextFacet'
        avatar:
          type: string
        likeCount:
          type: integer
        viewer:
          $ref: '#/components/schemas/ViewerState'
        indexedAt:
          type: string
          format: date-time
    ProfileViewDetailed:
      type: object
      required:
        - did
        - handle
      properties:
        did:
          type: string
          format: did
        handle:
          type: string
          format: handle
        displayName:
          type: string
          maxLength: 640
        description:
          type: string
          maxLength: 2560
        avatar:
          type: string
        banner:
          type: string
        followersCount:
          type: integer
        followsCount:
          type: integer
        postsCount:
          type: integer
        indexedAt:
          type: string
          format: date-time
        viewer:
          $ref: '#/components/schemas/ViewerState'
        labels:
          type: array
          items:
            $ref: '#/components/schemas/Label'
    ViewerState:
      type: object
      properties:
        muted:
          type: boolean
        mutedByList:
          $ref: '#/components/schemas/ListViewBasic'
        blockedBy:
          type: boolean
        blocking:
          type: string
          format: at-uri
        following:
          type: string
          format: at-uri
        followedBy:
          type: string
          format: at-uri
    Preferences:
      type: array
      items:
        oneOf:
          - $ref: '#/components/schemas/AdultContentPref'
          - $ref: '#/components/schemas/ContentLabelPref'
    AdultContentPref:
      type: object
      required:
        - enabled
      properties:
        enabled:
          type: boolean
          default: false
    ContentLabelPref:
      type: object
      required:
        - label
        - visibility
      properties:
        label:
          type: string
        visibility:
          type: string
          enum: ['show', 'warn', 'hide']
    Label:
      type: object
      description: Metadata tag on an atproto resource (eg, repo or record)
      required:
        - src
        - uri
        - val
        - cts
      properties:
        src:
          type: string
          format: did
          description: DID of the actor who created this label
        uri:
          type: string
          format: uri
          description: AT URI of the record, repository (account), or other resource which this label applies to
        cid:
          type: string
          format: cid
          description: optionally, CID specifying the specific version of 'uri' resource this label applies to
        val:
          type: string
          maxLength: 128
          description: the short string name of the value or type of this label
        neg:
          type: boolean
          description: if true, this is a negation label, overwriting a previous label
        cts:
          type: string
          format: datetime
          description: timestamp when this label was created
    ListViewBasic:
      type: object
    ExternalEmbed:
      type: object
      required:
        - external
      properties:
        external:
          $ref: '#/components/schemas/External'
    External:
      type: object
      required:
        - uri
        - title
        - description
      properties:
        uri:
          type: string
          format: uri
        title:
          type: string
        description:
          type: string
        thumb:
          type: string
          format: binary
          maxLength: 1000000
    ExternalEmbedView:
      type: object
      required:
        - external
      properties:
        external:
          $ref: '#/components/schemas/ExternalView'
    ExternalView:
      type: object
      required:
        - uri
        - title
        - description
      properties:
        uri:
          type: string
          format: uri
        title:
          type: string
        description:
          type: string
        thumb:
          type: string
    ImagesEmbed:
      type: object
      required:
        - images
      properties:
        images:
          type: array
          items:
            $ref: '#/components/schemas/Image'
          maxItems: 4
    Image:
      type: object
      required:
        - image
        - alt
      properties:
        image:
          type: string
          format: binary
          maxLength: 1000000
        alt:
          type: string
    ImagesEmbedView:
      type: object
      required:
        - images
      properties:
        images:
          type: array
          items:
            $ref: '#/components/schemas/ImageView'
          maxItems: 4
    ImageView:
      type: object
      required:
        - thumb
        - fullsize
        - alt
      properties:
        thumb:
          type: string
        fullsize:
          type: string
        alt:
          type: string
    RecordEmbed:
      type: object
      required:
        - record
      properties:
        record:
          $ref: '#/components/schemas/StrongRef'
    RecordEmbedView:
      type: object
      required:
        - record
      properties:
        record:
          oneOf:
            - $ref: '#/components/schemas/ViewRecord'
            - $ref: '#/components/schemas/ViewNotFound'
            - $ref: '#/components/schemas/ViewBlocked'
    ViewRecord:
      type: object
      required:
        - uri
        - cid
        - author
        - value
        - indexedAt
      properties:
        uri:
          type: string
          format: at-uri
        cid:
          type: string
          format: cid
        author:
          $ref: '#/components/schemas/ProfileViewBasic'
        value:
          type: string
        labels:
          type: array
          items:
            $ref: '#/components/schemas/Label'
        embeds:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/ImagesEmbedView'
              - $ref: '#/components/schemas/ExternalEmbedView'
              - $ref: '#/components/schemas/RecordEmbedView'
              - $ref: '#/components/schemas/RecordWithMediaEmbedView'
        indexedAt:
          type: string
          format: date-time
    ViewNotFound:
      type: object
      required:
        - uri
      properties:
        uri:
          type: string
          format: at-uri
    ViewBlocked:
      type: object
      required:
        - uri
      properties:
        uri:
          type: string
          format: at-uri
    RecordWithMediaEmbed:
      type: object
      required:
        - record
        - media
      properties:
        record:
          $ref: '#/components/schemas/RecordEmbed'
        media:
          oneOf:
            - $ref: '#/components/schemas/ImagesEmbed'
            - $ref: '#/components/schemas/ExternalEmbed'
    RecordWithMediaEmbedView:
      type: object
      required:
        - record
        - media
      properties:
        record:
          $ref: '#/components/schemas/RecordEmbedView'
        media:
          oneOf:
            - $ref: '#/components/schemas/ImagesEmbedView'
            - $ref: '#/components/schemas/ExternalEmbedView'
    PostView:
      type: object
      required:
        - uri
        - cid
        - author
        - record
        - indexedAt
      properties:
        uri:
          type: string
          format: at-uri
        cid:
          type: string
          format: cid
        author:
          $ref: '#/components/schemas/ProfileViewBasic'
        record:
          type: object
        replyCount:
          type: integer
        repostCount:
          type: integer
        likeCount:
          type: integer
        indexedAt:
          type: string
          format: datetime
        viewer:
          $ref: '#/components/schemas/ViewerState'
        labels:
          type: array
          items:
            $ref: '#/components/schemas/Label'
    BlockedActor:
      type: object
    BlockedByActor:
      type: object
    Like:
      type: object
      required:
        - indexedAt
        - createdAt
        - actor
      properties:
        indexedAt:
          type: string
          format: datetime
        createdAt:
          type: string
          format: datetime
        actor:
          $ref: '#/components/schemas/ProfileView'
    FeedLike:
      type: object
      required:
        - subject
        - createdAt
      properties:
        subject:
          $ref: '#/components/schemas/StrongRef'
        createdAt:
          type: string
          format: datetime
    Stamp:
      type: object
      required:
        - indexedAt
        - createdAt
        - actor
      properties:
        indexedAt:
          type: string
          format: datetime
        createdAt:
          type: string
          format: datetime
        actor:
          $ref: '#/components/schemas/ProfileView'
    Post:
      type: object
      required:
        - text
        - createdAt
      properties:
        text:
          type: string
          maxLength: 3000
          description: 'text'
        entities:
          type: array
          description: deprecated - replaced by app.bsky.richtext.facet.
          items:
            $ref: '#/components/schemas/Entity'
        facets:
          type: array
          items:
            $ref: '#/components/schemas/Facet'
        reply:
          $ref: '#/components/schemas/ReplyRef'
        embed:
          $ref: '#/components/schemas/Embed'
        createdAt:
          type: string
          format: datetime
    Embed:
      oneOf:
        - $ref: '#/components/schemas/ImagesEmbedView'
        - $ref: '#/components/schemas/ExternalEmbedView'
        - $ref: '#/components/schemas/RecordEmbedView'
        - $ref: '#/components/schemas/RecordWithMediaEmbedView'
    ReplyRef:
      type: object
      required:
        - root
        - parent
      properties:
        root:
          $ref: '#/components/schemas/StrongRef'
        parent:
          $ref: '#/components/schemas/StrongRef'
    Entity:
      type: object
      description: Deprecated - use facets instead.
      required:
        - index
        - type
        - value
      properties:
        index:
          $ref: '#/components/schemas/TextSlice'
        type:
          type: string
          description: Expected values are 'mention' and 'link'.
        value:
          type: string
    TextSlice:
      type: object
      description: Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings.
      required:
        - start
        - end
      properties:
        start:
          type: integer
          minimum: 0
        end:
          type: integer
          minimum: 0
    Repost:
      type: object
      required:
        - subject
        - createdAt
      properties:
        subject:
          $ref: '#/components/schemas/StrongRef'
        createdAt:
          type: string
          format: datetime
    Block:
      type: object
      required:
        - subject
        - createdAt
      properties:
        subject:
          type: string
          format: did
        createdAt:
          type: string
          format: datetime
    Follow:
      type: object
      required:
        - subject
        - createdAt
      properties:
        subject:
          type: string
          format: did
        createdAt:
          type: string
          format: datetime
    ListRecord:
      type: object
      required:
        - name
        - purpose
        - createdAt
      properties:
        purpose:
          $ref: '#/components/schemas/ListPurpose'
        name:
          type: string
          maxLength: 64
          minLength: 1
        description:
          type: string
          maxLength: 3000
        descriptionFacets:
          type: array
          items:
            $ref: '#/components/schemas/RichTextFacet'
        avatar:
          type: string
          format: binary
          description: "A binary file with a maximum size of 1,000,000 bytes. Accepts image/png or image/jpeg file types."
        createdAt:
          type: string
          format: date-time
    ListItemRecord:
      type: object
      required:
        - subject
        - list
        - createdAt
      properties:
        subject:
          type: string
          description: "Decentralized identifier (DID)"
          format: uri
        list:
          type: string
          description: "Unique identifier of the list"
          format: uri
        createdAt:
          type: string
          description: "Creation date of the list item"
          format: date-time
    Notification:
      type: object
      required:
        - uri
        - cid
        - author
        - reason
        - record
        - isRead
        - indexedAt
      properties:
        uri:
          type: string
          format: uri
        cid:
          type: string
        author:
          $ref: '#/components/schemas/ProfileView'
        reason:
          type: string
          enum: [ "like", "repost", "follow", "mention", "reply", "quote" ]
        reasonSubject:
          type: string
          format: uri
        record:
          type: object
        isRead:
          type: boolean
        indexedAt:
          type: string
          format: date-time
        labels:
          type: array
          items:
            $ref: '#/components/schemas/Label'
    Facet:
      type: object
      required:
        - index
        - features
      properties:
        index:
          $ref: '#/components/schemas/ByteSlice'
        features:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/Mention'
              - $ref: '#/components/schemas/Link'
    Mention:
      type: object
      description: "A facet feature for actor mentions."
      required:
        - did
      properties:
        did:
          type: string
          format: did
    Link:
      type: object
      description: "A facet feature for links."
      required:
        - uri
      properties:
        uri:
          type: string
          format: uri
    ByteSlice:
      type: object
      description: "A text segment. Start is inclusive, end is exclusive. Indices are for utf8-encoded strings."
      required:
        - byteStart
        - byteEnd
      properties:
        byteStart:
          type: integer
          minimum: 0
        byteEnd:
          type: integer
          minimum: 0
    FeedViewPost:
      type: object
      required:
        - post
      properties:
        post:
          $ref: '#/components/schemas/PostView'
        reply:
          $ref: '#/components/schemas/ReplyRef'
        reason:
          oneOf:
            - $ref: '#/components/schemas/ReasonRepost'
    ReasonRepost:
      type: object
      required:
        - by
        - indexedAt
      properties:
        by:
          $ref: '#/components/schemas/ProfileViewBasic'
        indexedAt:
          type: string
          format: datetime
    ThreadViewPost:
      type: object
      required:
        - post
      properties:
        post:
          $ref: '#/components/schemas/PostView'
        parent:
          oneOf:
            - $ref: '#/components/schemas/ThreadViewPost'
            - $ref: '#/components/schemas/NotFoundPost'
            - $ref: '#/components/schemas/BlockedPost'
        replies:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/ThreadViewPost'
              - $ref: '#/components/schemas/NotFoundPost'
              - $ref: '#/components/schemas/BlockedPost'
    NotFoundPost:
      type: object
      required:
        - uri
        - notFound
      properties:
        uri:
          type: string
          format: at-uri
        notFound:
          type: boolean
          default: true
    BlockedPost:
      type: object
      required:
        - uri
        - blocked
      properties:
        uri:
          type: string
          format: at-uri
        blocked:
          type: boolean
          default: true
    ListView:
      type: object
      required:
        - uri
        - creator
        - name
        - purpose
        - indexedAt
      properties:
        uri:
          type: string
          format: at-uri
        creator:
          $ref: '#/components/schemas/ProfileView'
        name:
          type: string
          maxLength: 64
          minLength: 1
        purpose:
          $ref: '#/components/schemas/ListPurpose'
        description:
          type: string
          description: Max graphemes 300, maxLength 3000
        descriptionFacets:
          type: array
          items:
            $ref: '#/components/schemas/RichTextFacet'
        avatar:
          type: string
        viewer:
          $ref: '#/components/schemas/ListViewerState'
        indexedAt:
          type: string
          format: datetime
    ListItemView:
      type: object
      required:
        - subject
      properties:
        subject:
          $ref: '#/components/schemas/ProfileView'
    ListPurpose:
      type: string
      enum:
        - modlist
    Modlist:
      type: string
      description: A list of actors to apply an aggregate moderation action (mute/block) on
    ListViewerState:
      type: object
      properties:
        muted:
          type: boolean
    StrongRef:
      type: object
      description: A URI with a content-hash fingerprint.
      required:
        - uri
        - cid
      properties:
        uri:
          type: string
          format: at-uri
        cid:
          type: string
          format: cid
    RichTextFacet:
      type: object
      required:
        - index
        - features
      properties:
        index:
          $ref: '#/components/schemas/ByteSlice'
        features:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/Mention'
              - $ref: '#/components/schemas/Link'
    ActionType:
      type: string
      enum:
        - takedown
        - flag
        - acknowledge
        - escalate
      description: Type of moderation action
    ActionView:
      type: object
      required:
        - id
        - action
        - subject
        - subjectBlobCids
        - reason
        - createdBy
        - createdAt
        - resolvedReportIds
      properties:
        id:
          type: integer
        action:
          $ref: '#/components/schemas/ActionType'
        subject:
          oneOf:
            - $ref: '#/components/schemas/RepoRef'
            - $ref: '#/components/schemas/StrongRef'
        subjectBlobCids:
          type: array
          items:
            type: string
        createLabelVals:
          type: array
          items:
            type: string
        negateLabelVals:
          type: array
          items:
            type: string
        reason:
          type: string
        createdBy:
          type: string
          format: did
        createdAt:
          type: string
          format: datetime
        reversal:
          $ref: '#/components/schemas/ActionReversal'
        resolvedReportIds:
          type: array
          items:
            type: integer
    ActionViewDetail:
      type: object
      required:
        - id
        - action
        - subject
        - subjectBlobs
        - reason
        - createdBy
        - createdAt
        - resolvedReports
      properties:
        id:
          type: integer
        action:
          $ref: '#/components/schemas/ActionType'
        subject:
          oneOf:
            - $ref: '#/components/schemas/RepoView'
            - $ref: '#/components/schemas/RecordView'
        subjectBlobs:
          type: array
          items:
            $ref: '#/components/schemas/BlobView'
        createLabelVals:
          type: array
          items:
            type: string
        negateLabelVals:
          type: array
          items:
            type: string
        reason:
          type: string
        createdBy:
          type: string
          format: did
        createdAt:
          type: string
          format: datetime
        reversal:
          $ref: '#/components/schemas/ActionReversal'
        resolvedReports:
          type: array
          items:
            $ref: '#/components/schemas/ReportView'
    ActionViewCurrent:
      type: object
      required:
        - id
        - action
      properties:
        id:
          type: integer
        action:
          $ref: '#/components/schemas/ActionType'
    ActionReversal:
      type: object
      required:
        - id
        - action
        - subject
        - subjectBlobCids
        - createdBy
        - createdAt
      properties:
        id:
          type: integer
        action:
          $ref: '#/components/schemas/ActionType'
        subject:
          oneOf:
            - $ref: '#/components/schemas/RepoRef'
            - $ref: '#/components/schemas/StrongRef'
        subjectBlobCids:
          type: array
          items:
            type: string
        createdBy:
          type: string
          format: did
        createdAt:
          type: string
          format: datetime
    ReportType:
      type: string
      enum:
        - spam
        - harassment
        - harmfulDangerousActs
        - violentExtremistContent
        - childEndangerment
        - unwantedSexualContent
        - hatefulAbusiveContent
        - other
      description: Type of report
    ReportStatus:
      type: string
      enum:
        - open
        - inProgress
        - resolved
      description: Status of the report
    ReportView:
      type: object
      required:
        - id
        - reportType
        - status
        - subject
        - subjectBlobCids
        - reason
        - createdBy
        - createdAt
        - resolvedByActionId
      properties:
        id:
          type: integer
        reportType:
          $ref: '#/components/schemas/ReportType'
        status:
          $ref: '#/components/schemas/ReportStatus'
        subject:
          oneOf:
            - $ref: '#/components/schemas/RepoRef'
            - $ref: '#/components/schemas/StrongRef'
        subjectBlobCids:
          type: array
          items:
            type: string
        reason:
          type: string
        createdBy:
          type: string
          format: did
        createdAt:
          type: string
          format: datetime
        resolvedByActionId:
          type: integer
    ReportViewDetail:
      type: object
      required:
        - id
        - reportType
        - status
        - subject
        - subjectBlobs
        - reason
        - createdBy
        - createdAt
        - resolvedByAction
      properties:
        id:
          type: integer
        reportType:
          $ref: '#/components/schemas/ReportType'
        status:
          $ref: '#/components/schemas/ReportStatus'
        subject:
          oneOf:
            - $ref: '#/components/schemas/RepoView'
            - $ref: '#/components/schemas/RecordView'
        subjectBlobs:
          type: array
          items:
            $ref: '#/components/schemas/BlobView'
        reason:
          type: string
        createdBy:
          type: string
          format: did
        createdAt:
          type: string
          format: datetime
        resolvedByAction:
          $ref: '#/components/schemas/ActionViewDetail'
    RepoView:
      type: object
      required:
        - did
        - handle
        - relatedRecords
        - indexedAt
        - moderation
      properties:
        did:
          type: string
        handle:
          type: string
        email:
          type: string
        relatedRecords:
          type: array
          items:
            type: string
        indexedAt:
          type: string
          format: date-time
        moderation:
          $ref: '#/components/schemas/Moderation'
        invitedBy:
          $ref: '#/components/schemas/InviteCode'
        invitesDisabled:
          type: boolean
    RepoViewDetail:
      allOf:
        - $ref: '#/components/schemas/RepoView'
        - type: object
          required:
            - labels
            - invites
          properties:
            moderation:
              $ref: '#/components/schemas/ModerationDetail'
            labels:
              type: array
              items:
                $ref: '#/components/schemas/Label'
            invites:
              type: array
              items:
                $ref: '#/components/schemas/InviteCode'
    RepoRef:
      type: object
      required:
        - did
      properties:
        did:
          type: string
    RecordView:
      type: object
      required:
        - uri
        - cid
        - value
        - blobCids
        - indexedAt
        - moderation
        - repo
      properties:
        uri:
          type: string
        cid:
          type: string
        value:
          type: string
        blobCids:
          type: array
          items:
            type: string
        indexedAt:
          type: string
          format: date-time
        moderation:
          $ref: '#/components/schemas/Moderation'
        repo:
          $ref: '#/components/schemas/RepoView'
    RecordViewDetail:
      allOf:
        - $ref: '#/components/schemas/RecordView'
        - type: object
          required:
            - blobs
            - labels
          properties:
            blobs:
              type: array
              items:
                $ref: '#/components/schemas/BlobView'
            labels:
              type: array
              items:
                $ref: '#/components/schemas/Label'
            moderation:
              $ref: '#/components/schemas/ModerationDetail'
    Moderation:
      type: object
      properties:
        currentAction:
          $ref: '#/components/schemas/ActionViewCurrent'
    ModerationDetail:
      allOf:
        - $ref: '#/components/schemas/Moderation'
        - type: object
          required:
            - actions
            - reports
          properties:
            actions:
              type: array
              items:
                $ref: '#/components/schemas/ActionView'
            reports:
              type: array
              items:
                $ref: '#/components/schemas/ReportView'
    BlobView:
      type: object
      required:
        - cid
        - mimeType
        - size
        - createdAt
      properties:
        cid:
          type: string
        mimeType:
          type: string
        size:
          type: integer
        createdAt:
          type: string
          format: date-time
        details:
          oneOf:
            - $ref: '#/components/schemas/ImageDetails'
            - $ref: '#/components/schemas/VideoDetails'
        moderation:
          $ref: '#/components/schemas/Moderation'
    ImageDetails:
      type: object
      required:
        - width
        - height
      properties:
        width:
          type: integer
        height:
          type: integer
    VideoDetails:
      type: object
      required:
        - width
        - height
        - length
      properties:
        width:
          type: integer
        height:
          type: integer
        length:
          type: integer
    ResolveHandleOutput:
      type: object
      required:
        - did
      properties:
        did:
          type: string
          format: did
    UpdateHandleInput:
      type: object
      required:
        - handle
      properties:
        handle:
          type: string
          format: handle
    ReasonType:
      type: string
      enum:
        - '#/components/schemas/reasonSpam'
        - '#/components/schemas/reasonViolation'
        - '#/components/schemas/reasonMisleading'
        - '#/components/schemas/reasonSexual'
        - '#/components/schemas/reasonRude'
        - '#/components/schemas/reasonOther'
      description: Type of report reason
    ReasonSpam:
      type: string
      description:
        Spam - frequent unwanted promotion, replies, mentions
    ReasonViolation:
      type: string
      description: Direct violation of server rules, laws, terms of service
    ReasonMisleading:
      type: string
      description: Misleading identity, affiliation, or content
    ReasonSexual:
      type: string
      description: Unwanted or mis-labeled sexual content
    ReasonRude:
      type: string
      description: Rude, harassing, explicit, or otherwise unwelcoming behavior
    ReasonOther:
      type: string
      description:
        Other - reports not falling under another report category
    ApplyWritesInput:
      type: object
      required:
        - repo
        - writes
      properties:
        repo:
          type: string
          format: at-identifier
          description: The handle or DID of the repo.
        validate:
          type: boolean
          default: true
          description: Validate the records?
        writes:
          type: array
          items:
            $ref: '#/components/schemas/WriteAction'
        swapCommit:
          type: string
          format: cid
    WriteAction:
      type: object
      oneOf:
        - $ref: '#/components/schemas/Create'
        - $ref: '#/components/schemas/Update'
        - $ref: '#/components/schemas/Delete'
    Create:
      type: object
      required:
        - action
        - collection
        - value
      properties:
        action:
          type: string
          enum:
            - create
        collection:
          type: string
          format: nsid
        rkey:
          type: string
        value:
          type: string
    Update:
      type: object
      required:
        - action
        - collection
        - rkey
        - value
      properties:
        action:
          type: string
          enum:
            - update
        collection:
          type: string
          format: nsid
        rkey:
          type: string
        value:
          type: string
    Delete:
      type: object
      required:
        - action
        - collection
        - rkey
      properties:
        action:
          type: string
          enum:
            - delete
        collection:
          type: string
          format: nsid
        rkey:
          type: string
    InvalidSwapError:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          enum:
            - InvalidSwap
    Record:
      type: object
      required:
        - uri
        - cid
        - value
      properties:
        uri:
          type: string
          format: at-uri
        cid:
          type: string
          format: cid
        value:
          type: string
    RepoDescription:
      type: object
      required:
        - handle
        - did
        - didDoc
        - collections
        - handleIsCorrect
      properties:
        handle:
          type: string
          format: handle
        did:
          type: string
          format: did
        didDoc:
          type: string
        collections:
          type: array
          items:
            type: string
            format: nsid
        handleIsCorrect:
          type: boolean
    CreateRecordInput:
      type: object
      required:
        - repo
        - collection
        - record
      properties:
        repo:
          type: string
          format: at-identifier
          description: The handle or DID of the repo.
        collection:
          type: string
          format: nsid
          description: The Namespaced Identfier (NSID) of the record collection. NSIDs are used to reference schemas for records, endpoints, and more in ATProtocol. See the official documentation for more information.
        rkey:
          type: string
          description: The key of the record.
        validate:
          type: boolean
          default: true
          description: Validate the record?
        record:
          type: object
          description: The record to create.
        swapCommit:
          type: string
          format: cid
          description: Compare and swap with the previous commit by cid.
    CreateRecordOutput:
      type: object
      required:
        - uri
        - cid
      properties:
        uri:
          type: string
          format: at-uri
        cid:
          type: string
          format: cid
    DeleteRecordInput:
      type: object
      required:
        - repo
        - collection
        - rkey
      properties:
        repo:
          type: string
          format: at-identifier
          description: The handle or DID of the repo.
        collection:
          type: string
          format: nsid
          description: The Namespaced Identfier (NSID) of the record collection. NSIDs are used to reference schemas for records, endpoints, and more in ATProtocol. See the official documentation for more information.
        rkey:
          type: string
          description: The key of the record.
        swapRecord:
          type: string
          format: cid
          description: Compare and swap with the previous record by cid.
        swapCommit:
          type: string
          format: cid
          description: Compare and swap with the previous commit by cid.
    PutRecordInput:
      type: object
      required:
        - repo
        - collection
        - rkey
        - record
      properties:
        repo:
          type: string
          format: at-identifier
          description: The handle or DID of the repo.
        collection:
          type: string
          format: nsid
          description: The Namespaced Identfier (NSID) of the record collection. NSIDs are used to reference schemas for records, endpoints, and more in ATProtocol. See the official documentation for more information.
        rkey:
          type: string
          description: The key of the record.
        validate:
          type: boolean
          default: true
          description: Validate the record?
        record:
          type: string
          description: The record to write.
        swapRecord:
          type: string
          format: cid
          nullable: true
          description: Compare and swap with the previous record by cid.
        swapCommit:
          type: string
          format: cid
          description: Compare and swap with the previous commit by cid.
    PutRecordOutput:
      type: object
      required:
        - uri
        - cid
      properties:
        uri:
          type: string
          format: at-uri
        cid:
          type: string
          format: cid
    RebaseRepoInput:
      type: object
      required:
        - repo
      properties:
        repo:
          type: string
          format: at-identifier
          description: The handle or DID of the repo.
        swapCommit:
          type: string
          format: cid
          description: Compare and swap with the previous commit by cid.
    UploadBlobOutput:
      type: object
      required:
        - blob
      properties:
        blob:
          type: string
          format: byte
    AccountCodes:
      type: object
      required:
        - account
        - codes
      properties:
        account:
          type: string
        codes:
          type: array
          items:
            type: string
    ExpiredTokenError:
      type: object
      properties:
        name:
          type: string
          enum: [ 'ExpiredToken' ]
    InvalidTokenError:
      type: object
      properties:
        name:
          type: string
          enum: [ 'InvalidToken' ]
    Links:
      type: object
      properties:
        privacyPolicy:
          type: string
        termsOfService:
          type: string
    InviteCode:
      type: object
      required: [ "code", "available", "disabled", "forAccount", "createdBy", "createdAt", "uses" ]
      properties:
        code: { type: "string" }
        available: { type: "integer" }
        disabled: { type: "boolean" }
        forAccount: { type: "string" }
        createdBy: { type: "string" }
        createdAt: { type: "string", format: "datetime" }
        uses:
          type: "array"
          items:
            type: object
            required: [ "usedBy", "usedAt" ]
            properties:
              usedBy: { type: "string", format: "did" }
              usedAt: { type: "string", format: "datetime" }
    ChannelInfo:
      type: object
      required:
        - channelDid
        - channelHandle
        - publicType
        - createdAt
      properties:
        channelDid:
          type: string
          format: did
        channelHandle:
          type: string
          format: handle
        publicType:
          type: integer
        createdAt:
          type: string
          format: datetime
        description:
          type: string
        displayName:
          type: string
        metadata:
          type: string
    Error:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      description: An access token to authenticate an account in FRP. You can obtain tokens from FRP.
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-PDS-Authorization
      description: >-
        An access token to authenticate an account in FeS. You can get the token as "accessJwt" with com.atproto.server.createSession API. Enter the token with the `Bearer: ` prefix, e.g. "Bearer abcde12345".
  parameters:
    AcceptHeader:
      in: header
      name: Accept
      schema:
        type: string
        default: application/json
    ContentTypeHeader:
      in: header
      name: Content-Type
      schema:
        type: string
        default: application/json