Migrate some trust_center_access columns to profiles
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -176,7 +176,7 @@ type Profile implements Node {
|
||||
source: String!
|
||||
state: ProfileState!
|
||||
additionalEmailAddresses: [EmailAddr!]!
|
||||
kind: ProfileKind!
|
||||
kind: ProfileKind
|
||||
position: String
|
||||
contractStartDate: Datetime
|
||||
contractEndDate: Datetime
|
||||
@@ -709,7 +709,7 @@ input CreateUserInput {
|
||||
emailAddress: EmailAddr!
|
||||
role: MembershipRole!
|
||||
additionalEmailAddresses: [EmailAddr!]
|
||||
kind: ProfileKind!
|
||||
kind: ProfileKind
|
||||
position: String
|
||||
contractStartDate: Datetime @goField(omittable: true)
|
||||
contractEndDate: Datetime @goField(omittable: true)
|
||||
@@ -734,7 +734,7 @@ input UpdateUserInput {
|
||||
id: ID!
|
||||
fullName: String!
|
||||
additionalEmailAddresses: [EmailAddr!]
|
||||
kind: ProfileKind!
|
||||
kind: ProfileKind
|
||||
position: String
|
||||
contractStartDate: Datetime @goField(omittable: true)
|
||||
contractEndDate: Datetime @goField(omittable: true)
|
||||
|
||||
@@ -2594,7 +2594,7 @@ type Profile implements Node {
|
||||
source: String!
|
||||
state: ProfileState!
|
||||
additionalEmailAddresses: [EmailAddr!]!
|
||||
kind: ProfileKind!
|
||||
kind: ProfileKind
|
||||
position: String
|
||||
contractStartDate: Datetime
|
||||
contractEndDate: Datetime
|
||||
@@ -3127,7 +3127,7 @@ input CreateUserInput {
|
||||
emailAddress: EmailAddr!
|
||||
role: MembershipRole!
|
||||
additionalEmailAddresses: [EmailAddr!]
|
||||
kind: ProfileKind!
|
||||
kind: ProfileKind
|
||||
position: String
|
||||
contractStartDate: Datetime @goField(omittable: true)
|
||||
contractEndDate: Datetime @goField(omittable: true)
|
||||
@@ -3152,7 +3152,7 @@ input UpdateUserInput {
|
||||
id: ID!
|
||||
fullName: String!
|
||||
additionalEmailAddresses: [EmailAddr!]
|
||||
kind: ProfileKind!
|
||||
kind: ProfileKind
|
||||
position: String
|
||||
contractStartDate: Datetime @goField(omittable: true)
|
||||
contractEndDate: Datetime @goField(omittable: true)
|
||||
@@ -9404,9 +9404,9 @@ func (ec *executionContext) _Profile_kind(ctx context.Context, field graphql.Col
|
||||
return obj.Kind, nil
|
||||
},
|
||||
nil,
|
||||
ec.marshalNProfileKind2goᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐMembershipProfileKind,
|
||||
true,
|
||||
ec.marshalOProfileKind2ᚖgoᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐMembershipProfileKind,
|
||||
true,
|
||||
false,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -15295,7 +15295,7 @@ func (ec *executionContext) unmarshalInputCreateUserInput(ctx context.Context, o
|
||||
it.AdditionalEmailAddresses = data
|
||||
case "kind":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind"))
|
||||
data, err := ec.unmarshalNProfileKind2goᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐMembershipProfileKind(ctx, v)
|
||||
data, err := ec.unmarshalOProfileKind2ᚖgoᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐMembershipProfileKind(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
@@ -16246,7 +16246,7 @@ func (ec *executionContext) unmarshalInputUpdateUserInput(ctx context.Context, o
|
||||
it.AdditionalEmailAddresses = data
|
||||
case "kind":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind"))
|
||||
data, err := ec.unmarshalNProfileKind2goᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐMembershipProfileKind(ctx, v)
|
||||
data, err := ec.unmarshalOProfileKind2ᚖgoᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐMembershipProfileKind(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
@@ -18590,9 +18590,6 @@ func (ec *executionContext) _Profile(ctx context.Context, sel ast.SelectionSet,
|
||||
}
|
||||
case "kind":
|
||||
out.Values[i] = ec._Profile_kind(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
atomic.AddUint32(&out.Invalids, 1)
|
||||
}
|
||||
case "position":
|
||||
out.Values[i] = ec._Profile_position(ctx, field, obj)
|
||||
case "contractStartDate":
|
||||
@@ -21683,36 +21680,6 @@ func (ec *executionContext) marshalNProfileEdge2ᚖgoᚗproboᚗincᚋproboᚋpk
|
||||
return ec._ProfileEdge(ctx, sel, v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) unmarshalNProfileKind2goᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐMembershipProfileKind(ctx context.Context, v any) (coredata.MembershipProfileKind, error) {
|
||||
tmp, err := graphql.UnmarshalString(v)
|
||||
res := unmarshalNProfileKind2goᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐMembershipProfileKind[tmp]
|
||||
return res, graphql.ErrorOnPath(ctx, err)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNProfileKind2goᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐMembershipProfileKind(ctx context.Context, sel ast.SelectionSet, v coredata.MembershipProfileKind) graphql.Marshaler {
|
||||
_ = sel
|
||||
res := graphql.MarshalString(marshalNProfileKind2goᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐMembershipProfileKind[v])
|
||||
if res == graphql.Null {
|
||||
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||
graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow")
|
||||
}
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
var (
|
||||
unmarshalNProfileKind2goᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐMembershipProfileKind = map[string]coredata.MembershipProfileKind{
|
||||
"EMPLOYEE": coredata.MembershipProfileKindEmployee,
|
||||
"CONTRACTOR": coredata.MembershipProfileKindContractor,
|
||||
"SERVICE_ACCOUNT": coredata.MembershipProfileKindServiceAccount,
|
||||
}
|
||||
marshalNProfileKind2goᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐMembershipProfileKind = map[coredata.MembershipProfileKind]string{
|
||||
coredata.MembershipProfileKindEmployee: "EMPLOYEE",
|
||||
coredata.MembershipProfileKindContractor: "CONTRACTOR",
|
||||
coredata.MembershipProfileKindServiceAccount: "SERVICE_ACCOUNT",
|
||||
}
|
||||
)
|
||||
|
||||
func (ec *executionContext) unmarshalNProfileOrderField2goᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐMembershipProfileOrderField(ctx context.Context, v any) (coredata.MembershipProfileOrderField, error) {
|
||||
tmp, err := graphql.UnmarshalString(v)
|
||||
res := unmarshalNProfileOrderField2goᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐMembershipProfileOrderField[tmp]
|
||||
@@ -22718,6 +22685,38 @@ func (ec *executionContext) unmarshalOProfileFilter2ᚖgoᚗproboᚗincᚋprobo
|
||||
return &res, graphql.ErrorOnPath(ctx, err)
|
||||
}
|
||||
|
||||
func (ec *executionContext) unmarshalOProfileKind2ᚖgoᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐMembershipProfileKind(ctx context.Context, v any) (*coredata.MembershipProfileKind, error) {
|
||||
if v == nil {
|
||||
return nil, nil
|
||||
}
|
||||
tmp, err := graphql.UnmarshalString(v)
|
||||
res := unmarshalOProfileKind2ᚖgoᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐMembershipProfileKind[tmp]
|
||||
return &res, graphql.ErrorOnPath(ctx, err)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalOProfileKind2ᚖgoᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐMembershipProfileKind(ctx context.Context, sel ast.SelectionSet, v *coredata.MembershipProfileKind) graphql.Marshaler {
|
||||
if v == nil {
|
||||
return graphql.Null
|
||||
}
|
||||
_ = sel
|
||||
_ = ctx
|
||||
res := graphql.MarshalString(marshalOProfileKind2ᚖgoᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐMembershipProfileKind[*v])
|
||||
return res
|
||||
}
|
||||
|
||||
var (
|
||||
unmarshalOProfileKind2ᚖgoᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐMembershipProfileKind = map[string]coredata.MembershipProfileKind{
|
||||
"EMPLOYEE": coredata.MembershipProfileKindEmployee,
|
||||
"CONTRACTOR": coredata.MembershipProfileKindContractor,
|
||||
"SERVICE_ACCOUNT": coredata.MembershipProfileKindServiceAccount,
|
||||
}
|
||||
marshalOProfileKind2ᚖgoᚗproboᚗincᚋproboᚋpkgᚋcoredataᚐMembershipProfileKind = map[coredata.MembershipProfileKind]string{
|
||||
coredata.MembershipProfileKindEmployee: "EMPLOYEE",
|
||||
coredata.MembershipProfileKindContractor: "CONTRACTOR",
|
||||
coredata.MembershipProfileKindServiceAccount: "SERVICE_ACCOUNT",
|
||||
}
|
||||
)
|
||||
|
||||
func (ec *executionContext) unmarshalOProfileOrder2ᚖgoᚗproboᚗincᚋproboᚋpkgᚋserverᚋapiᚋconnectᚋv1ᚋtypesᚐProfileOrderBy(ctx context.Context, v any) (*types.ProfileOrderBy, error) {
|
||||
if v == nil {
|
||||
return nil, nil
|
||||
|
||||
@@ -124,15 +124,15 @@ type CreateSCIMConfigurationPayload struct {
|
||||
}
|
||||
|
||||
type CreateUserInput struct {
|
||||
OrganizationID gid.GID `json:"organizationId"`
|
||||
FullName string `json:"fullName"`
|
||||
EmailAddress mail.Addr `json:"emailAddress"`
|
||||
Role coredata.MembershipRole `json:"role"`
|
||||
AdditionalEmailAddresses []mail.Addr `json:"additionalEmailAddresses,omitempty"`
|
||||
Kind coredata.MembershipProfileKind `json:"kind"`
|
||||
Position *string `json:"position,omitempty"`
|
||||
ContractStartDate graphql.Omittable[*time.Time] `json:"contractStartDate,omitempty"`
|
||||
ContractEndDate graphql.Omittable[*time.Time] `json:"contractEndDate,omitempty"`
|
||||
OrganizationID gid.GID `json:"organizationId"`
|
||||
FullName string `json:"fullName"`
|
||||
EmailAddress mail.Addr `json:"emailAddress"`
|
||||
Role coredata.MembershipRole `json:"role"`
|
||||
AdditionalEmailAddresses []mail.Addr `json:"additionalEmailAddresses,omitempty"`
|
||||
Kind *coredata.MembershipProfileKind `json:"kind,omitempty"`
|
||||
Position *string `json:"position,omitempty"`
|
||||
ContractStartDate graphql.Omittable[*time.Time] `json:"contractStartDate,omitempty"`
|
||||
ContractEndDate graphql.Omittable[*time.Time] `json:"contractEndDate,omitempty"`
|
||||
}
|
||||
|
||||
type CreateUserPayload struct {
|
||||
@@ -307,23 +307,23 @@ type PersonalAPIKeyEdge struct {
|
||||
}
|
||||
|
||||
type Profile struct {
|
||||
ID gid.GID `json:"id"`
|
||||
FullName string `json:"fullName"`
|
||||
EmailAddress mail.Addr `json:"emailAddress"`
|
||||
Source string `json:"source"`
|
||||
State coredata.ProfileState `json:"state"`
|
||||
AdditionalEmailAddresses []mail.Addr `json:"additionalEmailAddresses"`
|
||||
Kind coredata.MembershipProfileKind `json:"kind"`
|
||||
Position *string `json:"position,omitempty"`
|
||||
ContractStartDate *time.Time `json:"contractStartDate,omitempty"`
|
||||
ContractEndDate *time.Time `json:"contractEndDate,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
Identity *Identity `json:"identity,omitempty"`
|
||||
Organization *Organization `json:"organization,omitempty"`
|
||||
Membership *Membership `json:"membership,omitempty"`
|
||||
PendingInvitations *InvitationConnection `json:"pendingInvitations,omitempty"`
|
||||
Permission bool `json:"permission"`
|
||||
ID gid.GID `json:"id"`
|
||||
FullName string `json:"fullName"`
|
||||
EmailAddress mail.Addr `json:"emailAddress"`
|
||||
Source string `json:"source"`
|
||||
State coredata.ProfileState `json:"state"`
|
||||
AdditionalEmailAddresses []mail.Addr `json:"additionalEmailAddresses"`
|
||||
Kind *coredata.MembershipProfileKind `json:"kind,omitempty"`
|
||||
Position *string `json:"position,omitempty"`
|
||||
ContractStartDate *time.Time `json:"contractStartDate,omitempty"`
|
||||
ContractEndDate *time.Time `json:"contractEndDate,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
Identity *Identity `json:"identity,omitempty"`
|
||||
Organization *Organization `json:"organization,omitempty"`
|
||||
Membership *Membership `json:"membership,omitempty"`
|
||||
PendingInvitations *InvitationConnection `json:"pendingInvitations,omitempty"`
|
||||
Permission bool `json:"permission"`
|
||||
}
|
||||
|
||||
func (Profile) IsNode() {}
|
||||
@@ -586,13 +586,13 @@ type UpdateSCIMBridgePayload struct {
|
||||
}
|
||||
|
||||
type UpdateUserInput struct {
|
||||
ID gid.GID `json:"id"`
|
||||
FullName string `json:"fullName"`
|
||||
AdditionalEmailAddresses []mail.Addr `json:"additionalEmailAddresses,omitempty"`
|
||||
Kind coredata.MembershipProfileKind `json:"kind"`
|
||||
Position *string `json:"position,omitempty"`
|
||||
ContractStartDate graphql.Omittable[*time.Time] `json:"contractStartDate,omitempty"`
|
||||
ContractEndDate graphql.Omittable[*time.Time] `json:"contractEndDate,omitempty"`
|
||||
ID gid.GID `json:"id"`
|
||||
FullName string `json:"fullName"`
|
||||
AdditionalEmailAddresses []mail.Addr `json:"additionalEmailAddresses,omitempty"`
|
||||
Kind *coredata.MembershipProfileKind `json:"kind,omitempty"`
|
||||
Position *string `json:"position,omitempty"`
|
||||
ContractStartDate graphql.Omittable[*time.Time] `json:"contractStartDate,omitempty"`
|
||||
ContractEndDate graphql.Omittable[*time.Time] `json:"contractEndDate,omitempty"`
|
||||
}
|
||||
|
||||
type UpdateUserPayload struct {
|
||||
|
||||
Reference in New Issue
Block a user