~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

7
39 lines · 2.5 KB Raw History
{
  "lexicon": 1,
  "id": "dev.knotless.putOrgMember",
  "description": "Invites an account to an organization, or changes a member's role, through the gateway the organization delegated writes to, which writes as the organization. The caller must be an admin of it who joined. Requires a service token from the caller's PDS, audience the gateway's DID, for this method.",
  "defs": {
    "main": {
      "type": "procedure",
      "description": "The invitation is kept in the organization's space where its PDS has spaces, else in its public records. Invited again, an invitation that lapsed starts over.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": ["org", "member"],
          "properties": {
            "org": { "type": "string", "format": "did", "description": "The organization." },
            "member": { "type": "string", "format": "did", "description": "The account to invite." },
            "role": { "type": "string", "maxLength": 64, "knownValues": ["admin", "member"], "description": "Their role; member when absent." }
          }
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": ["org", "who", "role", "first", "private"],
          "properties": {
            "org": { "type": "string", "maxLength": 300, "description": "The organization's handle, or its DID when none resolves back to it." },
            "who": { "type": "string", "maxLength": 300, "description": "The invitee's handle, or their DID when none resolves back to it." },
            "role": { "type": "string", "maxLength": 64, "knownValues": ["admin", "member"], "description": "Their role now." },
            "was": { "type": "string", "maxLength": 64, "knownValues": ["invited", "lapsed", "public", "hidden"], "description": "Where they stood before: invited, lapsed (invited over 7 days ago), or a public or hidden member. Absent when they were not invited." },
            "had": { "type": "string", "maxLength": 64, "knownValues": ["admin", "member"], "description": "The role they had before, if they had one." },
            "first": { "type": "boolean", "description": "Whether this made the account an organization." },
            "private": { "type": "boolean", "description": "Whether the invitation is in the organization's space, which only it and its members read; else in its public records." }
          }
        }
      }
    }
  }
}