{
  "api": {
    "name": "P2pConnectPlugin",
    "slug": "p2pconnectplugin",
    "docs": "The methods of the peer-to-peer interface are described below.",
    "tags": [],
    "methods": [
      {
        "name": "isAvailable",
        "signature": "() => Promise<{ available: boolean; }>",
        "parameters": [],
        "returns": "Promise<{ available: boolean; }>",
        "tags": [
          {
            "name": "returns",
            "text": "asdfasdf"
          },
          {
            "name": "since",
            "text": "1.0.0"
          }
        ],
        "docs": "Indicates whether the Peer to Peer function is available on the device.",
        "complexTypes": [],
        "slug": "isavailable"
      },
      {
        "name": "removeAllListeners",
        "signature": "() => Promise<void>",
        "parameters": [],
        "returns": "Promise<void>",
        "tags": [
          {
            "name": "since",
            "text": "1.0.0"
          }
        ],
        "docs": "Remove all native listeners for this plugin.",
        "complexTypes": [],
        "slug": "removealllisteners"
      },
      {
        "name": "addListener",
        "signature": "(eventName: 'acceptTransfer', listenerFunc: (request: AcceptTransferRequest) => void) => Promise<PluginListenerHandle>",
        "parameters": [
          {
            "name": "eventName",
            "docs": "",
            "type": "'acceptTransfer'"
          },
          {
            "name": "listenerFunc",
            "docs": "",
            "type": "(request: AcceptTransferRequest) => void"
          }
        ],
        "returns": "Promise<PluginListenerHandle>",
        "tags": [],
        "docs": "The notification is triggered on the recipient's side when a new transfer \nis received that needs to be confirmed.",
        "complexTypes": [
          "PluginListenerHandle",
          "AcceptTransferRequest"
        ],
        "slug": "addlisteneraccepttransfer-"
      },
      {
        "name": "addListener",
        "signature": "(eventName: 'transferComplete', listenerFunc: (result: TransferResult) => void) => Promise<PluginListenerHandle>",
        "parameters": [
          {
            "name": "eventName",
            "docs": "",
            "type": "'transferComplete'"
          },
          {
            "name": "listenerFunc",
            "docs": "",
            "type": "(result: TransferResult) => void"
          }
        ],
        "returns": "Promise<PluginListenerHandle>",
        "tags": [],
        "docs": "Notification is triggered on the recipient's side \nwhen a transfer is complete.",
        "complexTypes": [
          "PluginListenerHandle",
          "TransferResult"
        ],
        "slug": "addlistenertransfercomplete-"
      },
      {
        "name": "send",
        "signature": "(options: SendOptions) => Promise<{ success: boolean; error: SendError | null; }>",
        "parameters": [
          {
            "name": "options",
            "docs": "",
            "type": "SendOptions"
          }
        ],
        "returns": "Promise<{ success: boolean; error: SendError | null; }>",
        "tags": [],
        "docs": "Starts a transfer on the sender's side.",
        "complexTypes": [
          "SendError",
          "SendOptions"
        ],
        "slug": "send"
      },
      {
        "name": "startReceive",
        "signature": "(options: ReceiveOptions) => Promise<{ success: boolean; }>",
        "parameters": [
          {
            "name": "options",
            "docs": "",
            "type": "ReceiveOptions"
          }
        ],
        "returns": "Promise<{ success: boolean; }>",
        "tags": [],
        "docs": "Activates the reception of a transfer on the recipient's side.",
        "complexTypes": [
          "ReceiveOptions"
        ],
        "slug": "startreceive"
      },
      {
        "name": "stopReceive",
        "signature": "() => Promise<{ success: boolean; }>",
        "parameters": [],
        "returns": "Promise<{ success: boolean; }>",
        "tags": [],
        "docs": "Cancels the reception on the receiver's side.",
        "complexTypes": [],
        "slug": "stopreceive"
      },
      {
        "name": "acceptTransfer",
        "signature": "(options: AcceptTransferOptions) => Promise<void>",
        "parameters": [
          {
            "name": "options",
            "docs": "",
            "type": "AcceptTransferOptions"
          }
        ],
        "returns": "Promise<void>",
        "tags": [],
        "docs": "Must be called in response to the 'acceptTransfer' \nnotification and determines on the recipient's side whether the \ntransfer should be accepted or rejected.",
        "complexTypes": [
          "AcceptTransferOptions"
        ],
        "slug": "accepttransfer"
      }
    ],
    "properties": []
  },
  "interfaces": [
    {
      "name": "PluginListenerHandle",
      "slug": "pluginlistenerhandle",
      "docs": "",
      "tags": [],
      "methods": [],
      "properties": [
        {
          "name": "remove",
          "tags": [],
          "docs": "",
          "complexTypes": [],
          "type": "() => Promise<void>"
        }
      ]
    },
    {
      "name": "AcceptTransferRequest",
      "slug": "accepttransferrequest",
      "docs": "Describes a request to the recipient to confirm \nor decline acceptance of the transfer.",
      "tags": [],
      "methods": [],
      "properties": [
        {
          "name": "transferId",
          "tags": [],
          "docs": "The ID of the transfer whose status is to be confirmed.",
          "complexTypes": [],
          "type": "string"
        }
      ]
    },
    {
      "name": "TransferResult",
      "slug": "transferresult",
      "docs": "The result of a transmission process for the receiver.",
      "tags": [],
      "methods": [],
      "properties": [
        {
          "name": "transferId",
          "tags": [],
          "docs": "The ID for the transfer process.",
          "complexTypes": [],
          "type": "string"
        },
        {
          "name": "resources",
          "tags": [],
          "docs": "The list of the transferred resources.",
          "complexTypes": [
            "ResourceDescriptor"
          ],
          "type": "ResourceDescriptor[]"
        }
      ]
    },
    {
      "name": "ResourceDescriptor",
      "slug": "resourcedescriptor",
      "docs": "Describes a resource to be transferred.",
      "tags": [],
      "methods": [],
      "properties": [
        {
          "name": "id",
          "tags": [],
          "docs": "An identifier for the resource. \nThis will be the same for sender and receiver.",
          "complexTypes": [],
          "type": "string"
        },
        {
          "name": "uri",
          "tags": [],
          "docs": "The resource URI.\nThis must be an absolute URI. It will include a schema, depending of \nthe target system. \nThe path (especially the last part) will vary between sender and receiver.",
          "complexTypes": [],
          "type": "string"
        }
      ]
    },
    {
      "name": "SendOptions",
      "slug": "sendoptions",
      "docs": "Defines the parameters of the sender to transfer files.",
      "tags": [],
      "methods": [],
      "properties": [
        {
          "name": "serviceId",
          "tags": [],
          "docs": "The identifier for the P2P process.\nOnly devices that use the same identifier can be found.  \nTo remain compatible with iOS devices, the identifier must meet the following criteria:\n<ul>\n<li>Must be 1–15 characters long</li>\n<li>Can contain only ASCII lowercase letters, numbers, and hyphens</li>\n<li>Must contain at least one ASCII letter</li>\n<li>Must not begin or end with a hyphen</li>\n<li>Must not contain hyphens adjacent to other hyphens.</li>\n</ul>",
          "complexTypes": [],
          "type": "string"
        },
        {
          "name": "transferId",
          "tags": [],
          "docs": "The ID for the transfer process.",
          "complexTypes": [],
          "type": "string"
        },
        {
          "name": "resources",
          "tags": [],
          "docs": "The list of the resources to be transferred.",
          "complexTypes": [
            "ResourceDescriptor"
          ],
          "type": "ResourceDescriptor[]"
        }
      ]
    },
    {
      "name": "ReceiveOptions",
      "slug": "receiveoptions",
      "docs": "Defines the parameters for receiving a transfer.",
      "tags": [],
      "methods": [],
      "properties": [
        {
          "name": "serviceId",
          "tags": [],
          "docs": "The identifier for the P2P process.\nOnly devices that use the same identifier can be found.  \nTo remain compatible with iOS devices, the identifier must meet the following criteria:\n<ul>\n<li>Must be 1–15 characters long</li>\n<li>Can contain only ASCII lowercase letters, numbers, and hyphens</li>\n<li>Must contain at least one ASCII letter</li>\n<li>Must not begin or end with a hyphen</li>\n<li>Must not contain hyphens adjacent to other hyphens.</li>\n</ul>",
          "complexTypes": [],
          "type": "string"
        }
      ]
    },
    {
      "name": "AcceptTransferOptions",
      "slug": "accepttransferoptions",
      "docs": "Accepts or rejects a transfer.",
      "tags": [],
      "methods": [],
      "properties": [
        {
          "name": "transferId",
          "tags": [],
          "docs": "The ID for the transfer process.",
          "complexTypes": [],
          "type": "string"
        },
        {
          "name": "accept",
          "tags": [],
          "docs": "<code>true<code> to accept the transfer, <code>fale</code> otherwise.",
          "complexTypes": [],
          "type": "boolean"
        }
      ]
    }
  ],
  "enums": [
    {
      "name": "SendError",
      "slug": "senderror",
      "members": [
        {
          "name": "transferInterrupted",
          "value": "'transferInterrupted'",
          "tags": [],
          "docs": "The transfer was interrupted by either sender or receiver."
        },
        {
          "name": "versionMismatch",
          "value": "'versionMismatch'",
          "tags": [],
          "docs": "The plugin version differs between sender and receiver."
        },
        {
          "name": "transferDenied",
          "value": "'transferDenied'",
          "tags": [],
          "docs": "The recipient has refused to receive the transfer."
        },
        {
          "name": "cancelled",
          "value": "'cancelled'",
          "tags": [],
          "docs": "The sending process was cancelled."
        },
        {
          "name": "permissionDenied",
          "value": "'permissionDenied'",
          "tags": [],
          "docs": "The user has not granted the requested permissions."
        },
        {
          "name": "internalError",
          "value": "'internalError'",
          "tags": [],
          "docs": "An internal error occured. Something went terribly wrong."
        },
        {
          "name": "connectionFailed",
          "value": "'connectionFailed'",
          "tags": [],
          "docs": "The connection between the peers could not be established."
        }
      ]
    }
  ],
  "typeAliases": [],
  "pluginConfigs": []
}