# The permission required to access a Shopify Admin API or Storefront API resource for a shop.
# Merchants grant access scopes that are requested by applications.
type AccessScope {
    # A description of the actions that the access scope allows an app to perform.
    description: String!

    # A readable string that represents the access scope. The string usually follows the format {action}_{resource}.
    # {action} is read or write, and {resource} is the resource that the action can be performed on.
    # {action} and {resource} are separated by an underscore. For example, read_orders or write_products.
    handle: String!
}

# An auto-generated type for paginating through multiple StorefrontAccessTokens.
type StorefrontAccessTokenConnection {
    # A list of edges.
    edges: [StorefrontAccessTokenEdge!]!

    # A list of the nodes contained in StorefrontAccessTokenEdge.
    nodes: [StorefrontAccessToken!]!

    # Information to aid in pagination.
    pageInfo: PageInfo!
}

# An auto-generated type which holds one StorefrontAccessToken and a cursor during pagination.
type StorefrontAccessTokenEdge {
    # A cursor for use in pagination.
    cursor: String!

    # The item at the end of StorefrontAccessTokenEdge.
    node: StorefrontAccessToken!
}

# A token that's used to delegate unauthenticated access scopes to clients that need to access
# the unauthenticated Storefront API. An app can have a maximum of 100 active storefront access
# tokens for each shop.
type StorefrontAccessToken implements Node {
    # List of permissions associated with the token.
    accessScopes: [AccessScope!]!

    # The issued public access token.
    accessToken: String!

    # The date and time when the public access token was created.
    createdAt: DateTime!

    # A globally-unique identifier.
    id: ID!

    # An arbitrary title for each token determined by the developer, used for reference purposes.
    title: String!

    # The date and time when the storefront access token was updated.
    updatedAt: DateTime!
}
