Stop tracking generated files
Run make generate in CI lint and test jobs since generated files are now gitignored. Also include Relay codegen for frontend apps in the generate target. Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
3
pkg/server/api/trust/v1/schema/.gitignore
vendored
Normal file
3
pkg/server/api/trust/v1/schema/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
*
|
||||
!.gitignore
|
||||
!doc.go
|
||||
17
pkg/server/api/trust/v1/schema/doc.go
Normal file
17
pkg/server/api/trust/v1/schema/doc.go
Normal file
@@ -0,0 +1,17 @@
|
||||
// Copyright (c) 2025 Probo Inc <hello@getprobo.com>.
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
// copyright notice and this permission notice appear in all copies.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
// PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
// Package schema contains the generated GraphQL executable schema for the
|
||||
// Trust API.
|
||||
package schema
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,379 +0,0 @@
|
||||
// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
|
||||
|
||||
package types
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"go.probo.inc/probo/pkg/coredata"
|
||||
"go.probo.inc/probo/pkg/gid"
|
||||
"go.probo.inc/probo/pkg/mail"
|
||||
"go.probo.inc/probo/pkg/page"
|
||||
)
|
||||
|
||||
type Node interface {
|
||||
IsNode()
|
||||
GetID() gid.GID
|
||||
}
|
||||
|
||||
type AcceptElectronicSignatureInput struct {
|
||||
SignatureID gid.GID `json:"signatureId"`
|
||||
}
|
||||
|
||||
type AcceptElectronicSignaturePayload struct {
|
||||
Signature *ElectronicSignature `json:"signature"`
|
||||
}
|
||||
|
||||
type Audit struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Framework *Framework `json:"framework"`
|
||||
Report *Report `json:"report,omitempty"`
|
||||
}
|
||||
|
||||
func (Audit) IsNode() {}
|
||||
func (this Audit) GetID() gid.GID { return this.ID }
|
||||
|
||||
type AuditConnection struct {
|
||||
Edges []*AuditEdge `json:"edges"`
|
||||
PageInfo *PageInfo `json:"pageInfo"`
|
||||
}
|
||||
|
||||
type AuditEdge struct {
|
||||
Cursor page.CursorKey `json:"cursor"`
|
||||
Node *Audit `json:"node"`
|
||||
}
|
||||
|
||||
type ComplianceExternalURL struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
URL string `json:"url"`
|
||||
Rank int `json:"rank"`
|
||||
}
|
||||
|
||||
func (ComplianceExternalURL) IsNode() {}
|
||||
func (this ComplianceExternalURL) GetID() gid.GID { return this.ID }
|
||||
|
||||
type ComplianceExternalURLConnection struct {
|
||||
Edges []*ComplianceExternalURLEdge `json:"edges"`
|
||||
PageInfo *PageInfo `json:"pageInfo"`
|
||||
}
|
||||
|
||||
type ComplianceExternalURLEdge struct {
|
||||
Cursor page.CursorKey `json:"cursor"`
|
||||
Node *ComplianceExternalURL `json:"node"`
|
||||
}
|
||||
|
||||
type Document struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Title string `json:"title"`
|
||||
DocumentType coredata.DocumentType `json:"documentType"`
|
||||
IsUserAuthorized bool `json:"isUserAuthorized"`
|
||||
Access *DocumentAccess `json:"access,omitempty"`
|
||||
}
|
||||
|
||||
func (Document) IsNode() {}
|
||||
func (this Document) GetID() gid.GID { return this.ID }
|
||||
|
||||
type DocumentAccess struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Status coredata.TrustCenterDocumentAccessStatus `json:"status"`
|
||||
}
|
||||
|
||||
func (DocumentAccess) IsNode() {}
|
||||
func (this DocumentAccess) GetID() gid.GID { return this.ID }
|
||||
|
||||
type DocumentConnection struct {
|
||||
Edges []*DocumentEdge `json:"edges"`
|
||||
PageInfo *PageInfo `json:"pageInfo"`
|
||||
}
|
||||
|
||||
type DocumentEdge struct {
|
||||
Cursor page.CursorKey `json:"cursor"`
|
||||
Node *Document `json:"node"`
|
||||
}
|
||||
|
||||
type ElectronicSignature struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Status coredata.ElectronicSignatureStatus `json:"status"`
|
||||
DocumentType coredata.ElectronicSignatureDocumentType `json:"documentType"`
|
||||
ConsentText string `json:"consentText"`
|
||||
LastError *string `json:"lastError,omitempty"`
|
||||
SignedAt *time.Time `json:"signedAt,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
func (ElectronicSignature) IsNode() {}
|
||||
func (this ElectronicSignature) GetID() gid.GID { return this.ID }
|
||||
|
||||
type ExportDocumentPDFInput struct {
|
||||
DocumentID gid.GID `json:"documentId"`
|
||||
}
|
||||
|
||||
type ExportDocumentPDFPayload struct {
|
||||
Data string `json:"data"`
|
||||
}
|
||||
|
||||
type ExportReportPDFInput struct {
|
||||
ReportID gid.GID `json:"reportId"`
|
||||
}
|
||||
|
||||
type ExportReportPDFPayload struct {
|
||||
Data string `json:"data"`
|
||||
}
|
||||
|
||||
type ExportTrustCenterFileInput struct {
|
||||
TrustCenterFileID gid.GID `json:"trustCenterFileId"`
|
||||
}
|
||||
|
||||
type ExportTrustCenterFilePayload struct {
|
||||
Data string `json:"data"`
|
||||
}
|
||||
|
||||
type Framework struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
LightLogoURL *string `json:"lightLogoURL,omitempty"`
|
||||
DarkLogoURL *string `json:"darkLogoURL,omitempty"`
|
||||
}
|
||||
|
||||
func (Framework) IsNode() {}
|
||||
func (this Framework) GetID() gid.GID { return this.ID }
|
||||
|
||||
type Identity struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Email mail.Addr `json:"email"`
|
||||
FullName string `json:"fullName"`
|
||||
EmailVerified bool `json:"emailVerified"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
func (Identity) IsNode() {}
|
||||
func (this Identity) GetID() gid.GID { return this.ID }
|
||||
|
||||
type MailingListUpdate struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Body string `json:"body"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
func (MailingListUpdate) IsNode() {}
|
||||
func (this MailingListUpdate) GetID() gid.GID { return this.ID }
|
||||
|
||||
type MailingListUpdateConnection struct {
|
||||
Edges []*MailingListUpdateEdge `json:"edges"`
|
||||
PageInfo *PageInfo `json:"pageInfo"`
|
||||
}
|
||||
|
||||
type MailingListUpdateEdge struct {
|
||||
Cursor page.CursorKey `json:"cursor"`
|
||||
Node *MailingListUpdate `json:"node"`
|
||||
}
|
||||
|
||||
type Mutation struct {
|
||||
}
|
||||
|
||||
type NonDisclosureAgreement struct {
|
||||
FileName string `json:"fileName"`
|
||||
FileURL string `json:"fileUrl"`
|
||||
ViewerSignature *ElectronicSignature `json:"viewerSignature,omitempty"`
|
||||
}
|
||||
|
||||
type Organization struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
LogoURL *string `json:"logoUrl,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
WebsiteURL *string `json:"websiteUrl,omitempty"`
|
||||
Email *string `json:"email,omitempty"`
|
||||
HeadquarterAddress *string `json:"headquarterAddress,omitempty"`
|
||||
}
|
||||
|
||||
func (Organization) IsNode() {}
|
||||
func (this Organization) GetID() gid.GID { return this.ID }
|
||||
|
||||
type PageInfo struct {
|
||||
HasNextPage bool `json:"hasNextPage"`
|
||||
HasPreviousPage bool `json:"hasPreviousPage"`
|
||||
StartCursor *page.CursorKey `json:"startCursor,omitempty"`
|
||||
EndCursor *page.CursorKey `json:"endCursor,omitempty"`
|
||||
}
|
||||
|
||||
type Query struct {
|
||||
}
|
||||
|
||||
type RecordSigningEventInput struct {
|
||||
SignatureID gid.GID `json:"signatureId"`
|
||||
EventType coredata.ElectronicSignatureEventType `json:"eventType"`
|
||||
}
|
||||
|
||||
type RecordSigningEventPayload struct {
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
|
||||
type Report struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Filename string `json:"filename"`
|
||||
IsUserAuthorized bool `json:"isUserAuthorized"`
|
||||
Access *DocumentAccess `json:"access,omitempty"`
|
||||
}
|
||||
|
||||
func (Report) IsNode() {}
|
||||
func (this Report) GetID() gid.GID { return this.ID }
|
||||
|
||||
type RequestAccessesPayload struct {
|
||||
TrustCenterAccess *TrustCenterAccess `json:"trustCenterAccess"`
|
||||
}
|
||||
|
||||
type RequestDocumentAccessInput struct {
|
||||
DocumentID gid.GID `json:"documentId"`
|
||||
}
|
||||
|
||||
type RequestDocumentAccessPayload struct {
|
||||
Document *Document `json:"document,omitempty"`
|
||||
}
|
||||
|
||||
type RequestFileAccessPayload struct {
|
||||
File *TrustCenterFile `json:"file,omitempty"`
|
||||
}
|
||||
|
||||
type RequestReportAccessInput struct {
|
||||
ReportID gid.GID `json:"reportId"`
|
||||
}
|
||||
|
||||
type RequestReportAccessPayload struct {
|
||||
Audit *Audit `json:"audit,omitempty"`
|
||||
}
|
||||
|
||||
type RequestTrustCenterFileAccessInput struct {
|
||||
TrustCenterFileID gid.GID `json:"trustCenterFileId"`
|
||||
}
|
||||
|
||||
type SendMagicLinkInput struct {
|
||||
Email mail.Addr `json:"email"`
|
||||
Continue *string `json:"continue,omitempty"`
|
||||
}
|
||||
|
||||
type SendMagicLinkPayload struct {
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
|
||||
type SubscribeToMailingListPayload struct {
|
||||
Subscription *MailingListSubscriber `json:"subscription"`
|
||||
}
|
||||
|
||||
type TrustCenter struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Active bool `json:"active"`
|
||||
Slug string `json:"slug"`
|
||||
LogoFileURL *string `json:"logoFileUrl,omitempty"`
|
||||
DarkLogoFileURL *string `json:"darkLogoFileUrl,omitempty"`
|
||||
NonDisclosureAgreement *NonDisclosureAgreement `json:"nonDisclosureAgreement,omitempty"`
|
||||
ViewerSubscription *MailingListSubscriber `json:"viewerSubscription,omitempty"`
|
||||
Organization *Organization `json:"organization"`
|
||||
Documents *DocumentConnection `json:"documents"`
|
||||
Audits *AuditConnection `json:"audits"`
|
||||
Vendors *VendorConnection `json:"vendors"`
|
||||
References *TrustCenterReferenceConnection `json:"references"`
|
||||
TrustCenterFiles *TrustCenterFileConnection `json:"trustCenterFiles"`
|
||||
ComplianceFrameworks *ComplianceFrameworkConnection `json:"complianceFrameworks"`
|
||||
ExternalUrls *ComplianceExternalURLConnection `json:"externalUrls"`
|
||||
Updates *MailingListUpdateConnection `json:"updates"`
|
||||
}
|
||||
|
||||
func (TrustCenter) IsNode() {}
|
||||
func (this TrustCenter) GetID() gid.GID { return this.ID }
|
||||
|
||||
type TrustCenterAccess struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Email mail.Addr `json:"email"`
|
||||
Name string `json:"name"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
func (TrustCenterAccess) IsNode() {}
|
||||
func (this TrustCenterAccess) GetID() gid.GID { return this.ID }
|
||||
|
||||
type TrustCenterFile struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Category string `json:"category"`
|
||||
IsUserAuthorized bool `json:"isUserAuthorized"`
|
||||
Access *DocumentAccess `json:"access,omitempty"`
|
||||
}
|
||||
|
||||
func (TrustCenterFile) IsNode() {}
|
||||
func (this TrustCenterFile) GetID() gid.GID { return this.ID }
|
||||
|
||||
type TrustCenterFileConnection struct {
|
||||
Edges []*TrustCenterFileEdge `json:"edges"`
|
||||
PageInfo *PageInfo `json:"pageInfo"`
|
||||
}
|
||||
|
||||
type TrustCenterFileEdge struct {
|
||||
Cursor page.CursorKey `json:"cursor"`
|
||||
Node *TrustCenterFile `json:"node"`
|
||||
}
|
||||
|
||||
type TrustCenterReference struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
WebsiteURL string `json:"websiteUrl"`
|
||||
LogoURL string `json:"logoUrl"`
|
||||
}
|
||||
|
||||
func (TrustCenterReference) IsNode() {}
|
||||
func (this TrustCenterReference) GetID() gid.GID { return this.ID }
|
||||
|
||||
type TrustCenterReferenceConnection struct {
|
||||
Edges []*TrustCenterReferenceEdge `json:"edges"`
|
||||
PageInfo *PageInfo `json:"pageInfo"`
|
||||
}
|
||||
|
||||
type TrustCenterReferenceEdge struct {
|
||||
Cursor page.CursorKey `json:"cursor"`
|
||||
Node *TrustCenterReference `json:"node"`
|
||||
}
|
||||
|
||||
type UnsubscribeFromMailingListPayload struct {
|
||||
DeletedMailingListSubscriberID *gid.GID `json:"deletedMailingListSubscriberId,omitempty"`
|
||||
}
|
||||
|
||||
type UpdateFullNameInput struct {
|
||||
FullName string `json:"fullName"`
|
||||
}
|
||||
|
||||
type UpdateFullNamePayload struct {
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
|
||||
type Vendor struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
Category coredata.VendorCategory `json:"category"`
|
||||
WebsiteURL *string `json:"websiteUrl,omitempty"`
|
||||
PrivacyPolicyURL *string `json:"privacyPolicyUrl,omitempty"`
|
||||
Countries []coredata.CountryCode `json:"countries"`
|
||||
}
|
||||
|
||||
func (Vendor) IsNode() {}
|
||||
func (this Vendor) GetID() gid.GID { return this.ID }
|
||||
|
||||
type VendorEdge struct {
|
||||
Cursor page.CursorKey `json:"cursor"`
|
||||
Node *Vendor `json:"node"`
|
||||
}
|
||||
|
||||
type VerifyMagicLinkInput struct {
|
||||
Token string `json:"token"`
|
||||
}
|
||||
|
||||
type VerifyMagicLinkPayload struct {
|
||||
Continue *string `json:"continue,omitempty"`
|
||||
}
|
||||
@@ -28,7 +28,6 @@ import (
|
||||
"go.probo.inc/probo/pkg/server/api/trust/v1/types"
|
||||
"go.probo.inc/probo/pkg/server/gqlutils"
|
||||
"go.probo.inc/probo/pkg/trust"
|
||||
"go.probo.inc/probo/pkg/validator"
|
||||
)
|
||||
|
||||
// Framework is the resolver for the framework field.
|
||||
@@ -707,16 +706,11 @@ func (r *mutationResolver) SubscribeToMailingList(ctx context.Context) (*types.S
|
||||
|
||||
subscriber, err := r.mailman.CreateSubscriber(
|
||||
ctx,
|
||||
&mailman.CreateSubscriberRequest{
|
||||
MailingListID: *trustCenter.MailingListID,
|
||||
Email: identity.EmailAddress,
|
||||
FullName: identity.FullName,
|
||||
},
|
||||
*trustCenter.MailingListID,
|
||||
identity.EmailAddress,
|
||||
identity.FullName,
|
||||
)
|
||||
if err != nil {
|
||||
if validationErrors, ok := errors.AsType[validator.ValidationErrors](err); ok {
|
||||
return nil, gqlutils.InvalidValidationErrors(ctx, validationErrors)
|
||||
}
|
||||
if errors.Is(err, mailman.ErrSubscriberAlreadyExist) {
|
||||
return nil, gqlutils.Conflictf(ctx, "already subscribed to this mailing list")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user