Move OIDCProviderInfo type into base.graphql alongside its query field in both connect and trust APIs, removing orphan oidc.graphql files. Split connect profile.graphql into three domain files: profile (with user mutations), membership, and invitation. Signed-off-by: Émile Ré <emile@getprobo.com>
65 lines
1.5 KiB
GraphQL
65 lines
1.5 KiB
GraphQL
type Invitation implements Node {
|
|
id: ID!
|
|
expiresAt: Datetime!
|
|
acceptedAt: Datetime
|
|
createdAt: Datetime!
|
|
status: InvitationStatus!
|
|
|
|
permission(action: String!): Boolean!
|
|
@goField(forceResolver: true)
|
|
@session(required: PRESENT)
|
|
}
|
|
|
|
enum InvitationStatus
|
|
@goModel(model: "go.probo.inc/probo/pkg/coredata.InvitationStatus") {
|
|
PENDING
|
|
@goEnum(value: "go.probo.inc/probo/pkg/coredata.InvitationStatusPending")
|
|
ACCEPTED
|
|
@goEnum(value: "go.probo.inc/probo/pkg/coredata.InvitationStatusAccepted")
|
|
EXPIRED
|
|
@goEnum(value: "go.probo.inc/probo/pkg/coredata.InvitationStatusExpired")
|
|
}
|
|
|
|
enum InvitationOrderField
|
|
@goModel(model: "go.probo.inc/probo/pkg/coredata.InvitationOrderField") {
|
|
CREATED_AT
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.InvitationOrderFieldCreatedAt"
|
|
)
|
|
}
|
|
|
|
input InvitationOrder
|
|
@goModel(
|
|
model: "go.probo.inc/probo/pkg/server/api/connect/v1/types.InvitationOrderBy"
|
|
) {
|
|
direction: OrderDirection!
|
|
field: InvitationOrderField!
|
|
}
|
|
|
|
type InvitationConnection
|
|
@goModel(
|
|
model: "go.probo.inc/probo/pkg/server/api/connect/v1/types.InvitationConnection"
|
|
) {
|
|
edges: [InvitationEdge!]!
|
|
pageInfo: PageInfo!
|
|
}
|
|
|
|
type InvitationEdge {
|
|
node: Invitation!
|
|
cursor: CursorKey!
|
|
}
|
|
|
|
extend type Mutation {
|
|
inviteUser(input: InviteUserInput!): InviteUserPayload
|
|
@session(required: PRESENT)
|
|
}
|
|
|
|
input InviteUserInput {
|
|
organizationId: ID!
|
|
profileId: ID!
|
|
}
|
|
|
|
type InviteUserPayload {
|
|
invitationEdge: InvitationEdge!
|
|
}
|