From a525309b61096b8f9d41b377001304604b51ea58 Mon Sep 17 00:00:00 2001 From: Bryan Frimin Date: Wed, 1 Oct 2025 08:42:04 +0200 Subject: [PATCH] Add custom domain graphql API Signed-off-by: Bryan Frimin --- pkg/server/api/console/v1/schema.graphql | 222 +- pkg/server/api/console/v1/schema/schema.go | 2506 +++++++++++++++++++- pkg/server/api/console/v1/types/types.go | 53 + pkg/server/api/console/v1/v1_resolver.go | 54 + 4 files changed, 2729 insertions(+), 106 deletions(-) diff --git a/pkg/server/api/console/v1/schema.graphql b/pkg/server/api/console/v1/schema.graphql index d81721d58..0af98172f 100644 --- a/pkg/server/api/console/v1/schema.graphql +++ b/pkg/server/api/console/v1/schema.graphql @@ -139,17 +139,11 @@ enum AuditState value: "github.com/getprobo/probo/pkg/coredata.AuditStateInProgress" ) COMPLETED - @goEnum( - value: "github.com/getprobo/probo/pkg/coredata.AuditStateCompleted" - ) + @goEnum(value: "github.com/getprobo/probo/pkg/coredata.AuditStateCompleted") REJECTED - @goEnum( - value: "github.com/getprobo/probo/pkg/coredata.AuditStateRejected" - ) + @goEnum(value: "github.com/getprobo/probo/pkg/coredata.AuditStateRejected") OUTDATED - @goEnum( - value: "github.com/getprobo/probo/pkg/coredata.AuditStateOutdated" - ) + @goEnum(value: "github.com/getprobo/probo/pkg/coredata.AuditStateOutdated") } enum TrustCenterVisibility @@ -169,7 +163,9 @@ enum TrustCenterVisibility } enum NonconformityStatus - @goModel(model: "github.com/getprobo/probo/pkg/coredata.NonconformityStatus") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.NonconformityStatus" + ) { OPEN @goEnum( value: "github.com/getprobo/probo/pkg/coredata.NonconformityStatusOpen" @@ -201,7 +197,9 @@ enum ObligationStatus } enum ContinualImprovementStatus - @goModel(model: "github.com/getprobo/probo/pkg/coredata.ContinualImprovementStatus") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.ContinualImprovementStatus" + ) { OPEN @goEnum( value: "github.com/getprobo/probo/pkg/coredata.ContinualImprovementStatusOpen" @@ -217,7 +215,9 @@ enum ContinualImprovementStatus } enum ContinualImprovementPriority - @goModel(model: "github.com/getprobo/probo/pkg/coredata.ContinualImprovementPriority") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.ContinualImprovementPriority" + ) { LOW @goEnum( value: "github.com/getprobo/probo/pkg/coredata.ContinualImprovementPriorityLow" @@ -233,7 +233,9 @@ enum ContinualImprovementPriority } enum ProcessingActivitySpecialOrCriminalData - @goModel(model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivitySpecialOrCriminalData") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivitySpecialOrCriminalData" + ) { YES @goEnum( value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivitySpecialOrCriminalDataYes" @@ -249,7 +251,9 @@ enum ProcessingActivitySpecialOrCriminalData } enum ProcessingActivityLawfulBasis - @goModel(model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityLawfulBasis") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityLawfulBasis" + ) { LEGITIMATE_INTEREST @goEnum( value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityLawfulBasisLegitimateInterest" @@ -277,7 +281,9 @@ enum ProcessingActivityLawfulBasis } enum ProcessingActivityTransferSafeguards - @goModel(model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityTransferSafeguards") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityTransferSafeguards" + ) { STANDARD_CONTRACTUAL_CLAUSES @goEnum( value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityTransferSafeguardsStandardContractualClauses" @@ -305,7 +311,9 @@ enum ProcessingActivityTransferSafeguards } enum ProcessingActivityDataProtectionImpactAssessment - @goModel(model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityDataProtectionImpactAssessment") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityDataProtectionImpactAssessment" + ) { NEEDED @goEnum( value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityDataProtectionImpactAssessmentNeeded" @@ -317,7 +325,9 @@ enum ProcessingActivityDataProtectionImpactAssessment } enum ProcessingActivityTransferImpactAssessment - @goModel(model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityTransferImpactAssessment") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityTransferImpactAssessment" + ) { NEEDED @goEnum( value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityTransferImpactAssessmentNeeded" @@ -1036,7 +1046,9 @@ enum AuditOrderField } enum NonconformityOrderField - @goModel(model: "github.com/getprobo/probo/pkg/coredata.NonconformityOrderField") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.NonconformityOrderField" + ) { CREATED_AT @goEnum( value: "github.com/getprobo/probo/pkg/coredata.NonconformityOrderFieldCreatedAt" @@ -1060,7 +1072,9 @@ enum NonconformityOrderField } enum ObligationOrderField - @goModel(model: "github.com/getprobo/probo/pkg/coredata.ObligationOrderField") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.ObligationOrderField" + ) { CREATED_AT @goEnum( value: "github.com/getprobo/probo/pkg/coredata.ObligationOrderFieldCreatedAt" @@ -1080,7 +1094,9 @@ enum ObligationOrderField } enum ContinualImprovementOrderField - @goModel(model: "github.com/getprobo/probo/pkg/coredata.ContinualImprovementOrderField") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.ContinualImprovementOrderField" + ) { CREATED_AT @goEnum( value: "github.com/getprobo/probo/pkg/coredata.ContinualImprovementOrderFieldCreatedAt" @@ -1104,7 +1120,9 @@ enum ContinualImprovementOrderField } enum ProcessingActivityOrderField - @goModel(model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityOrderField") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityOrderField" + ) { CREATED_AT @goEnum( value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityOrderFieldCreatedAt" @@ -1116,7 +1134,9 @@ enum ProcessingActivityOrderField } enum TrustCenterAccessOrderField - @goModel(model: "github.com/getprobo/probo/pkg/coredata.TrustCenterAccessOrderField") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.TrustCenterAccessOrderField" + ) { CREATED_AT @goEnum( value: "github.com/getprobo/probo/pkg/coredata.TrustCenterAccessOrderFieldCreatedAt" @@ -1132,7 +1152,9 @@ enum TrustCenterDocumentAccessOrderField } enum TrustCenterReferenceOrderField - @goModel(model: "github.com/getprobo/probo/pkg/coredata.TrustCenterReferenceOrderField") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.TrustCenterReferenceOrderField" + ) { NAME @goEnum( value: "github.com/getprobo/probo/pkg/coredata.TrustCenterReferenceOrderFieldName" @@ -1150,21 +1172,15 @@ enum TrustCenterReferenceOrderField enum SnapshotsType @goModel(model: "github.com/getprobo/probo/pkg/coredata.SnapshotsType") { RISKS - @goEnum( - value: "github.com/getprobo/probo/pkg/coredata.SnapshotsTypeRisks" - ) + @goEnum(value: "github.com/getprobo/probo/pkg/coredata.SnapshotsTypeRisks") VENDORS @goEnum( value: "github.com/getprobo/probo/pkg/coredata.SnapshotsTypeVendors" ) ASSETS - @goEnum( - value: "github.com/getprobo/probo/pkg/coredata.SnapshotsTypeAssets" - ) + @goEnum(value: "github.com/getprobo/probo/pkg/coredata.SnapshotsTypeAssets") DATA - @goEnum( - value: "github.com/getprobo/probo/pkg/coredata.SnapshotsTypeData" - ) + @goEnum(value: "github.com/getprobo/probo/pkg/coredata.SnapshotsTypeData") NONCONFORMITIES @goEnum( value: "github.com/getprobo/probo/pkg/coredata.SnapshotsTypeNonconformities" @@ -1648,6 +1664,13 @@ type Organization implements Node { trustCenter: TrustCenter @goField(forceResolver: true) + customDomains( + first: Int + after: CursorKey + last: Int + before: CursorKey + ): CustomDomainConnection! @goField(forceResolver: true) + createdAt: Datetime! updatedAt: Datetime! } @@ -1700,7 +1723,8 @@ type Vendor implements Node { orderBy: VendorComplianceReportOrder ): VendorComplianceReportConnection! @goField(forceResolver: true) - businessAssociateAgreement: VendorBusinessAssociateAgreement @goField(forceResolver: true) + businessAssociateAgreement: VendorBusinessAssociateAgreement + @goField(forceResolver: true) dataPrivacyAgreement: VendorDataPrivacyAgreement @goField(forceResolver: true) contacts( @@ -2281,9 +2305,10 @@ type TrustCenterReference implements Node { updatedAt: Datetime! } -type TrustCenterReferenceConnection @goModel( +type TrustCenterReferenceConnection + @goModel( model: "github.com/getprobo/probo/pkg/server/api/console/v1/types.TrustCenterReferenceConnection" - ){ + ) { totalCount: Int! @goField(forceResolver: true) edges: [TrustCenterReferenceEdge!]! pageInfo: PageInfo! @@ -2615,9 +2640,7 @@ type Mutation { input: DeleteOrganizationInput! ): DeleteOrganizationPayload! - updateTrustCenter( - input: UpdateTrustCenterInput! - ): UpdateTrustCenterPayload! + updateTrustCenter(input: UpdateTrustCenterInput!): UpdateTrustCenterPayload! uploadTrustCenterNDA( input: UploadTrustCenterNDAInput! @@ -2669,14 +2692,26 @@ type Mutation { deleteVendor(input: DeleteVendorInput!): DeleteVendorPayload! # Vendor Contact mutations - createVendorContact(input: CreateVendorContactInput!): CreateVendorContactPayload! - updateVendorContact(input: UpdateVendorContactInput!): UpdateVendorContactPayload! - deleteVendorContact(input: DeleteVendorContactInput!): DeleteVendorContactPayload! + createVendorContact( + input: CreateVendorContactInput! + ): CreateVendorContactPayload! + updateVendorContact( + input: UpdateVendorContactInput! + ): UpdateVendorContactPayload! + deleteVendorContact( + input: DeleteVendorContactInput! + ): DeleteVendorContactPayload! # Vendor Service mutations - createVendorService(input: CreateVendorServiceInput!): CreateVendorServicePayload! - updateVendorService(input: UpdateVendorServiceInput!): UpdateVendorServicePayload! - deleteVendorService(input: DeleteVendorServiceInput!): DeleteVendorServicePayload! + createVendorService( + input: CreateVendorServiceInput! + ): CreateVendorServicePayload! + updateVendorService( + input: UpdateVendorServiceInput! + ): UpdateVendorServicePayload! + deleteVendorService( + input: DeleteVendorServiceInput! + ): DeleteVendorServicePayload! # Framework mutations createFramework(input: CreateFrameworkInput!): CreateFrameworkPayload! @@ -2867,15 +2902,9 @@ type Mutation { ): DeleteNonconformityPayload! # Obligation mutations - createObligation( - input: CreateObligationInput! - ): CreateObligationPayload! - updateObligation( - input: UpdateObligationInput! - ): UpdateObligationPayload! - deleteObligation( - input: DeleteObligationInput! - ): DeleteObligationPayload! + createObligation(input: CreateObligationInput!): CreateObligationPayload! + updateObligation(input: UpdateObligationInput!): UpdateObligationPayload! + deleteObligation(input: DeleteObligationInput!): DeleteObligationPayload! # Continual Improvement mutations createContinualImprovement( @@ -2902,6 +2931,14 @@ type Mutation { # Snapshot mutations createSnapshot(input: CreateSnapshotInput!): CreateSnapshotPayload! deleteSnapshot(input: DeleteSnapshotInput!): DeleteSnapshotPayload! + + # Custom Domain mutations + createCustomDomain( + input: CreateCustomDomainInput! + ): CreateCustomDomainPayload! + deleteCustomDomain( + input: DeleteCustomDomainInput! + ): DeleteCustomDomainPayload! } # Input Types @@ -4385,3 +4422,82 @@ type CreateSnapshotPayload { type DeleteSnapshotPayload { deletedSnapshotId: ID! } + +enum SSLStatus + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.CustomDomainSSLStatus" + ) { + PENDING + @goEnum( + value: "github.com/getprobo/probo/pkg/coredata.CustomDomainSSLStatusPending" + ) + PROVISIONING + @goEnum( + value: "github.com/getprobo/probo/pkg/coredata.CustomDomainSSLStatusProvisioning" + ) + ACTIVE + @goEnum( + value: "github.com/getprobo/probo/pkg/coredata.CustomDomainSSLStatusActive" + ) + RENEWING + @goEnum( + value: "github.com/getprobo/probo/pkg/coredata.CustomDomainSSLStatusRenewing" + ) + EXPIRED + @goEnum( + value: "github.com/getprobo/probo/pkg/coredata.CustomDomainSSLStatusExpired" + ) + FAILED + @goEnum( + value: "github.com/getprobo/probo/pkg/coredata.CustomDomainSSLStatusFailed" + ) +} + +type CustomDomain implements Node { + id: ID! + organization: Organization! + domain: String! + sslStatus: SSLStatus! + sslExpiresAt: Datetime + isActive: Boolean! + dnsRecords: [DNSRecordInstruction!]! + createdAt: Datetime! + updatedAt: Datetime! + verifiedAt: Datetime +} + +type DNSRecordInstruction { + type: String! + name: String! + value: String! + ttl: Int! + purpose: String! +} + +type CustomDomainConnection { + edges: [CustomDomainEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CustomDomainEdge { + cursor: CursorKey! + node: CustomDomain! +} + +input CreateCustomDomainInput { + organizationId: ID! + domain: String! +} + +input DeleteCustomDomainInput { + domainId: ID! +} + +type CreateCustomDomainPayload { + customDomainEdge: CustomDomainEdge! +} + +type DeleteCustomDomainPayload { + deletedCustomDomainId: ID! +} diff --git a/pkg/server/api/console/v1/schema/schema.go b/pkg/server/api/console/v1/schema/schema.go index 6ae248369..e3184d90c 100644 --- a/pkg/server/api/console/v1/schema/schema.go +++ b/pkg/server/api/console/v1/schema/schema.go @@ -299,6 +299,10 @@ type ComplexityRoot struct { SnapshotEdge func(childComplexity int) int } + CreateCustomDomainPayload struct { + CustomDomainEdge func(childComplexity int) int + } + CreateDatumPayload struct { DatumEdge func(childComplexity int) int } @@ -395,6 +399,38 @@ type ComplexityRoot struct { VendorServiceEdge func(childComplexity int) int } + CustomDomain struct { + CreatedAt func(childComplexity int) int + DNSRecords func(childComplexity int) int + Domain func(childComplexity int) int + ID func(childComplexity int) int + IsActive func(childComplexity int) int + Organization func(childComplexity int) int + SslExpiresAt func(childComplexity int) int + SslStatus func(childComplexity int) int + UpdatedAt func(childComplexity int) int + VerifiedAt func(childComplexity int) int + } + + CustomDomainConnection struct { + Edges func(childComplexity int) int + PageInfo func(childComplexity int) int + TotalCount func(childComplexity int) int + } + + CustomDomainEdge struct { + Cursor func(childComplexity int) int + Node func(childComplexity int) int + } + + DNSRecordInstruction struct { + Name func(childComplexity int) int + Purpose func(childComplexity int) int + TTL func(childComplexity int) int + Type func(childComplexity int) int + Value func(childComplexity int) int + } + Datum struct { CreatedAt func(childComplexity int) int DataClassification func(childComplexity int) int @@ -458,6 +494,10 @@ type ComplexityRoot struct { DeletedSnapshotID func(childComplexity int) int } + DeleteCustomDomainPayload struct { + DeletedCustomDomainID func(childComplexity int) int + } + DeleteDatumPayload struct { DeletedDatumID func(childComplexity int) int } @@ -767,6 +807,7 @@ type ComplexityRoot struct { CreateControlDocumentMapping func(childComplexity int, input types.CreateControlDocumentMappingInput) int CreateControlMeasureMapping func(childComplexity int, input types.CreateControlMeasureMappingInput) int CreateControlSnapshotMapping func(childComplexity int, input types.CreateControlSnapshotMappingInput) int + CreateCustomDomain func(childComplexity int, input types.CreateCustomDomainInput) int CreateDatum func(childComplexity int, input types.CreateDatumInput) int CreateDocument func(childComplexity int, input types.CreateDocumentInput) int CreateDraftDocumentVersion func(childComplexity int, input types.CreateDraftDocumentVersionInput) int @@ -798,6 +839,7 @@ type ComplexityRoot struct { DeleteControlDocumentMapping func(childComplexity int, input types.DeleteControlDocumentMappingInput) int DeleteControlMeasureMapping func(childComplexity int, input types.DeleteControlMeasureMappingInput) int DeleteControlSnapshotMapping func(childComplexity int, input types.DeleteControlSnapshotMappingInput) int + DeleteCustomDomain func(childComplexity int, input types.DeleteCustomDomainInput) int DeleteDatum func(childComplexity int, input types.DeleteDatumInput) int DeleteDocument func(childComplexity int, input types.DeleteDocumentInput) int DeleteDraftDocumentVersion func(childComplexity int, input types.DeleteDraftDocumentVersionInput) int @@ -933,6 +975,7 @@ type ComplexityRoot struct { ContinualImprovements func(childComplexity int, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.ContinualImprovementOrderBy, filter *types.ContinualImprovementFilter) int Controls func(childComplexity int, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.ControlOrderBy, filter *types.ControlFilter) int CreatedAt func(childComplexity int) int + CustomDomains func(childComplexity int, first *int, after *page.CursorKey, last *int, before *page.CursorKey) int Data func(childComplexity int, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.DatumOrderBy, filter *types.DatumFilter) int Description func(childComplexity int) int Documents func(childComplexity int, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.DocumentOrderBy, filter *types.DocumentFilter) int @@ -1758,6 +1801,8 @@ type MutationResolver interface { DeleteProcessingActivity(ctx context.Context, input types.DeleteProcessingActivityInput) (*types.DeleteProcessingActivityPayload, error) CreateSnapshot(ctx context.Context, input types.CreateSnapshotInput) (*types.CreateSnapshotPayload, error) DeleteSnapshot(ctx context.Context, input types.DeleteSnapshotInput) (*types.DeleteSnapshotPayload, error) + CreateCustomDomain(ctx context.Context, input types.CreateCustomDomainInput) (*types.CreateCustomDomainPayload, error) + DeleteCustomDomain(ctx context.Context, input types.DeleteCustomDomainInput) (*types.DeleteCustomDomainPayload, error) } type NonconformityResolver interface { Organization(ctx context.Context, obj *types.Nonconformity) (*types.Organization, error) @@ -1799,6 +1844,7 @@ type OrganizationResolver interface { ProcessingActivities(ctx context.Context, obj *types.Organization, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.ProcessingActivityOrderBy, filter *types.ProcessingActivityFilter) (*types.ProcessingActivityConnection, error) Snapshots(ctx context.Context, obj *types.Organization, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.SnapshotOrderBy) (*types.SnapshotConnection, error) TrustCenter(ctx context.Context, obj *types.Organization) (*types.TrustCenter, error) + CustomDomains(ctx context.Context, obj *types.Organization, first *int, after *page.CursorKey, last *int, before *page.CursorKey) (*types.CustomDomainConnection, error) } type PeopleConnectionResolver interface { TotalCount(ctx context.Context, obj *types.PeopleConnection) (int, error) @@ -2671,6 +2717,13 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.complexity.CreateControlSnapshotMappingPayload.SnapshotEdge(childComplexity), true + case "CreateCustomDomainPayload.customDomainEdge": + if e.complexity.CreateCustomDomainPayload.CustomDomainEdge == nil { + break + } + + return e.complexity.CreateCustomDomainPayload.CustomDomainEdge(childComplexity), true + case "CreateDatumPayload.datumEdge": if e.complexity.CreateDatumPayload.DatumEdge == nil { break @@ -2860,6 +2913,146 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.complexity.CreateVendorServicePayload.VendorServiceEdge(childComplexity), true + case "CustomDomain.createdAt": + if e.complexity.CustomDomain.CreatedAt == nil { + break + } + + return e.complexity.CustomDomain.CreatedAt(childComplexity), true + + case "CustomDomain.dnsRecords": + if e.complexity.CustomDomain.DNSRecords == nil { + break + } + + return e.complexity.CustomDomain.DNSRecords(childComplexity), true + + case "CustomDomain.domain": + if e.complexity.CustomDomain.Domain == nil { + break + } + + return e.complexity.CustomDomain.Domain(childComplexity), true + + case "CustomDomain.id": + if e.complexity.CustomDomain.ID == nil { + break + } + + return e.complexity.CustomDomain.ID(childComplexity), true + + case "CustomDomain.isActive": + if e.complexity.CustomDomain.IsActive == nil { + break + } + + return e.complexity.CustomDomain.IsActive(childComplexity), true + + case "CustomDomain.organization": + if e.complexity.CustomDomain.Organization == nil { + break + } + + return e.complexity.CustomDomain.Organization(childComplexity), true + + case "CustomDomain.sslExpiresAt": + if e.complexity.CustomDomain.SslExpiresAt == nil { + break + } + + return e.complexity.CustomDomain.SslExpiresAt(childComplexity), true + + case "CustomDomain.sslStatus": + if e.complexity.CustomDomain.SslStatus == nil { + break + } + + return e.complexity.CustomDomain.SslStatus(childComplexity), true + + case "CustomDomain.updatedAt": + if e.complexity.CustomDomain.UpdatedAt == nil { + break + } + + return e.complexity.CustomDomain.UpdatedAt(childComplexity), true + + case "CustomDomain.verifiedAt": + if e.complexity.CustomDomain.VerifiedAt == nil { + break + } + + return e.complexity.CustomDomain.VerifiedAt(childComplexity), true + + case "CustomDomainConnection.edges": + if e.complexity.CustomDomainConnection.Edges == nil { + break + } + + return e.complexity.CustomDomainConnection.Edges(childComplexity), true + + case "CustomDomainConnection.pageInfo": + if e.complexity.CustomDomainConnection.PageInfo == nil { + break + } + + return e.complexity.CustomDomainConnection.PageInfo(childComplexity), true + + case "CustomDomainConnection.totalCount": + if e.complexity.CustomDomainConnection.TotalCount == nil { + break + } + + return e.complexity.CustomDomainConnection.TotalCount(childComplexity), true + + case "CustomDomainEdge.cursor": + if e.complexity.CustomDomainEdge.Cursor == nil { + break + } + + return e.complexity.CustomDomainEdge.Cursor(childComplexity), true + + case "CustomDomainEdge.node": + if e.complexity.CustomDomainEdge.Node == nil { + break + } + + return e.complexity.CustomDomainEdge.Node(childComplexity), true + + case "DNSRecordInstruction.name": + if e.complexity.DNSRecordInstruction.Name == nil { + break + } + + return e.complexity.DNSRecordInstruction.Name(childComplexity), true + + case "DNSRecordInstruction.purpose": + if e.complexity.DNSRecordInstruction.Purpose == nil { + break + } + + return e.complexity.DNSRecordInstruction.Purpose(childComplexity), true + + case "DNSRecordInstruction.ttl": + if e.complexity.DNSRecordInstruction.TTL == nil { + break + } + + return e.complexity.DNSRecordInstruction.TTL(childComplexity), true + + case "DNSRecordInstruction.type": + if e.complexity.DNSRecordInstruction.Type == nil { + break + } + + return e.complexity.DNSRecordInstruction.Type(childComplexity), true + + case "DNSRecordInstruction.value": + if e.complexity.DNSRecordInstruction.Value == nil { + break + } + + return e.complexity.DNSRecordInstruction.Value(childComplexity), true + case "Datum.createdAt": if e.complexity.Datum.CreatedAt == nil { break @@ -3054,6 +3247,13 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.complexity.DeleteControlSnapshotMappingPayload.DeletedSnapshotID(childComplexity), true + case "DeleteCustomDomainPayload.deletedCustomDomainId": + if e.complexity.DeleteCustomDomainPayload.DeletedCustomDomainID == nil { + break + } + + return e.complexity.DeleteCustomDomainPayload.DeletedCustomDomainID(childComplexity), true + case "DeleteDatumPayload.deletedDatumId": if e.complexity.DeleteDatumPayload.DeletedDatumID == nil { break @@ -4217,6 +4417,18 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.complexity.Mutation.CreateControlSnapshotMapping(childComplexity, args["input"].(types.CreateControlSnapshotMappingInput)), true + case "Mutation.createCustomDomain": + if e.complexity.Mutation.CreateCustomDomain == nil { + break + } + + args, err := ec.field_Mutation_createCustomDomain_args(ctx, rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.CreateCustomDomain(childComplexity, args["input"].(types.CreateCustomDomainInput)), true + case "Mutation.createDatum": if e.complexity.Mutation.CreateDatum == nil { break @@ -4589,6 +4801,18 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.complexity.Mutation.DeleteControlSnapshotMapping(childComplexity, args["input"].(types.DeleteControlSnapshotMappingInput)), true + case "Mutation.deleteCustomDomain": + if e.complexity.Mutation.DeleteCustomDomain == nil { + break + } + + args, err := ec.field_Mutation_deleteCustomDomain_args(ctx, rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.DeleteCustomDomain(childComplexity, args["input"].(types.DeleteCustomDomainInput)), true + case "Mutation.deleteDatum": if e.complexity.Mutation.DeleteDatum == nil { break @@ -5752,6 +5976,18 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.complexity.Organization.CreatedAt(childComplexity), true + case "Organization.customDomains": + if e.complexity.Organization.CustomDomains == nil { + break + } + + args, err := ec.field_Organization_customDomains_args(ctx, rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Organization.CustomDomains(childComplexity, args["first"].(*int), args["after"].(*page.CursorKey), args["last"].(*int), args["before"].(*page.CursorKey)), true + case "Organization.data": if e.complexity.Organization.Data == nil { break @@ -8302,6 +8538,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec.unmarshalInputCreateControlInput, ec.unmarshalInputCreateControlMeasureMappingInput, ec.unmarshalInputCreateControlSnapshotMappingInput, + ec.unmarshalInputCreateCustomDomainInput, ec.unmarshalInputCreateDatumInput, ec.unmarshalInputCreateDocumentInput, ec.unmarshalInputCreateDraftDocumentVersionInput, @@ -8336,6 +8573,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec.unmarshalInputDeleteControlInput, ec.unmarshalInputDeleteControlMeasureMappingInput, ec.unmarshalInputDeleteControlSnapshotMappingInput, + ec.unmarshalInputDeleteCustomDomainInput, ec.unmarshalInputDeleteDatumInput, ec.unmarshalInputDeleteDocumentInput, ec.unmarshalInputDeleteDraftDocumentVersionInput, @@ -8677,17 +8915,11 @@ enum AuditState value: "github.com/getprobo/probo/pkg/coredata.AuditStateInProgress" ) COMPLETED - @goEnum( - value: "github.com/getprobo/probo/pkg/coredata.AuditStateCompleted" - ) + @goEnum(value: "github.com/getprobo/probo/pkg/coredata.AuditStateCompleted") REJECTED - @goEnum( - value: "github.com/getprobo/probo/pkg/coredata.AuditStateRejected" - ) + @goEnum(value: "github.com/getprobo/probo/pkg/coredata.AuditStateRejected") OUTDATED - @goEnum( - value: "github.com/getprobo/probo/pkg/coredata.AuditStateOutdated" - ) + @goEnum(value: "github.com/getprobo/probo/pkg/coredata.AuditStateOutdated") } enum TrustCenterVisibility @@ -8707,7 +8939,9 @@ enum TrustCenterVisibility } enum NonconformityStatus - @goModel(model: "github.com/getprobo/probo/pkg/coredata.NonconformityStatus") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.NonconformityStatus" + ) { OPEN @goEnum( value: "github.com/getprobo/probo/pkg/coredata.NonconformityStatusOpen" @@ -8739,7 +8973,9 @@ enum ObligationStatus } enum ContinualImprovementStatus - @goModel(model: "github.com/getprobo/probo/pkg/coredata.ContinualImprovementStatus") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.ContinualImprovementStatus" + ) { OPEN @goEnum( value: "github.com/getprobo/probo/pkg/coredata.ContinualImprovementStatusOpen" @@ -8755,7 +8991,9 @@ enum ContinualImprovementStatus } enum ContinualImprovementPriority - @goModel(model: "github.com/getprobo/probo/pkg/coredata.ContinualImprovementPriority") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.ContinualImprovementPriority" + ) { LOW @goEnum( value: "github.com/getprobo/probo/pkg/coredata.ContinualImprovementPriorityLow" @@ -8771,7 +9009,9 @@ enum ContinualImprovementPriority } enum ProcessingActivitySpecialOrCriminalData - @goModel(model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivitySpecialOrCriminalData") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivitySpecialOrCriminalData" + ) { YES @goEnum( value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivitySpecialOrCriminalDataYes" @@ -8787,7 +9027,9 @@ enum ProcessingActivitySpecialOrCriminalData } enum ProcessingActivityLawfulBasis - @goModel(model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityLawfulBasis") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityLawfulBasis" + ) { LEGITIMATE_INTEREST @goEnum( value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityLawfulBasisLegitimateInterest" @@ -8815,7 +9057,9 @@ enum ProcessingActivityLawfulBasis } enum ProcessingActivityTransferSafeguards - @goModel(model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityTransferSafeguards") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityTransferSafeguards" + ) { STANDARD_CONTRACTUAL_CLAUSES @goEnum( value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityTransferSafeguardsStandardContractualClauses" @@ -8843,7 +9087,9 @@ enum ProcessingActivityTransferSafeguards } enum ProcessingActivityDataProtectionImpactAssessment - @goModel(model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityDataProtectionImpactAssessment") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityDataProtectionImpactAssessment" + ) { NEEDED @goEnum( value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityDataProtectionImpactAssessmentNeeded" @@ -8855,7 +9101,9 @@ enum ProcessingActivityDataProtectionImpactAssessment } enum ProcessingActivityTransferImpactAssessment - @goModel(model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityTransferImpactAssessment") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityTransferImpactAssessment" + ) { NEEDED @goEnum( value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityTransferImpactAssessmentNeeded" @@ -9574,7 +9822,9 @@ enum AuditOrderField } enum NonconformityOrderField - @goModel(model: "github.com/getprobo/probo/pkg/coredata.NonconformityOrderField") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.NonconformityOrderField" + ) { CREATED_AT @goEnum( value: "github.com/getprobo/probo/pkg/coredata.NonconformityOrderFieldCreatedAt" @@ -9598,7 +9848,9 @@ enum NonconformityOrderField } enum ObligationOrderField - @goModel(model: "github.com/getprobo/probo/pkg/coredata.ObligationOrderField") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.ObligationOrderField" + ) { CREATED_AT @goEnum( value: "github.com/getprobo/probo/pkg/coredata.ObligationOrderFieldCreatedAt" @@ -9618,7 +9870,9 @@ enum ObligationOrderField } enum ContinualImprovementOrderField - @goModel(model: "github.com/getprobo/probo/pkg/coredata.ContinualImprovementOrderField") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.ContinualImprovementOrderField" + ) { CREATED_AT @goEnum( value: "github.com/getprobo/probo/pkg/coredata.ContinualImprovementOrderFieldCreatedAt" @@ -9642,7 +9896,9 @@ enum ContinualImprovementOrderField } enum ProcessingActivityOrderField - @goModel(model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityOrderField") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityOrderField" + ) { CREATED_AT @goEnum( value: "github.com/getprobo/probo/pkg/coredata.ProcessingActivityOrderFieldCreatedAt" @@ -9654,7 +9910,9 @@ enum ProcessingActivityOrderField } enum TrustCenterAccessOrderField - @goModel(model: "github.com/getprobo/probo/pkg/coredata.TrustCenterAccessOrderField") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.TrustCenterAccessOrderField" + ) { CREATED_AT @goEnum( value: "github.com/getprobo/probo/pkg/coredata.TrustCenterAccessOrderFieldCreatedAt" @@ -9670,7 +9928,9 @@ enum TrustCenterDocumentAccessOrderField } enum TrustCenterReferenceOrderField - @goModel(model: "github.com/getprobo/probo/pkg/coredata.TrustCenterReferenceOrderField") { + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.TrustCenterReferenceOrderField" + ) { NAME @goEnum( value: "github.com/getprobo/probo/pkg/coredata.TrustCenterReferenceOrderFieldName" @@ -9688,21 +9948,15 @@ enum TrustCenterReferenceOrderField enum SnapshotsType @goModel(model: "github.com/getprobo/probo/pkg/coredata.SnapshotsType") { RISKS - @goEnum( - value: "github.com/getprobo/probo/pkg/coredata.SnapshotsTypeRisks" - ) + @goEnum(value: "github.com/getprobo/probo/pkg/coredata.SnapshotsTypeRisks") VENDORS @goEnum( value: "github.com/getprobo/probo/pkg/coredata.SnapshotsTypeVendors" ) ASSETS - @goEnum( - value: "github.com/getprobo/probo/pkg/coredata.SnapshotsTypeAssets" - ) + @goEnum(value: "github.com/getprobo/probo/pkg/coredata.SnapshotsTypeAssets") DATA - @goEnum( - value: "github.com/getprobo/probo/pkg/coredata.SnapshotsTypeData" - ) + @goEnum(value: "github.com/getprobo/probo/pkg/coredata.SnapshotsTypeData") NONCONFORMITIES @goEnum( value: "github.com/getprobo/probo/pkg/coredata.SnapshotsTypeNonconformities" @@ -10186,6 +10440,13 @@ type Organization implements Node { trustCenter: TrustCenter @goField(forceResolver: true) + customDomains( + first: Int + after: CursorKey + last: Int + before: CursorKey + ): CustomDomainConnection! @goField(forceResolver: true) + createdAt: Datetime! updatedAt: Datetime! } @@ -10238,7 +10499,8 @@ type Vendor implements Node { orderBy: VendorComplianceReportOrder ): VendorComplianceReportConnection! @goField(forceResolver: true) - businessAssociateAgreement: VendorBusinessAssociateAgreement @goField(forceResolver: true) + businessAssociateAgreement: VendorBusinessAssociateAgreement + @goField(forceResolver: true) dataPrivacyAgreement: VendorDataPrivacyAgreement @goField(forceResolver: true) contacts( @@ -10819,9 +11081,10 @@ type TrustCenterReference implements Node { updatedAt: Datetime! } -type TrustCenterReferenceConnection @goModel( +type TrustCenterReferenceConnection + @goModel( model: "github.com/getprobo/probo/pkg/server/api/console/v1/types.TrustCenterReferenceConnection" - ){ + ) { totalCount: Int! @goField(forceResolver: true) edges: [TrustCenterReferenceEdge!]! pageInfo: PageInfo! @@ -11153,9 +11416,7 @@ type Mutation { input: DeleteOrganizationInput! ): DeleteOrganizationPayload! - updateTrustCenter( - input: UpdateTrustCenterInput! - ): UpdateTrustCenterPayload! + updateTrustCenter(input: UpdateTrustCenterInput!): UpdateTrustCenterPayload! uploadTrustCenterNDA( input: UploadTrustCenterNDAInput! @@ -11207,14 +11468,26 @@ type Mutation { deleteVendor(input: DeleteVendorInput!): DeleteVendorPayload! # Vendor Contact mutations - createVendorContact(input: CreateVendorContactInput!): CreateVendorContactPayload! - updateVendorContact(input: UpdateVendorContactInput!): UpdateVendorContactPayload! - deleteVendorContact(input: DeleteVendorContactInput!): DeleteVendorContactPayload! + createVendorContact( + input: CreateVendorContactInput! + ): CreateVendorContactPayload! + updateVendorContact( + input: UpdateVendorContactInput! + ): UpdateVendorContactPayload! + deleteVendorContact( + input: DeleteVendorContactInput! + ): DeleteVendorContactPayload! # Vendor Service mutations - createVendorService(input: CreateVendorServiceInput!): CreateVendorServicePayload! - updateVendorService(input: UpdateVendorServiceInput!): UpdateVendorServicePayload! - deleteVendorService(input: DeleteVendorServiceInput!): DeleteVendorServicePayload! + createVendorService( + input: CreateVendorServiceInput! + ): CreateVendorServicePayload! + updateVendorService( + input: UpdateVendorServiceInput! + ): UpdateVendorServicePayload! + deleteVendorService( + input: DeleteVendorServiceInput! + ): DeleteVendorServicePayload! # Framework mutations createFramework(input: CreateFrameworkInput!): CreateFrameworkPayload! @@ -11405,15 +11678,9 @@ type Mutation { ): DeleteNonconformityPayload! # Obligation mutations - createObligation( - input: CreateObligationInput! - ): CreateObligationPayload! - updateObligation( - input: UpdateObligationInput! - ): UpdateObligationPayload! - deleteObligation( - input: DeleteObligationInput! - ): DeleteObligationPayload! + createObligation(input: CreateObligationInput!): CreateObligationPayload! + updateObligation(input: UpdateObligationInput!): UpdateObligationPayload! + deleteObligation(input: DeleteObligationInput!): DeleteObligationPayload! # Continual Improvement mutations createContinualImprovement( @@ -11440,6 +11707,14 @@ type Mutation { # Snapshot mutations createSnapshot(input: CreateSnapshotInput!): CreateSnapshotPayload! deleteSnapshot(input: DeleteSnapshotInput!): DeleteSnapshotPayload! + + # Custom Domain mutations + createCustomDomain( + input: CreateCustomDomainInput! + ): CreateCustomDomainPayload! + deleteCustomDomain( + input: DeleteCustomDomainInput! + ): DeleteCustomDomainPayload! } # Input Types @@ -12923,6 +13198,85 @@ type CreateSnapshotPayload { type DeleteSnapshotPayload { deletedSnapshotId: ID! } + +enum SSLStatus + @goModel( + model: "github.com/getprobo/probo/pkg/coredata.CustomDomainSSLStatus" + ) { + PENDING + @goEnum( + value: "github.com/getprobo/probo/pkg/coredata.CustomDomainSSLStatusPending" + ) + PROVISIONING + @goEnum( + value: "github.com/getprobo/probo/pkg/coredata.CustomDomainSSLStatusProvisioning" + ) + ACTIVE + @goEnum( + value: "github.com/getprobo/probo/pkg/coredata.CustomDomainSSLStatusActive" + ) + RENEWING + @goEnum( + value: "github.com/getprobo/probo/pkg/coredata.CustomDomainSSLStatusRenewing" + ) + EXPIRED + @goEnum( + value: "github.com/getprobo/probo/pkg/coredata.CustomDomainSSLStatusExpired" + ) + FAILED + @goEnum( + value: "github.com/getprobo/probo/pkg/coredata.CustomDomainSSLStatusFailed" + ) +} + +type CustomDomain implements Node { + id: ID! + organization: Organization! + domain: String! + sslStatus: SSLStatus! + sslExpiresAt: Datetime + isActive: Boolean! + dnsRecords: [DNSRecordInstruction!]! + createdAt: Datetime! + updatedAt: Datetime! + verifiedAt: Datetime +} + +type DNSRecordInstruction { + type: String! + name: String! + value: String! + ttl: Int! + purpose: String! +} + +type CustomDomainConnection { + edges: [CustomDomainEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type CustomDomainEdge { + cursor: CursorKey! + node: CustomDomain! +} + +input CreateCustomDomainInput { + organizationId: ID! + domain: String! +} + +input DeleteCustomDomainInput { + domainId: ID! +} + +type CreateCustomDomainPayload { + customDomainEdge: CustomDomainEdge! +} + +type DeleteCustomDomainPayload { + deletedCustomDomainId: ID! +} `, BuiltIn: false}, } var parsedSchema = gqlparser.MustLoadSchema(sources...) @@ -14868,6 +15222,29 @@ func (ec *executionContext) field_Mutation_createControl_argsInput( return zeroVal, nil } +func (ec *executionContext) field_Mutation_createCustomDomain_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { + var err error + args := map[string]any{} + arg0, err := ec.field_Mutation_createCustomDomain_argsInput(ctx, rawArgs) + if err != nil { + return nil, err + } + args["input"] = arg0 + return args, nil +} +func (ec *executionContext) field_Mutation_createCustomDomain_argsInput( + ctx context.Context, + rawArgs map[string]any, +) (types.CreateCustomDomainInput, error) { + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + if tmp, ok := rawArgs["input"]; ok { + return ec.unmarshalNCreateCustomDomainInput2githubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐCreateCustomDomainInput(ctx, tmp) + } + + var zeroVal types.CreateCustomDomainInput + return zeroVal, nil +} + func (ec *executionContext) field_Mutation_createDatum_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -15581,6 +15958,29 @@ func (ec *executionContext) field_Mutation_deleteControl_argsInput( return zeroVal, nil } +func (ec *executionContext) field_Mutation_deleteCustomDomain_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { + var err error + args := map[string]any{} + arg0, err := ec.field_Mutation_deleteCustomDomain_argsInput(ctx, rawArgs) + if err != nil { + return nil, err + } + args["input"] = arg0 + return args, nil +} +func (ec *executionContext) field_Mutation_deleteCustomDomain_argsInput( + ctx context.Context, + rawArgs map[string]any, +) (types.DeleteCustomDomainInput, error) { + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + if tmp, ok := rawArgs["input"]; ok { + return ec.unmarshalNDeleteCustomDomainInput2githubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐDeleteCustomDomainInput(ctx, tmp) + } + + var zeroVal types.DeleteCustomDomainInput + return zeroVal, nil +} + func (ec *executionContext) field_Mutation_deleteDatum_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -17674,6 +18074,83 @@ func (ec *executionContext) field_Organization_controls_argsFilter( return zeroVal, nil } +func (ec *executionContext) field_Organization_customDomains_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { + var err error + args := map[string]any{} + arg0, err := ec.field_Organization_customDomains_argsFirst(ctx, rawArgs) + if err != nil { + return nil, err + } + args["first"] = arg0 + arg1, err := ec.field_Organization_customDomains_argsAfter(ctx, rawArgs) + if err != nil { + return nil, err + } + args["after"] = arg1 + arg2, err := ec.field_Organization_customDomains_argsLast(ctx, rawArgs) + if err != nil { + return nil, err + } + args["last"] = arg2 + arg3, err := ec.field_Organization_customDomains_argsBefore(ctx, rawArgs) + if err != nil { + return nil, err + } + args["before"] = arg3 + return args, nil +} +func (ec *executionContext) field_Organization_customDomains_argsFirst( + ctx context.Context, + rawArgs map[string]any, +) (*int, error) { + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("first")) + if tmp, ok := rawArgs["first"]; ok { + return ec.unmarshalOInt2ᚖint(ctx, tmp) + } + + var zeroVal *int + return zeroVal, nil +} + +func (ec *executionContext) field_Organization_customDomains_argsAfter( + ctx context.Context, + rawArgs map[string]any, +) (*page.CursorKey, error) { + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) + if tmp, ok := rawArgs["after"]; ok { + return ec.unmarshalOCursorKey2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋpageᚐCursorKey(ctx, tmp) + } + + var zeroVal *page.CursorKey + return zeroVal, nil +} + +func (ec *executionContext) field_Organization_customDomains_argsLast( + ctx context.Context, + rawArgs map[string]any, +) (*int, error) { + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("last")) + if tmp, ok := rawArgs["last"]; ok { + return ec.unmarshalOInt2ᚖint(ctx, tmp) + } + + var zeroVal *int + return zeroVal, nil +} + +func (ec *executionContext) field_Organization_customDomains_argsBefore( + ctx context.Context, + rawArgs map[string]any, +) (*page.CursorKey, error) { + ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("before")) + if tmp, ok := rawArgs["before"]; ok { + return ec.unmarshalOCursorKey2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋpageᚐCursorKey(ctx, tmp) + } + + var zeroVal *page.CursorKey + return zeroVal, nil +} + func (ec *executionContext) field_Organization_data_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -21311,6 +21788,8 @@ func (ec *executionContext) fieldContext_Asset_organization(_ context.Context, f return ec.fieldContext_Organization_snapshots(ctx, field) case "trustCenter": return ec.fieldContext_Organization_trustCenter(ctx, field) + case "customDomains": + return ec.fieldContext_Organization_customDomains(ctx, field) case "createdAt": return ec.fieldContext_Organization_createdAt(ctx, field) case "updatedAt": @@ -21918,6 +22397,8 @@ func (ec *executionContext) fieldContext_Audit_organization(_ context.Context, f return ec.fieldContext_Organization_snapshots(ctx, field) case "trustCenter": return ec.fieldContext_Organization_trustCenter(ctx, field) + case "customDomains": + return ec.fieldContext_Organization_customDomains(ctx, field) case "createdAt": return ec.fieldContext_Organization_createdAt(ctx, field) case "updatedAt": @@ -23643,6 +24124,8 @@ func (ec *executionContext) fieldContext_ContinualImprovement_organization(_ con return ec.fieldContext_Organization_snapshots(ctx, field) case "trustCenter": return ec.fieldContext_Organization_trustCenter(ctx, field) + case "customDomains": + return ec.fieldContext_Organization_customDomains(ctx, field) case "createdAt": return ec.fieldContext_Organization_createdAt(ctx, field) case "updatedAt": @@ -25852,6 +26335,56 @@ func (ec *executionContext) fieldContext_CreateControlSnapshotMappingPayload_sna return fc, nil } +func (ec *executionContext) _CreateCustomDomainPayload_customDomainEdge(ctx context.Context, field graphql.CollectedField, obj *types.CreateCustomDomainPayload) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CreateCustomDomainPayload_customDomainEdge(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.CustomDomainEdge, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*types.CustomDomainEdge) + fc.Result = res + return ec.marshalNCustomDomainEdge2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐCustomDomainEdge(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CreateCustomDomainPayload_customDomainEdge(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CreateCustomDomainPayload", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "cursor": + return ec.fieldContext_CustomDomainEdge_cursor(ctx, field) + case "node": + return ec.fieldContext_CustomDomainEdge_node(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type CustomDomainEdge", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) _CreateDatumPayload_datumEdge(ctx context.Context, field graphql.CollectedField, obj *types.CreateDatumPayload) (ret graphql.Marshaler) { fc, err := ec.fieldContext_CreateDatumPayload_datumEdge(ctx, field) if err != nil { @@ -27202,6 +27735,990 @@ func (ec *executionContext) fieldContext_CreateVendorServicePayload_vendorServic return fc, nil } +func (ec *executionContext) _CustomDomain_id(ctx context.Context, field graphql.CollectedField, obj *types.CustomDomain) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CustomDomain_id(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.ID, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(gid.GID) + fc.Result = res + return ec.marshalNID2githubᚗcomᚋgetproboᚋproboᚋpkgᚋgidᚐGID(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CustomDomain_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CustomDomain", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _CustomDomain_organization(ctx context.Context, field graphql.CollectedField, obj *types.CustomDomain) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CustomDomain_organization(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.Organization, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*types.Organization) + fc.Result = res + return ec.marshalNOrganization2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐOrganization(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CustomDomain_organization(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CustomDomain", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_Organization_id(ctx, field) + case "name": + return ec.fieldContext_Organization_name(ctx, field) + case "logoUrl": + return ec.fieldContext_Organization_logoUrl(ctx, field) + case "description": + return ec.fieldContext_Organization_description(ctx, field) + case "websiteUrl": + return ec.fieldContext_Organization_websiteUrl(ctx, field) + case "email": + return ec.fieldContext_Organization_email(ctx, field) + case "headquarterAddress": + return ec.fieldContext_Organization_headquarterAddress(ctx, field) + case "users": + return ec.fieldContext_Organization_users(ctx, field) + case "connectors": + return ec.fieldContext_Organization_connectors(ctx, field) + case "frameworks": + return ec.fieldContext_Organization_frameworks(ctx, field) + case "controls": + return ec.fieldContext_Organization_controls(ctx, field) + case "vendors": + return ec.fieldContext_Organization_vendors(ctx, field) + case "peoples": + return ec.fieldContext_Organization_peoples(ctx, field) + case "documents": + return ec.fieldContext_Organization_documents(ctx, field) + case "measures": + return ec.fieldContext_Organization_measures(ctx, field) + case "risks": + return ec.fieldContext_Organization_risks(ctx, field) + case "tasks": + return ec.fieldContext_Organization_tasks(ctx, field) + case "assets": + return ec.fieldContext_Organization_assets(ctx, field) + case "data": + return ec.fieldContext_Organization_data(ctx, field) + case "audits": + return ec.fieldContext_Organization_audits(ctx, field) + case "nonconformities": + return ec.fieldContext_Organization_nonconformities(ctx, field) + case "obligations": + return ec.fieldContext_Organization_obligations(ctx, field) + case "continualImprovements": + return ec.fieldContext_Organization_continualImprovements(ctx, field) + case "processingActivities": + return ec.fieldContext_Organization_processingActivities(ctx, field) + case "snapshots": + return ec.fieldContext_Organization_snapshots(ctx, field) + case "trustCenter": + return ec.fieldContext_Organization_trustCenter(ctx, field) + case "customDomains": + return ec.fieldContext_Organization_customDomains(ctx, field) + case "createdAt": + return ec.fieldContext_Organization_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_Organization_updatedAt(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Organization", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _CustomDomain_domain(ctx context.Context, field graphql.CollectedField, obj *types.CustomDomain) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CustomDomain_domain(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.Domain, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CustomDomain_domain(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CustomDomain", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _CustomDomain_sslStatus(ctx context.Context, field graphql.CollectedField, obj *types.CustomDomain) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CustomDomain_sslStatus(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.SslStatus, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(coredata.CustomDomainSSLStatus) + fc.Result = res + return ec.marshalNSSLStatus2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCustomDomainSSLStatus(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CustomDomain_sslStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CustomDomain", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type SSLStatus does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _CustomDomain_sslExpiresAt(ctx context.Context, field graphql.CollectedField, obj *types.CustomDomain) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CustomDomain_sslExpiresAt(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.SslExpiresAt, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*time.Time) + fc.Result = res + return ec.marshalODatetime2ᚖtimeᚐTime(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CustomDomain_sslExpiresAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CustomDomain", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Datetime does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _CustomDomain_isActive(ctx context.Context, field graphql.CollectedField, obj *types.CustomDomain) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CustomDomain_isActive(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.IsActive, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CustomDomain_isActive(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CustomDomain", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _CustomDomain_dnsRecords(ctx context.Context, field graphql.CollectedField, obj *types.CustomDomain) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CustomDomain_dnsRecords(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.DNSRecords, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]*types.DNSRecordInstruction) + fc.Result = res + return ec.marshalNDNSRecordInstruction2ᚕᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐDNSRecordInstructionᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CustomDomain_dnsRecords(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CustomDomain", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "type": + return ec.fieldContext_DNSRecordInstruction_type(ctx, field) + case "name": + return ec.fieldContext_DNSRecordInstruction_name(ctx, field) + case "value": + return ec.fieldContext_DNSRecordInstruction_value(ctx, field) + case "ttl": + return ec.fieldContext_DNSRecordInstruction_ttl(ctx, field) + case "purpose": + return ec.fieldContext_DNSRecordInstruction_purpose(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DNSRecordInstruction", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _CustomDomain_createdAt(ctx context.Context, field graphql.CollectedField, obj *types.CustomDomain) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CustomDomain_createdAt(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.CreatedAt, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(time.Time) + fc.Result = res + return ec.marshalNDatetime2timeᚐTime(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CustomDomain_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CustomDomain", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Datetime does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _CustomDomain_updatedAt(ctx context.Context, field graphql.CollectedField, obj *types.CustomDomain) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CustomDomain_updatedAt(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.UpdatedAt, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(time.Time) + fc.Result = res + return ec.marshalNDatetime2timeᚐTime(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CustomDomain_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CustomDomain", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Datetime does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _CustomDomain_verifiedAt(ctx context.Context, field graphql.CollectedField, obj *types.CustomDomain) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CustomDomain_verifiedAt(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.VerifiedAt, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*time.Time) + fc.Result = res + return ec.marshalODatetime2ᚖtimeᚐTime(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CustomDomain_verifiedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CustomDomain", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Datetime does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _CustomDomainConnection_edges(ctx context.Context, field graphql.CollectedField, obj *types.CustomDomainConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CustomDomainConnection_edges(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.Edges, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]*types.CustomDomainEdge) + fc.Result = res + return ec.marshalNCustomDomainEdge2ᚕᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐCustomDomainEdgeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CustomDomainConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CustomDomainConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "cursor": + return ec.fieldContext_CustomDomainEdge_cursor(ctx, field) + case "node": + return ec.fieldContext_CustomDomainEdge_node(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type CustomDomainEdge", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _CustomDomainConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *types.CustomDomainConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CustomDomainConnection_pageInfo(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.PageInfo, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*types.PageInfo) + fc.Result = res + return ec.marshalNPageInfo2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐPageInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CustomDomainConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CustomDomainConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _CustomDomainConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *types.CustomDomainConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CustomDomainConnection_totalCount(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.TotalCount, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CustomDomainConnection_totalCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CustomDomainConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _CustomDomainEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *types.CustomDomainEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CustomDomainEdge_cursor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.Cursor, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(page.CursorKey) + fc.Result = res + return ec.marshalNCursorKey2githubᚗcomᚋgetproboᚋproboᚋpkgᚋpageᚐCursorKey(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CustomDomainEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CustomDomainEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type CursorKey does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _CustomDomainEdge_node(ctx context.Context, field graphql.CollectedField, obj *types.CustomDomainEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CustomDomainEdge_node(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.Node, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*types.CustomDomain) + fc.Result = res + return ec.marshalNCustomDomain2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐCustomDomain(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CustomDomainEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CustomDomainEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_CustomDomain_id(ctx, field) + case "organization": + return ec.fieldContext_CustomDomain_organization(ctx, field) + case "domain": + return ec.fieldContext_CustomDomain_domain(ctx, field) + case "sslStatus": + return ec.fieldContext_CustomDomain_sslStatus(ctx, field) + case "sslExpiresAt": + return ec.fieldContext_CustomDomain_sslExpiresAt(ctx, field) + case "isActive": + return ec.fieldContext_CustomDomain_isActive(ctx, field) + case "dnsRecords": + return ec.fieldContext_CustomDomain_dnsRecords(ctx, field) + case "createdAt": + return ec.fieldContext_CustomDomain_createdAt(ctx, field) + case "updatedAt": + return ec.fieldContext_CustomDomain_updatedAt(ctx, field) + case "verifiedAt": + return ec.fieldContext_CustomDomain_verifiedAt(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type CustomDomain", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _DNSRecordInstruction_type(ctx context.Context, field graphql.CollectedField, obj *types.DNSRecordInstruction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DNSRecordInstruction_type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.Type, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_DNSRecordInstruction_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "DNSRecordInstruction", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _DNSRecordInstruction_name(ctx context.Context, field graphql.CollectedField, obj *types.DNSRecordInstruction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DNSRecordInstruction_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_DNSRecordInstruction_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "DNSRecordInstruction", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _DNSRecordInstruction_value(ctx context.Context, field graphql.CollectedField, obj *types.DNSRecordInstruction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DNSRecordInstruction_value(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.Value, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_DNSRecordInstruction_value(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "DNSRecordInstruction", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _DNSRecordInstruction_ttl(ctx context.Context, field graphql.CollectedField, obj *types.DNSRecordInstruction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DNSRecordInstruction_ttl(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.TTL, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_DNSRecordInstruction_ttl(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "DNSRecordInstruction", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _DNSRecordInstruction_purpose(ctx context.Context, field graphql.CollectedField, obj *types.DNSRecordInstruction) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DNSRecordInstruction_purpose(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.Purpose, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_DNSRecordInstruction_purpose(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "DNSRecordInstruction", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _Datum_id(ctx context.Context, field graphql.CollectedField, obj *types.Datum) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Datum_id(ctx, field) if err != nil { @@ -27595,6 +29112,8 @@ func (ec *executionContext) fieldContext_Datum_organization(_ context.Context, f return ec.fieldContext_Organization_snapshots(ctx, field) case "trustCenter": return ec.fieldContext_Organization_trustCenter(ctx, field) + case "customDomains": + return ec.fieldContext_Organization_customDomains(ctx, field) case "createdAt": return ec.fieldContext_Organization_createdAt(ctx, field) case "updatedAt": @@ -28550,6 +30069,50 @@ func (ec *executionContext) fieldContext_DeleteControlSnapshotMappingPayload_del return fc, nil } +func (ec *executionContext) _DeleteCustomDomainPayload_deletedCustomDomainId(ctx context.Context, field graphql.CollectedField, obj *types.DeleteCustomDomainPayload) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DeleteCustomDomainPayload_deletedCustomDomainId(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return obj.DeletedCustomDomainID, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(gid.GID) + fc.Result = res + return ec.marshalNID2githubᚗcomᚋgetproboᚋproboᚋpkgᚋgidᚐGID(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_DeleteCustomDomainPayload_deletedCustomDomainId(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "DeleteCustomDomainPayload", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _DeleteDatumPayload_deletedDatumId(ctx context.Context, field graphql.CollectedField, obj *types.DeleteDatumPayload) (ret graphql.Marshaler) { fc, err := ec.fieldContext_DeleteDatumPayload_deletedDatumId(ctx, field) if err != nil { @@ -30266,6 +31829,8 @@ func (ec *executionContext) fieldContext_Document_organization(_ context.Context return ec.fieldContext_Organization_snapshots(ctx, field) case "trustCenter": return ec.fieldContext_Organization_trustCenter(ctx, field) + case "customDomains": + return ec.fieldContext_Organization_customDomains(ctx, field) case "createdAt": return ec.fieldContext_Organization_createdAt(ctx, field) case "updatedAt": @@ -33586,6 +35151,8 @@ func (ec *executionContext) fieldContext_Framework_organization(_ context.Contex return ec.fieldContext_Organization_snapshots(ctx, field) case "trustCenter": return ec.fieldContext_Organization_trustCenter(ctx, field) + case "customDomains": + return ec.fieldContext_Organization_customDomains(ctx, field) case "createdAt": return ec.fieldContext_Organization_createdAt(ctx, field) case "updatedAt": @@ -41921,6 +43488,124 @@ func (ec *executionContext) fieldContext_Mutation_deleteSnapshot(ctx context.Con return fc, nil } +func (ec *executionContext) _Mutation_createCustomDomain(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_createCustomDomain(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().CreateCustomDomain(rctx, fc.Args["input"].(types.CreateCustomDomainInput)) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*types.CreateCustomDomainPayload) + fc.Result = res + return ec.marshalNCreateCustomDomainPayload2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐCreateCustomDomainPayload(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_createCustomDomain(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "customDomainEdge": + return ec.fieldContext_CreateCustomDomainPayload_customDomainEdge(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type CreateCustomDomainPayload", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_createCustomDomain_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_deleteCustomDomain(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_deleteCustomDomain(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().DeleteCustomDomain(rctx, fc.Args["input"].(types.DeleteCustomDomainInput)) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*types.DeleteCustomDomainPayload) + fc.Result = res + return ec.marshalNDeleteCustomDomainPayload2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐDeleteCustomDomainPayload(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_deleteCustomDomain(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "deletedCustomDomainId": + return ec.fieldContext_DeleteCustomDomainPayload_deletedCustomDomainId(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DeleteCustomDomainPayload", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_deleteCustomDomain_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + func (ec *executionContext) _Nonconformity_id(ctx context.Context, field graphql.CollectedField, obj *types.Nonconformity) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Nonconformity_id(ctx, field) if err != nil { @@ -42097,6 +43782,8 @@ func (ec *executionContext) fieldContext_Nonconformity_organization(_ context.Co return ec.fieldContext_Organization_snapshots(ctx, field) case "trustCenter": return ec.fieldContext_Organization_trustCenter(ctx, field) + case "customDomains": + return ec.fieldContext_Organization_customDomains(ctx, field) case "createdAt": return ec.fieldContext_Organization_createdAt(ctx, field) case "updatedAt": @@ -43156,6 +44843,8 @@ func (ec *executionContext) fieldContext_Obligation_organization(_ context.Conte return ec.fieldContext_Organization_snapshots(ctx, field) case "trustCenter": return ec.fieldContext_Organization_trustCenter(ctx, field) + case "customDomains": + return ec.fieldContext_Organization_customDomains(ctx, field) case "createdAt": return ec.fieldContext_Organization_createdAt(ctx, field) case "updatedAt": @@ -45406,6 +47095,69 @@ func (ec *executionContext) fieldContext_Organization_trustCenter(_ context.Cont return fc, nil } +func (ec *executionContext) _Organization_customDomains(ctx context.Context, field graphql.CollectedField, obj *types.Organization) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Organization_customDomains(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (any, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Organization().CustomDomains(rctx, obj, fc.Args["first"].(*int), fc.Args["after"].(*page.CursorKey), fc.Args["last"].(*int), fc.Args["before"].(*page.CursorKey)) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*types.CustomDomainConnection) + fc.Result = res + return ec.marshalNCustomDomainConnection2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐCustomDomainConnection(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Organization_customDomains(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Organization", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "edges": + return ec.fieldContext_CustomDomainConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_CustomDomainConnection_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_CustomDomainConnection_totalCount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type CustomDomainConnection", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Organization_customDomains_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + func (ec *executionContext) _Organization_createdAt(ctx context.Context, field graphql.CollectedField, obj *types.Organization) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Organization_createdAt(ctx, field) if err != nil { @@ -45733,6 +47485,8 @@ func (ec *executionContext) fieldContext_OrganizationEdge_node(_ context.Context return ec.fieldContext_Organization_snapshots(ctx, field) case "trustCenter": return ec.fieldContext_Organization_trustCenter(ctx, field) + case "customDomains": + return ec.fieldContext_Organization_customDomains(ctx, field) case "createdAt": return ec.fieldContext_Organization_createdAt(ctx, field) case "updatedAt": @@ -46820,6 +48574,8 @@ func (ec *executionContext) fieldContext_ProcessingActivity_organization(_ conte return ec.fieldContext_Organization_snapshots(ctx, field) case "trustCenter": return ec.fieldContext_Organization_trustCenter(ctx, field) + case "customDomains": + return ec.fieldContext_Organization_customDomains(ctx, field) case "createdAt": return ec.fieldContext_Organization_createdAt(ctx, field) case "updatedAt": @@ -49495,6 +51251,8 @@ func (ec *executionContext) fieldContext_Risk_organization(_ context.Context, fi return ec.fieldContext_Organization_snapshots(ctx, field) case "trustCenter": return ec.fieldContext_Organization_trustCenter(ctx, field) + case "customDomains": + return ec.fieldContext_Organization_customDomains(ctx, field) case "createdAt": return ec.fieldContext_Organization_createdAt(ctx, field) case "updatedAt": @@ -50393,6 +52151,8 @@ func (ec *executionContext) fieldContext_Snapshot_organization(_ context.Context return ec.fieldContext_Organization_snapshots(ctx, field) case "trustCenter": return ec.fieldContext_Organization_trustCenter(ctx, field) + case "customDomains": + return ec.fieldContext_Organization_customDomains(ctx, field) case "createdAt": return ec.fieldContext_Organization_createdAt(ctx, field) case "updatedAt": @@ -51304,6 +53064,8 @@ func (ec *executionContext) fieldContext_Task_organization(_ context.Context, fi return ec.fieldContext_Organization_snapshots(ctx, field) case "trustCenter": return ec.fieldContext_Organization_trustCenter(ctx, field) + case "customDomains": + return ec.fieldContext_Organization_customDomains(ctx, field) case "createdAt": return ec.fieldContext_Organization_createdAt(ctx, field) case "updatedAt": @@ -52186,6 +53948,8 @@ func (ec *executionContext) fieldContext_TrustCenter_organization(_ context.Cont return ec.fieldContext_Organization_snapshots(ctx, field) case "trustCenter": return ec.fieldContext_Organization_trustCenter(ctx, field) + case "customDomains": + return ec.fieldContext_Organization_customDomains(ctx, field) case "createdAt": return ec.fieldContext_Organization_createdAt(ctx, field) case "updatedAt": @@ -55225,6 +56989,8 @@ func (ec *executionContext) fieldContext_UpdateOrganizationPayload_organization( return ec.fieldContext_Organization_snapshots(ctx, field) case "trustCenter": return ec.fieldContext_Organization_trustCenter(ctx, field) + case "customDomains": + return ec.fieldContext_Organization_customDomains(ctx, field) case "createdAt": return ec.fieldContext_Organization_createdAt(ctx, field) case "updatedAt": @@ -57263,6 +59029,8 @@ func (ec *executionContext) fieldContext_Vendor_organization(_ context.Context, return ec.fieldContext_Organization_snapshots(ctx, field) case "trustCenter": return ec.fieldContext_Organization_trustCenter(ctx, field) + case "customDomains": + return ec.fieldContext_Organization_customDomains(ctx, field) case "createdAt": return ec.fieldContext_Organization_createdAt(ctx, field) case "updatedAt": @@ -65143,6 +66911,40 @@ func (ec *executionContext) unmarshalInputCreateControlSnapshotMappingInput(ctx return it, nil } +func (ec *executionContext) unmarshalInputCreateCustomDomainInput(ctx context.Context, obj any) (types.CreateCustomDomainInput, error) { + var it types.CreateCustomDomainInput + asMap := map[string]any{} + for k, v := range obj.(map[string]any) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"organizationId", "domain"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "organizationId": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("organizationId")) + data, err := ec.unmarshalNID2githubᚗcomᚋgetproboᚋproboᚋpkgᚋgidᚐGID(ctx, v) + if err != nil { + return it, err + } + it.OrganizationID = data + case "domain": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("domain")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Domain = data + } + } + + return it, nil +} + func (ec *executionContext) unmarshalInputCreateDatumInput(ctx context.Context, obj any) (types.CreateDatumInput, error) { var it types.CreateDatumInput asMap := map[string]any{} @@ -66936,6 +68738,33 @@ func (ec *executionContext) unmarshalInputDeleteControlSnapshotMappingInput(ctx return it, nil } +func (ec *executionContext) unmarshalInputDeleteCustomDomainInput(ctx context.Context, obj any) (types.DeleteCustomDomainInput, error) { + var it types.DeleteCustomDomainInput + asMap := map[string]any{} + for k, v := range obj.(map[string]any) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"domainId"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "domainId": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("domainId")) + data, err := ec.unmarshalNID2githubᚗcomᚋgetproboᚋproboᚋpkgᚋgidᚐGID(ctx, v) + if err != nil { + return it, err + } + it.DomainID = data + } + } + + return it, nil +} + func (ec *executionContext) unmarshalInputDeleteDatumInput(ctx context.Context, obj any) (types.DeleteDatumInput, error) { var it types.DeleteDatumInput asMap := map[string]any{} @@ -71349,6 +73178,13 @@ func (ec *executionContext) _Node(ctx context.Context, sel ast.SelectionSet, obj return graphql.Null } return ec._Datum(ctx, sel, obj) + case types.CustomDomain: + return ec._CustomDomain(ctx, sel, &obj) + case *types.CustomDomain: + if obj == nil { + return graphql.Null + } + return ec._CustomDomain(ctx, sel, obj) case types.Control: return ec._Control(ctx, sel, &obj) case *types.Control: @@ -73536,6 +75372,45 @@ func (ec *executionContext) _CreateControlSnapshotMappingPayload(ctx context.Con return out } +var createCustomDomainPayloadImplementors = []string{"CreateCustomDomainPayload"} + +func (ec *executionContext) _CreateCustomDomainPayload(ctx context.Context, sel ast.SelectionSet, obj *types.CreateCustomDomainPayload) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, createCustomDomainPayloadImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("CreateCustomDomainPayload") + case "customDomainEdge": + out.Values[i] = ec._CreateCustomDomainPayload_customDomainEdge(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + var createDatumPayloadImplementors = []string{"CreateDatumPayload"} func (ec *executionContext) _CreateDatumPayload(ctx context.Context, sel ast.SelectionSet, obj *types.CreateDatumPayload) graphql.Marshaler { @@ -74453,6 +76328,236 @@ func (ec *executionContext) _CreateVendorServicePayload(ctx context.Context, sel return out } +var customDomainImplementors = []string{"CustomDomain", "Node"} + +func (ec *executionContext) _CustomDomain(ctx context.Context, sel ast.SelectionSet, obj *types.CustomDomain) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, customDomainImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("CustomDomain") + case "id": + out.Values[i] = ec._CustomDomain_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "organization": + out.Values[i] = ec._CustomDomain_organization(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "domain": + out.Values[i] = ec._CustomDomain_domain(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "sslStatus": + out.Values[i] = ec._CustomDomain_sslStatus(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "sslExpiresAt": + out.Values[i] = ec._CustomDomain_sslExpiresAt(ctx, field, obj) + case "isActive": + out.Values[i] = ec._CustomDomain_isActive(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "dnsRecords": + out.Values[i] = ec._CustomDomain_dnsRecords(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "createdAt": + out.Values[i] = ec._CustomDomain_createdAt(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "updatedAt": + out.Values[i] = ec._CustomDomain_updatedAt(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "verifiedAt": + out.Values[i] = ec._CustomDomain_verifiedAt(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var customDomainConnectionImplementors = []string{"CustomDomainConnection"} + +func (ec *executionContext) _CustomDomainConnection(ctx context.Context, sel ast.SelectionSet, obj *types.CustomDomainConnection) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, customDomainConnectionImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("CustomDomainConnection") + case "edges": + out.Values[i] = ec._CustomDomainConnection_edges(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "pageInfo": + out.Values[i] = ec._CustomDomainConnection_pageInfo(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "totalCount": + out.Values[i] = ec._CustomDomainConnection_totalCount(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var customDomainEdgeImplementors = []string{"CustomDomainEdge"} + +func (ec *executionContext) _CustomDomainEdge(ctx context.Context, sel ast.SelectionSet, obj *types.CustomDomainEdge) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, customDomainEdgeImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("CustomDomainEdge") + case "cursor": + out.Values[i] = ec._CustomDomainEdge_cursor(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "node": + out.Values[i] = ec._CustomDomainEdge_node(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var dNSRecordInstructionImplementors = []string{"DNSRecordInstruction"} + +func (ec *executionContext) _DNSRecordInstruction(ctx context.Context, sel ast.SelectionSet, obj *types.DNSRecordInstruction) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, dNSRecordInstructionImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("DNSRecordInstruction") + case "type": + out.Values[i] = ec._DNSRecordInstruction_type(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "name": + out.Values[i] = ec._DNSRecordInstruction_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "value": + out.Values[i] = ec._DNSRecordInstruction_value(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "ttl": + out.Values[i] = ec._DNSRecordInstruction_ttl(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "purpose": + out.Values[i] = ec._DNSRecordInstruction_purpose(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + var datumImplementors = []string{"Datum", "Node"} func (ec *executionContext) _Datum(ctx context.Context, sel ast.SelectionSet, obj *types.Datum) graphql.Marshaler { @@ -75117,6 +77222,45 @@ func (ec *executionContext) _DeleteControlSnapshotMappingPayload(ctx context.Con return out } +var deleteCustomDomainPayloadImplementors = []string{"DeleteCustomDomainPayload"} + +func (ec *executionContext) _DeleteCustomDomainPayload(ctx context.Context, sel ast.SelectionSet, obj *types.DeleteCustomDomainPayload) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, deleteCustomDomainPayloadImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("DeleteCustomDomainPayload") + case "deletedCustomDomainId": + out.Values[i] = ec._DeleteCustomDomainPayload_deletedCustomDomainId(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + var deleteDatumPayloadImplementors = []string{"DeleteDatumPayload"} func (ec *executionContext) _DeleteDatumPayload(ctx context.Context, sel ast.SelectionSet, obj *types.DeleteDatumPayload) graphql.Marshaler { @@ -79103,6 +81247,20 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) if out.Values[i] == graphql.Null { out.Invalids++ } + case "createCustomDomain": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_createCustomDomain(ctx, field) + }) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "deleteCustomDomain": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_deleteCustomDomain(ctx, field) + }) + if out.Values[i] == graphql.Null { + out.Invalids++ + } default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -80444,6 +82602,42 @@ func (ec *executionContext) _Organization(ctx context.Context, sel ast.Selection continue } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "customDomains": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Organization_customDomains(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) case "createdAt": out.Values[i] = ec._Organization_createdAt(ctx, field, obj) @@ -89086,6 +91280,25 @@ func (ec *executionContext) marshalNCreateControlSnapshotMappingPayload2ᚖgithu return ec._CreateControlSnapshotMappingPayload(ctx, sel, v) } +func (ec *executionContext) unmarshalNCreateCustomDomainInput2githubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐCreateCustomDomainInput(ctx context.Context, v any) (types.CreateCustomDomainInput, error) { + res, err := ec.unmarshalInputCreateCustomDomainInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNCreateCustomDomainPayload2githubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐCreateCustomDomainPayload(ctx context.Context, sel ast.SelectionSet, v types.CreateCustomDomainPayload) graphql.Marshaler { + return ec._CreateCustomDomainPayload(ctx, sel, &v) +} + +func (ec *executionContext) marshalNCreateCustomDomainPayload2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐCreateCustomDomainPayload(ctx context.Context, sel ast.SelectionSet, v *types.CreateCustomDomainPayload) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._CreateCustomDomainPayload(ctx, sel, v) +} + func (ec *executionContext) unmarshalNCreateDatumInput2githubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐCreateDatumInput(ctx context.Context, v any) (types.CreateDatumInput, error) { res, err := ec.unmarshalInputCreateDatumInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) @@ -89550,6 +91763,138 @@ func (ec *executionContext) marshalNCursorKey2githubᚗcomᚋgetproboᚋproboᚋ return res } +func (ec *executionContext) marshalNCustomDomain2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐCustomDomain(ctx context.Context, sel ast.SelectionSet, v *types.CustomDomain) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._CustomDomain(ctx, sel, v) +} + +func (ec *executionContext) marshalNCustomDomainConnection2githubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐCustomDomainConnection(ctx context.Context, sel ast.SelectionSet, v types.CustomDomainConnection) graphql.Marshaler { + return ec._CustomDomainConnection(ctx, sel, &v) +} + +func (ec *executionContext) marshalNCustomDomainConnection2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐCustomDomainConnection(ctx context.Context, sel ast.SelectionSet, v *types.CustomDomainConnection) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._CustomDomainConnection(ctx, sel, v) +} + +func (ec *executionContext) marshalNCustomDomainEdge2ᚕᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐCustomDomainEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*types.CustomDomainEdge) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNCustomDomainEdge2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐCustomDomainEdge(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNCustomDomainEdge2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐCustomDomainEdge(ctx context.Context, sel ast.SelectionSet, v *types.CustomDomainEdge) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._CustomDomainEdge(ctx, sel, v) +} + +func (ec *executionContext) marshalNDNSRecordInstruction2ᚕᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐDNSRecordInstructionᚄ(ctx context.Context, sel ast.SelectionSet, v []*types.DNSRecordInstruction) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNDNSRecordInstruction2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐDNSRecordInstruction(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNDNSRecordInstruction2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐDNSRecordInstruction(ctx context.Context, sel ast.SelectionSet, v *types.DNSRecordInstruction) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._DNSRecordInstruction(ctx, sel, v) +} + func (ec *executionContext) unmarshalNDataClassification2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐDataClassification(ctx context.Context, v any) (coredata.DataClassification, error) { tmp, err := graphql.UnmarshalString(v) res := unmarshalNDataClassification2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐDataClassification[tmp] @@ -89911,6 +92256,25 @@ func (ec *executionContext) marshalNDeleteControlSnapshotMappingPayload2ᚖgithu return ec._DeleteControlSnapshotMappingPayload(ctx, sel, v) } +func (ec *executionContext) unmarshalNDeleteCustomDomainInput2githubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐDeleteCustomDomainInput(ctx context.Context, v any) (types.DeleteCustomDomainInput, error) { + res, err := ec.unmarshalInputDeleteCustomDomainInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNDeleteCustomDomainPayload2githubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐDeleteCustomDomainPayload(ctx context.Context, sel ast.SelectionSet, v types.DeleteCustomDomainPayload) graphql.Marshaler { + return ec._DeleteCustomDomainPayload(ctx, sel, &v) +} + +func (ec *executionContext) marshalNDeleteCustomDomainPayload2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐDeleteCustomDomainPayload(ctx context.Context, sel ast.SelectionSet, v *types.DeleteCustomDomainPayload) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._DeleteCustomDomainPayload(ctx, sel, v) +} + func (ec *executionContext) unmarshalNDeleteDatumInput2githubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐDeleteDatumInput(ctx context.Context, v any) (types.DeleteDatumInput, error) { res, err := ec.unmarshalInputDeleteDatumInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) @@ -92438,6 +94802,42 @@ var ( } ) +func (ec *executionContext) unmarshalNSSLStatus2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCustomDomainSSLStatus(ctx context.Context, v any) (coredata.CustomDomainSSLStatus, error) { + tmp, err := graphql.UnmarshalString(v) + res := unmarshalNSSLStatus2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCustomDomainSSLStatus[tmp] + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNSSLStatus2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCustomDomainSSLStatus(ctx context.Context, sel ast.SelectionSet, v coredata.CustomDomainSSLStatus) graphql.Marshaler { + _ = sel + res := graphql.MarshalString(marshalNSSLStatus2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCustomDomainSSLStatus[v]) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +var ( + unmarshalNSSLStatus2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCustomDomainSSLStatus = map[string]coredata.CustomDomainSSLStatus{ + "PENDING": coredata.CustomDomainSSLStatusPending, + "PROVISIONING": coredata.CustomDomainSSLStatusProvisioning, + "ACTIVE": coredata.CustomDomainSSLStatusActive, + "RENEWING": coredata.CustomDomainSSLStatusRenewing, + "EXPIRED": coredata.CustomDomainSSLStatusExpired, + "FAILED": coredata.CustomDomainSSLStatusFailed, + } + marshalNSSLStatus2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐCustomDomainSSLStatus = map[coredata.CustomDomainSSLStatus]string{ + coredata.CustomDomainSSLStatusPending: "PENDING", + coredata.CustomDomainSSLStatusProvisioning: "PROVISIONING", + coredata.CustomDomainSSLStatusActive: "ACTIVE", + coredata.CustomDomainSSLStatusRenewing: "RENEWING", + coredata.CustomDomainSSLStatusExpired: "EXPIRED", + coredata.CustomDomainSSLStatusFailed: "FAILED", + } +) + func (ec *executionContext) unmarshalNSendSigningNotificationsInput2githubᚗcomᚋgetproboᚋproboᚋpkgᚋserverᚋapiᚋconsoleᚋv1ᚋtypesᚐSendSigningNotificationsInput(ctx context.Context, v any) (types.SendSigningNotificationsInput, error) { res, err := ec.unmarshalInputSendSigningNotificationsInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) diff --git a/pkg/server/api/console/v1/types/types.go b/pkg/server/api/console/v1/types/types.go index 877a209a4..0d4916fe2 100644 --- a/pkg/server/api/console/v1/types/types.go +++ b/pkg/server/api/console/v1/types/types.go @@ -318,6 +318,15 @@ type CreateControlSnapshotMappingPayload struct { SnapshotEdge *SnapshotEdge `json:"snapshotEdge"` } +type CreateCustomDomainInput struct { + OrganizationID gid.GID `json:"organizationId"` + Domain string `json:"domain"` +} + +type CreateCustomDomainPayload struct { + CustomDomainEdge *CustomDomainEdge `json:"customDomainEdge"` +} + type CreateDatumInput struct { OrganizationID gid.GID `json:"organizationId"` Name string `json:"name"` @@ -626,6 +635,41 @@ type CreateVendorServicePayload struct { VendorServiceEdge *VendorServiceEdge `json:"vendorServiceEdge"` } +type CustomDomain struct { + ID gid.GID `json:"id"` + Organization *Organization `json:"organization"` + Domain string `json:"domain"` + SslStatus coredata.CustomDomainSSLStatus `json:"sslStatus"` + SslExpiresAt *time.Time `json:"sslExpiresAt,omitempty"` + IsActive bool `json:"isActive"` + DNSRecords []*DNSRecordInstruction `json:"dnsRecords"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt time.Time `json:"updatedAt"` + VerifiedAt *time.Time `json:"verifiedAt,omitempty"` +} + +func (CustomDomain) IsNode() {} +func (this CustomDomain) GetID() gid.GID { return this.ID } + +type CustomDomainConnection struct { + Edges []*CustomDomainEdge `json:"edges"` + PageInfo *PageInfo `json:"pageInfo"` + TotalCount int `json:"totalCount"` +} + +type CustomDomainEdge struct { + Cursor page.CursorKey `json:"cursor"` + Node *CustomDomain `json:"node"` +} + +type DNSRecordInstruction struct { + Type string `json:"type"` + Name string `json:"name"` + Value string `json:"value"` + TTL int `json:"ttl"` + Purpose string `json:"purpose"` +} + type Datum struct { ID gid.GID `json:"id"` SnapshotID *gid.GID `json:"snapshotId,omitempty"` @@ -730,6 +774,14 @@ type DeleteControlSnapshotMappingPayload struct { DeletedSnapshotID gid.GID `json:"deletedSnapshotId"` } +type DeleteCustomDomainInput struct { + DomainID gid.GID `json:"domainId"` +} + +type DeleteCustomDomainPayload struct { + DeletedCustomDomainID gid.GID `json:"deletedCustomDomainId"` +} + type DeleteDatumInput struct { DatumID gid.GID `json:"datumId"` } @@ -1273,6 +1325,7 @@ type Organization struct { ProcessingActivities *ProcessingActivityConnection `json:"processingActivities"` Snapshots *SnapshotConnection `json:"snapshots"` TrustCenter *TrustCenter `json:"trustCenter,omitempty"` + CustomDomains *CustomDomainConnection `json:"customDomains"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` } diff --git a/pkg/server/api/console/v1/v1_resolver.go b/pkg/server/api/console/v1/v1_resolver.go index 5f3e4ce8a..9dccde88b 100644 --- a/pkg/server/api/console/v1/v1_resolver.go +++ b/pkg/server/api/console/v1/v1_resolver.go @@ -3312,6 +3312,41 @@ func (r *mutationResolver) DeleteSnapshot(ctx context.Context, input types.Delet }, nil } +// CreateCustomDomain is the resolver for the createCustomDomain field. +func (r *mutationResolver) CreateCustomDomain(ctx context.Context, input types.CreateCustomDomainInput) (*types.CreateCustomDomainPayload, error) { + prb := r.ProboService(ctx, input.OrganizationID.TenantID()) + + domain, err := prb.CustomDomains.CreateCustomDomain(ctx, probo.CreateCustomDomainRequest{ + OrganizationID: input.OrganizationID, + Domain: input.Domain, + }) + if err != nil { + return nil, fmt.Errorf("failed to create custom domain: %w", err) + } + + edge := &types.CustomDomainEdge{ + Node: types.NewCustomDomain(domain), + Cursor: page.NewCursorKey(domain.ID, domain.CreatedAt), + } + + return &types.CreateCustomDomainPayload{ + CustomDomainEdge: edge, + }, nil +} + +// DeleteCustomDomain is the resolver for the deleteCustomDomain field. +func (r *mutationResolver) DeleteCustomDomain(ctx context.Context, input types.DeleteCustomDomainInput) (*types.DeleteCustomDomainPayload, error) { + prb := r.ProboService(ctx, input.DomainID.TenantID()) + + if err := prb.CustomDomains.DeleteCustomDomain(ctx, input.DomainID); err != nil { + return nil, fmt.Errorf("failed to delete custom domain: %w", err) + } + + return &types.DeleteCustomDomainPayload{ + DeletedCustomDomainID: input.DomainID, + }, nil +} + // Organization is the resolver for the organization field. func (r *nonconformityResolver) Organization(ctx context.Context, obj *types.Nonconformity) (*types.Organization, error) { prb := r.ProboService(ctx, obj.ID.TenantID()) @@ -3981,6 +4016,25 @@ func (r *organizationResolver) TrustCenter(ctx context.Context, obj *types.Organ return types.NewTrustCenter(trustCenter, file), nil } +// CustomDomains is the resolver for the customDomains field. +func (r *organizationResolver) CustomDomains(ctx context.Context, obj *types.Organization, first *int, after *page.CursorKey, last *int, before *page.CursorKey) (*types.CustomDomainConnection, error) { + prb := r.ProboService(ctx, obj.ID.TenantID()) + + pageOrderBy := page.OrderBy[coredata.CustomDomainOrderField]{ + Field: coredata.CustomDomainOrderFieldCreatedAt, + Direction: page.OrderDirectionDesc, + } + + cursor := types.NewCursor(first, after, last, before, pageOrderBy) + + page, err := prb.CustomDomains.ListOrganizationDomains(ctx, obj.ID, cursor) + if err != nil { + return nil, fmt.Errorf("failed to list custom domains: %w", err) + } + + return types.NewCustomDomainConnection(page, r, obj.ID), nil +} + // TotalCount is the resolver for the totalCount field. func (r *peopleConnectionResolver) TotalCount(ctx context.Context, obj *types.PeopleConnection) (int, error) { prb := r.ProboService(ctx, obj.ParentID.TenantID())