Class ScopeRequest.Builder

java.lang.Object
ai.vectros.types.ScopeRequest.Builder
Enclosing class:
ScopeRequest

public static final class ScopeRequest.Builder extends Object
  • Method Details

    • from

      public ScopeRequest.Builder from(ScopeRequest other)
    • allowedActions

      public ScopeRequest.Builder allowedActions(Optional<List<String>> allowedActions)

      The actions this token may perform. Each entry has the form resource:operations, where operations is one of r (read), c (create), u (update), d (delete), crud (all four), or a colon-separated combination. For records you may append a type qualifier, e.g. records:r:intake_form. Valid resources are: clients, orgs, users, documents, folders, records, schemas, and search.

    • allowedActions

      public ScopeRequest.Builder allowedActions(List<String> allowedActions)
    • identity

      public ScopeRequest.Builder identity(Optional<Map<String,String>> identity)

      Ownership fields automatically stamped onto resources created with this token. Optional. Keys are ownership dimensions: userId, orgId, clientId, or a custom scope in canonical scope:<namespace> form (e.g. scope:group). Entity values must be Vectros UUIDs — look them up with GET /v1/users, /v1/orgs, or /v1/clients; custom-scope values are identifiers you define. The token holder cannot override these values when creating resources, but may narrow which of them stamp per create via the scopes request field.

    • identity

      public ScopeRequest.Builder identity(Map<String,String> identity)
    • dataScope

      public ScopeRequest.Builder dataScope(Optional<Map<String,List<String>>> dataScope)

      Restricts which records the token can access. Optional. Keys are ownership dimensions: userId, orgId, clientId, or a custom scope in canonical scope:<namespace> form (e.g. scope:group); values are arrays of permitted values — the token can only access records whose dimension matches one of these values. Every non-null entity UUID must be a real entity in your account; name each dimension once (orgId and scope:org are two spellings of the same dimension — responses and token claims always read back the canonical scope: form). Include a JSON null in the array (e.g. ["uuid", null]) to ALSO grant access to records with no value in THAT dimension — an explicit per-dimension sentinel, NOT a wildcard. To grant access regardless of value, omit the key from the data scope entirely.

    • dataScope

      public ScopeRequest.Builder dataScope(Map<String,List<String>> dataScope)
    • build

      public ScopeRequest build()
    • additionalProperty

      public ScopeRequest.Builder additionalProperty(String key, Object value)
    • additionalProperties

      public ScopeRequest.Builder additionalProperties(Map<String,Object> additionalProperties)