appBskyDraftCreateDraft top-level constant

Map<String, dynamic> const appBskyDraftCreateDraft

app.bsky.draft.createDraft

Implementation

const appBskyDraftCreateDraft = <String, dynamic>{
  "lexicon": 1,
  "id": "app.bsky.draft.createDraft",
  "defs": {
    "main": {
      "type": "procedure",
      "description":
          "Inserts a draft using private storage (stash). An upper limit of drafts might be enforced. Requires authentication.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": ["draft"],
          "properties": {
            "draft": {"type": "ref", "ref": "app.bsky.draft.defs#draft"},
          },
        },
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": ["id"],
          "properties": {
            "id": {
              "type": "string",
              "description": "The ID of the created draft.",
            },
          },
        },
      },
      "errors": [
        {
          "name": "DraftLimitReached",
          "description":
              "Trying to insert a new draft when the limit was already reached.",
        },
      ],
    },
  },
};