diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index c7295cc66b..6371565672 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -22,7 +22,7 @@ jobs: cache: false - uses: actions/checkout@v4 - name: golangci-lint - uses: golangci/golangci-lint-action@v4 + uses: golangci/golangci-lint-action@v6 with: # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version version: latest diff --git a/.storybook/static/mockServiceWorker.js b/.storybook/static/mockServiceWorker.js index e369128ec0..bdfdb11d38 100644 --- a/.storybook/static/mockServiceWorker.js +++ b/.storybook/static/mockServiceWorker.js @@ -2,13 +2,14 @@ /* tslint:disable */ /** - * Mock Service Worker (2.0.11). + * Mock Service Worker. * @see https://github.com/mswjs/msw * - Please do NOT modify this file. * - Please do NOT serve this file on production. */ -const INTEGRITY_CHECKSUM = 'c5f7f8e188b673ea4e677df7ea3c5a39' +const PACKAGE_VERSION = '2.3.0' +const INTEGRITY_CHECKSUM = '26357c79639bfa20d64c0efca2a87423' const IS_MOCKED_RESPONSE = Symbol('isMockedResponse') const activeClientIds = new Set() @@ -48,7 +49,10 @@ self.addEventListener('message', async function (event) { case 'INTEGRITY_CHECK_REQUEST': { sendToClient(client, { type: 'INTEGRITY_CHECK_RESPONSE', - payload: INTEGRITY_CHECKSUM, + payload: { + packageVersion: PACKAGE_VERSION, + checksum: INTEGRITY_CHECKSUM, + }, }) break } @@ -202,13 +206,6 @@ async function getResponse(event, client, requestId) { return passthrough() } - // Bypass requests with the explicit bypass header. - // Such requests can be issued by "ctx.fetch()". - const mswIntention = request.headers.get('x-msw-intention') - if (['bypass', 'passthrough'].includes(mswIntention)) { - return passthrough() - } - // Notify the client that a request has been intercepted. const requestBuffer = await request.arrayBuffer() const clientMessage = await sendToClient( @@ -240,7 +237,7 @@ async function getResponse(event, client, requestId) { return respondWithMock(clientMessage.data) } - case 'MOCK_NOT_FOUND': { + case 'PASSTHROUGH': { return passthrough() } } diff --git a/alert/alert.go b/alert/alert.go index ad5e2798a8..ea1fd0239c 100644 --- a/alert/alert.go +++ b/alert/alert.go @@ -61,7 +61,7 @@ func (a Alert) Normalize() (*Alert, error) { err := validate.Many( validate.Text("Summary", a.Summary, 1, MaxSummaryLength), validate.Text("Details", a.Details, 0, MaxDetailsLength), - validate.OneOf("Source", a.Source, SourceManual, SourceGrafana, SourceSite24x7, SourcePrometheusAlertmanager, SourceEmail, SourceGeneric), + validate.OneOf("Source", a.Source, SourceManual, SourceGrafana, SourceSite24x7, SourcePrometheusAlertmanager, SourceEmail, SourceGeneric, SourceUniversal), validate.OneOf("Status", a.Status, StatusTriggered, StatusActive, StatusClosed), validate.UUID("ServiceID", a.ServiceID), ) diff --git a/alert/alertlog/legacylogs.go b/alert/alertlog/legacylogs.go index d03c239069..1e68d79e42 100644 --- a/alert/alertlog/legacylogs.go +++ b/alert/alertlog/legacylogs.go @@ -107,6 +107,8 @@ func createdSubject(msg string) *Subject { return &Subject{Type: SubjectTypeUser, Classifier: "Web"} case "Created via: generic": return &Subject{Type: SubjectTypeIntegrationKey, Classifier: "Generic"} + case "Created via: universal": + return &Subject{Type: SubjectTypeIntegrationKey, Classifier: "Universal"} } return nil } diff --git a/alert/source.go b/alert/source.go index 83d1c8fccc..5c7da87706 100644 --- a/alert/source.go +++ b/alert/source.go @@ -16,6 +16,7 @@ const ( SourcePrometheusAlertmanager Source = "prometheusAlertmanager" // prometheus alertmanager alert SourceManual Source = "manual" // manually triggered SourceGeneric Source = "generic" // generic API + SourceUniversal Source = "universal" // universal integration ) func (s Source) Value() (driver.Value, error) { diff --git a/expflag/flags.go b/expflag/flags.go index afac011b7a..d965db426b 100644 --- a/expflag/flags.go +++ b/expflag/flags.go @@ -7,11 +7,13 @@ type Flag string const ( Example Flag = "example" DestTypes Flag = "dest-types" + UnivKeys Flag = "univ-keys" ) var desc = map[Flag]string{ Example: "An example experimental flag to demonstrate usage.", DestTypes: "Generic destination type API.", + UnivKeys: "Universal integration key support.", } // AllFlags returns a slice of all experimental flags sorted by name. diff --git a/gadb/models.go b/gadb/models.go index 04af5ee126..22fac87d40 100644 --- a/gadb/models.go +++ b/gadb/models.go @@ -172,6 +172,7 @@ const ( EnumAlertSourceManual EnumAlertSource = "manual" EnumAlertSourcePrometheusAlertmanager EnumAlertSource = "prometheusAlertmanager" EnumAlertSourceSite24x7 EnumAlertSource = "site24x7" + EnumAlertSourceUniversal EnumAlertSource = "universal" ) func (e *EnumAlertSource) Scan(src interface{}) error { @@ -303,6 +304,7 @@ const ( EnumIntegrationKeysTypeGrafana EnumIntegrationKeysType = "grafana" EnumIntegrationKeysTypePrometheusAlertmanager EnumIntegrationKeysType = "prometheusAlertmanager" EnumIntegrationKeysTypeSite24x7 EnumIntegrationKeysType = "site24x7" + EnumIntegrationKeysTypeUniversal EnumIntegrationKeysType = "universal" ) func (e *EnumIntegrationKeysType) Scan(src interface{}) error { @@ -1138,6 +1140,11 @@ type TwilioVoiceError struct { PhoneNumber string } +type UikConfig struct { + Config json.RawMessage + ID uuid.UUID +} + type User struct { AlertStatusLogContactMethodID uuid.NullUUID AvatarUrl string diff --git a/gadb/queries.sql.go b/gadb/queries.sql.go index 6bdb5cb4f6..82c6306613 100644 --- a/gadb/queries.sql.go +++ b/gadb/queries.sql.go @@ -1430,6 +1430,16 @@ func (q *Queries) IntKeyDelete(ctx context.Context, ids []uuid.UUID) error { return err } +const intKeyDeleteConfig = `-- name: IntKeyDeleteConfig :exec +DELETE FROM uik_config +WHERE id = $1 +` + +func (q *Queries) IntKeyDeleteConfig(ctx context.Context, id uuid.UUID) error { + _, err := q.db.ExecContext(ctx, intKeyDeleteConfig, id) + return err +} + const intKeyFindByService = `-- name: IntKeyFindByService :many SELECT id, @@ -1514,6 +1524,23 @@ func (q *Queries) IntKeyFindOne(ctx context.Context, id uuid.UUID) (IntKeyFindOn return i, err } +const intKeyGetConfig = `-- name: IntKeyGetConfig :one +SELECT + config +FROM + uik_config +WHERE + id = $1 +FOR UPDATE +` + +func (q *Queries) IntKeyGetConfig(ctx context.Context, id uuid.UUID) (json.RawMessage, error) { + row := q.db.QueryRowContext(ctx, intKeyGetConfig, id) + var config json.RawMessage + err := row.Scan(&config) + return config, err +} + const intKeyGetServiceID = `-- name: IntKeyGetServiceID :one SELECT service_id @@ -1536,6 +1563,40 @@ func (q *Queries) IntKeyGetServiceID(ctx context.Context, arg IntKeyGetServiceID return service_id, err } +const intKeyGetType = `-- name: IntKeyGetType :one +SELECT + type +FROM + integration_keys +WHERE + id = $1 +` + +func (q *Queries) IntKeyGetType(ctx context.Context, id uuid.UUID) (EnumIntegrationKeysType, error) { + row := q.db.QueryRowContext(ctx, intKeyGetType, id) + var type_ EnumIntegrationKeysType + err := row.Scan(&type_) + return type_, err +} + +const intKeySetConfig = `-- name: IntKeySetConfig :exec +INSERT INTO uik_config(id, config) + VALUES ($1, $2) +ON CONFLICT (id) + DO UPDATE SET + config = $2 +` + +type IntKeySetConfigParams struct { + ID uuid.UUID + Config json.RawMessage +} + +func (q *Queries) IntKeySetConfig(ctx context.Context, arg IntKeySetConfigParams) error { + _, err := q.db.ExecContext(ctx, intKeySetConfig, arg.ID, arg.Config) + return err +} + const labelDeleteKeyByTarget = `-- name: LabelDeleteKeyByTarget :exec DELETE FROM labels WHERE key = $1 diff --git a/go.mod b/go.mod index 81ae9fd24d..d6204d463c 100644 --- a/go.mod +++ b/go.mod @@ -1,14 +1,15 @@ module github.com/target/goalert -go 1.22.0 +go 1.22 require ( - github.com/99designs/gqlgen v0.17.45 + github.com/99designs/gqlgen v0.17.46 github.com/brianvoe/gofakeit/v6 v6.28.0 github.com/coreos/go-oidc/v3 v3.10.0 github.com/creack/pty/v2 v2.0.1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc - github.com/emersion/go-smtp v0.21.1 + github.com/emersion/go-smtp v0.21.2 + github.com/expr-lang/expr v1.16.5 github.com/fatih/color v1.16.0 github.com/felixge/httpsnoop v1.0.4 github.com/fullstorydev/grpcui v1.3.3 @@ -32,7 +33,7 @@ require ( github.com/mnako/letters v0.2.2 github.com/nyaruka/phonenumbers v1.3.4 github.com/oauth2-proxy/mockoidc v0.0.0-20220308204021-b9169deeb282 - github.com/pelletier/go-toml/v2 v2.2.1 + github.com/pelletier/go-toml/v2 v2.2.2 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.19.0 github.com/rubenv/sql-migrate v1.6.1 @@ -45,24 +46,24 @@ require ( github.com/vektah/gqlparser/v2 v2.5.11 golang.org/x/crypto v0.22.0 golang.org/x/oauth2 v0.19.0 - golang.org/x/sys v0.19.0 + golang.org/x/sys v0.20.0 golang.org/x/term v0.19.0 golang.org/x/tools v0.20.0 - google.golang.org/grpc v1.62.1 + google.golang.org/grpc v1.63.2 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 - google.golang.org/protobuf v1.33.0 + google.golang.org/protobuf v1.34.1 gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df honnef.co/go/tools v0.4.7 ) require ( - cloud.google.com/go/compute v1.23.3 // indirect + cloud.google.com/go/compute v1.24.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect github.com/BurntSushi/toml v1.3.2 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver v1.5.0 // indirect github.com/Masterminds/sprig v2.22.0+incompatible // indirect - github.com/PuerkitoBio/goquery v1.9.1 // indirect + github.com/PuerkitoBio/goquery v1.9.2 // indirect github.com/agnivade/levenshtein v1.1.1 // indirect github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect @@ -72,9 +73,8 @@ require ( github.com/bufbuild/protocompile v0.6.0 // indirect github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe // indirect github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect github.com/emersion/go-sasl v0.0.0-20231106173351-e73c9f7bad43 // indirect github.com/envoyproxy/go-control-plane v0.12.0 // indirect github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect @@ -129,7 +129,7 @@ require ( github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/smartystreets/goconvey v1.7.2 // indirect - github.com/sosodev/duration v1.2.0 // indirect + github.com/sosodev/duration v1.3.0 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.6.0 // indirect @@ -138,10 +138,10 @@ require ( github.com/subosito/gotenv v1.6.0 // indirect github.com/t-k/fluent-logger-golang v1.0.0 // indirect github.com/tinylib/msgp v1.1.8 // indirect - github.com/urfave/cli/v2 v2.27.1 // indirect + github.com/urfave/cli/v2 v2.27.2 // indirect github.com/vanng822/css v1.0.1 // indirect github.com/vanng822/go-premailer v1.20.2 // indirect - github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect + github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.9.0 // indirect golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 // indirect @@ -149,9 +149,9 @@ require ( golang.org/x/mod v0.17.0 // indirect golang.org/x/net v0.24.0 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect diff --git a/go.sum b/go.sum index 4cf4d52065..b5f8480d98 100644 --- a/go.sum +++ b/go.sum @@ -172,8 +172,8 @@ cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63 cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= +cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= +cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= @@ -598,8 +598,8 @@ cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcP dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= -github.com/99designs/gqlgen v0.17.45 h1:bH0AH67vIJo8JKNKPJP+pOPpQhZeuVRQLf53dKIpDik= -github.com/99designs/gqlgen v0.17.45/go.mod h1:Bas0XQ+Jiu/Xm5E33jC8sES3G+iC2esHBMXcq0fUPs0= +github.com/99designs/gqlgen v0.17.46 h1:Dk/pSCMVp57z/vd6gwZ/wmqbPOL3i5iz4YQHTDfxyuw= +github.com/99designs/gqlgen v0.17.46/go.mod h1:qRtiAeVPgkBBSPzZtoZXRRl5WkNrUTpp1OeVt61TmGU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= @@ -617,8 +617,8 @@ github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuN github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/goquery v1.5.0/go.mod h1:qD2PgZ9lccMbQlc7eEOjaeRlFQON7xY8kdmcsrnKqMg= github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= -github.com/PuerkitoBio/goquery v1.9.1 h1:mTL6XjbJTZdpfL+Gwl5U2h1l9yEkJjhmlTeV9VPW7UI= -github.com/PuerkitoBio/goquery v1.9.1/go.mod h1:cW1n6TmIMDoORQU5IU/P1T3tGFunOeXEpGP2WHRwkbY= +github.com/PuerkitoBio/goquery v1.9.2 h1:4/wZksC3KgkQw7SQgkKotmKljk0M6V8TUvA8Wb4yPeE= +github.com/PuerkitoBio/goquery v1.9.2/go.mod h1:GHPCaP0ODyyxqcNoFGYlAprUFH81NuRPd0GX3Zu2Mvk= github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= @@ -669,7 +669,6 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk= github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= @@ -686,8 +685,9 @@ github.com/coreos/go-oidc/v3 v3.10.0 h1:tDnXHnLyiTVyT/2zLDGj09pFPkhND8Gl8lnTRhoE github.com/coreos/go-oidc/v3 v3.10.0/go.mod h1:5j11xcw0D3+SGxn6Z/WFADsgcWVMyNAlSQupk0KK3ac= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty/v2 v2.0.1 h1:RDY1VY5b+7m2mfPsugucOYPIxMp+xal5ZheSyVzUA+k= @@ -704,8 +704,8 @@ github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZi github.com/emersion/go-sasl v0.0.0-20200509203442-7bfe0ed36a21/go.mod h1:iL2twTeMvZnrg54ZoPDNfJaJaqy0xIQFuBdrLsmspwQ= github.com/emersion/go-sasl v0.0.0-20231106173351-e73c9f7bad43 h1:hH4PQfOndHDlpzYfLAAfl63E8Le6F2+EL/cdhlkyRJY= github.com/emersion/go-sasl v0.0.0-20231106173351-e73c9f7bad43/go.mod h1:iL2twTeMvZnrg54ZoPDNfJaJaqy0xIQFuBdrLsmspwQ= -github.com/emersion/go-smtp v0.21.1 h1:VQeZSZAKk8ueYii1yR5Zalmy7jI287eWDUqSaJ68vRM= -github.com/emersion/go-smtp v0.21.1/go.mod h1:qm27SGYgoIPRot6ubfQ/GpiPy/g3PaZAVRxiO/sDUgQ= +github.com/emersion/go-smtp v0.21.2 h1:OLDgvZKuofk4em9fT5tFG5j4jE1/hXnX75UMvcrL4AA= +github.com/emersion/go-smtp v0.21.2/go.mod h1:qm27SGYgoIPRot6ubfQ/GpiPy/g3PaZAVRxiO/sDUgQ= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -725,6 +725,8 @@ github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0+ github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= +github.com/expr-lang/expr v1.16.5 h1:m2hvtguFeVaVNTHj8L7BoAyt7O0PAIBaSVbjdHgRXMs= +github.com/expr-lang/expr v1.16.5/go.mod h1:uCkhfG+x7fcZ5A5sXHKuQ07jGZRl6J0FCAaf2k4PtVQ= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= @@ -1085,8 +1087,8 @@ github.com/ogier/pflag v0.0.1/go.mod h1:zkFki7tvTa0tafRvTBIZTvzYyAu6kQhPZFnshFFP github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/pelletier/go-toml/v2 v2.2.1 h1:9TA9+T8+8CUCO2+WYnDLCgrYi9+omqKXyjDtosvtEhg= -github.com/pelletier/go-toml/v2 v2.2.1/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw= github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0= github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= @@ -1155,8 +1157,8 @@ github.com/smartystreets/assertions v1.2.0 h1:42S6lae5dvLc7BrLu/0ugRtcFVjoJNMC/N github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= github.com/smartystreets/goconvey v1.7.2 h1:9RBaZCeXEQ3UselpuwUQHltGVXvdwm6cv1hgR6gDIPg= github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM= -github.com/sosodev/duration v1.2.0 h1:pqK/FLSjsAADWY74SyWDCjOcd5l7H8GSnnOGEB9A1Us= -github.com/sosodev/duration v1.2.0/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg= +github.com/sosodev/duration v1.3.0 h1:g3E6mto+hFdA2uZXeNDYff8LYeg7v5D4YKP/Ng/NUkE= +github.com/sosodev/duration v1.3.0/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -1204,8 +1206,8 @@ github.com/t-k/fluent-logger-golang v1.0.0/go.mod h1:6vC3Vzp9Kva0l5J9+YDY5/ROePw github.com/tinylib/msgp v1.1.8 h1:FCXC1xanKO4I8plpHGH2P7koL/RzZs12l/+r7vakfm0= github.com/tinylib/msgp v1.1.8/go.mod h1:qkpG+2ldGg4xRFmx+jfTvZPxfGFhi64BcnL9vkCm/Tw= github.com/unrolled/render v1.0.3/go.mod h1:gN9T0NhL4Bfbwu8ann7Ry/TGHYfosul+J0obPf6NBdM= -github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= -github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= +github.com/urfave/cli/v2 v2.27.2 h1:6e0H+AkS+zDckwPCUrZkKX38mRaau4nL2uipkJpbkcI= +github.com/urfave/cli/v2 v2.27.2/go.mod h1:g0+79LmHHATl7DAcHO99smiR/T7uGLw84w8Y42x+4eM= github.com/vanng822/css v0.0.0-20190504095207-a21e860bcd04/go.mod h1:tcnB1voG49QhCrwq1W0w5hhGasvOg+VQp9i9H1rCM1w= github.com/vanng822/css v1.0.1 h1:10yiXc4e8NI8ldU6mSrWmSWMuyWgPr9DZ63RSlsgDw8= github.com/vanng822/css v1.0.1/go.mod h1:tcnB1voG49QhCrwq1W0w5hhGasvOg+VQp9i9H1rCM1w= @@ -1215,8 +1217,8 @@ github.com/vanng822/go-premailer v1.20.2/go.mod h1:RAxbRFp6M/B171gsKu8dsyq+Y5NGs github.com/vanng822/r2router v0.0.0-20150523112421-1023140a4f30/go.mod h1:1BVq8p2jVr55Ost2PkZWDrG86PiJ/0lxqcXoAcGxvWU= github.com/vektah/gqlparser/v2 v2.5.11 h1:JJxLtXIoN7+3x6MBdtIP59TP1RANnY7pXOaDnADQSf8= github.com/vektah/gqlparser/v2 v2.5.11/go.mod h1:1rCcfwB2ekJofmluGWXMSEnPMZgbxzwj6FaZ/4OT8Cc= -github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= -github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= +github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw= +github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1541,8 +1543,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1572,8 +1574,9 @@ golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1865,12 +1868,12 @@ google.golang.org/genproto v0.0.0-20230330154414-c0448cd141ea/go.mod h1:UUQDJDOl google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234015-3fc162c6f38a/go.mod h1:xURIpW9ES5+/GZhnV6beoEtxQrnkRGIfP5VQG2tCBLc= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= @@ -1916,8 +1919,8 @@ google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5v google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= -google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= -google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 h1:rNBFJjBCOgVr9pWD7rs/knKL4FRTKgpZmsRfV214zcA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0/go.mod h1:Dk1tviKTvMCz5tvh7t+fh94dhmQVHuCt2OzJB3CTW9Y= @@ -1939,8 +1942,8 @@ google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk= diff --git a/graphql2/exprscalar.go b/graphql2/exprscalar.go new file mode 100644 index 0000000000..e59f34f6e7 --- /dev/null +++ b/graphql2/exprscalar.go @@ -0,0 +1,145 @@ +package graphql2 + +import ( + "reflect" + + "github.com/99designs/gqlgen/graphql" + "github.com/expr-lang/expr" + "github.com/expr-lang/expr/ast" + "github.com/expr-lang/expr/parser" + "github.com/target/goalert/validation" +) + +// ExprIsID returns true if the node is a valid identifier. +func ExprIsID(n ast.Node) bool { + switch t := n.(type) { + case *ast.IdentifierNode: + return true + case *ast.MemberNode: + return !t.Method && ExprIsID(t.Node) && (ExprIsID(t.Property) || ExprIsLiteral(t.Property)) + case *ast.ChainNode: + return ExprIsID(t.Node) + } + + return false +} + +// ExprIsLiteral returns true if the node is a literal value (scalar or array of scalar values). +func ExprIsLiteral(n ast.Node) bool { + switch t := n.(type) { + case *ast.StringNode: + case *ast.IntegerNode: + case *ast.BoolNode: + case *ast.FloatNode: + case *ast.UnaryNode: + if t.Operator != "-" { + return false + } + switch t.Node.(type) { + case *ast.IntegerNode: + return true + case *ast.FloatNode: + return true + } + + return false + case *ast.ArrayNode: + for _, v := range t.Nodes { + if !ExprIsLiteral(v) { + return false + } + } + default: + return false + } + + return true +} + +func MarshalExprExpression(s string) graphql.Marshaler { return graphql.MarshalString(s) } +func MarshalExprBooleanExpression(s string) graphql.Marshaler { return graphql.MarshalString(s) } +func MarshalExprStringExpression(s string) graphql.Marshaler { return graphql.MarshalString(s) } + +func exprExpressionWith(v interface{}, opts ...expr.Option) (string, error) { + str, err := graphql.UnmarshalString(v) + if err != nil { + return "", err + } + + _, err = expr.Compile(str, opts...) + if err != nil { + return "", validation.WrapError(err) + } + + return str, nil +} + +func UnmarshalExprExpression(v interface{}) (string, error) { return exprExpressionWith(v) } +func UnmarshalExprBooleanExpression(v interface{}) (string, error) { + return exprExpressionWith(v, expr.AsBool()) +} + +func UnmarshalExprStringExpression(v interface{}) (string, error) { + return exprExpressionWith(v, expr.AsKind(reflect.String)) +} + +func MarshalExprValue(n ast.Node) graphql.Marshaler { return graphql.MarshalString(n.String()) } +func MarshalExprIdentifier(n ast.Node) graphql.Marshaler { return graphql.MarshalString(n.String()) } +func MarshalExprOperator(op string) graphql.Marshaler { return graphql.MarshalString(op) } + +func exprVal(v interface{}) (ast.Node, error) { + str, err := graphql.UnmarshalString(v) + if err != nil { + return nil, err + } + + t, err := parser.Parse(str) + if err != nil { + return nil, validation.WrapError(err) + } + + return t.Node, nil +} + +func UnmarshalExprValue(v interface{}) (ast.Node, error) { + n, err := exprVal(v) + if err != nil { + return nil, validation.WrapError(err) + } + if !ExprIsLiteral(n) { + return nil, validation.NewGenericError("must be a literal value") + } + + return n, nil +} + +func UnmarshalExprIdentifier(v interface{}) (ast.Node, error) { + n, err := exprVal(v) + if err != nil { + return nil, validation.WrapError(err) + } + if !ExprIsID(n) { + return nil, validation.NewGenericError("must be an identifier") + } + + return n, nil +} + +func UnmarshalExprOperator(v interface{}) (string, error) { + n, err := exprVal(v) + if err != nil { + return "", validation.WrapError(err) + } + bin, ok := n.(*ast.BinaryNode) + if !ok { + return "", validation.NewGenericError("invalid operator") + } + if _, ok := bin.Left.(*ast.IdentifierNode); !ok { + return "", validation.NewGenericError("invalid operator") + } + if _, ok := bin.Right.(*ast.IdentifierNode); !ok { + return "", validation.NewGenericError("invalid operator") + } + + return bin.Operator, nil +} diff --git a/graphql2/exprscalar_test.go b/graphql2/exprscalar_test.go new file mode 100644 index 0000000000..96b5725112 --- /dev/null +++ b/graphql2/exprscalar_test.go @@ -0,0 +1,30 @@ +package graphql2 + +import ( + "testing" + + "github.com/expr-lang/expr/parser" + "github.com/stretchr/testify/require" +) + +func TestExprIsID(t *testing.T) { + check := func(desc, expr string, expected bool) { + t.Helper() + + t.Run(desc, func(t *testing.T) { + t.Log("expr:", expr) + tree, err := parser.Parse(expr) + require.NoError(t, err) + + require.Equal(t, expected, ExprIsID(tree.Node)) + }) + } + + check("simple", "foo", true) + check("member", "foo.bar", true) + check("method", "foo.bar()", false) + check("array member", "foo[0].bar.baz", true) + check("map member", "foo['asdf'].bar.baz", true) + check("map member", "foo['asdf'].bar.baz", true) + check("maybe member", "foo['asdf']?.bar.baz", true) +} diff --git a/graphql2/generated.go b/graphql2/generated.go index 7be8c43c28..910317e261 100644 --- a/graphql2/generated.go +++ b/graphql2/generated.go @@ -15,6 +15,7 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" + ast1 "github.com/expr-lang/expr/ast" "github.com/target/goalert/alert" "github.com/target/goalert/alert/alertlog" "github.com/target/goalert/alert/alertmetrics" @@ -69,6 +70,7 @@ type ResolverRoot interface { Destination() DestinationResolver EscalationPolicy() EscalationPolicyResolver EscalationPolicyStep() EscalationPolicyStepResolver + Expr() ExprResolver GQLAPIKey() GQLAPIKeyResolver HeartbeatMonitor() HeartbeatMonitorResolver IntegrationKey() IntegrationKeyResolver @@ -98,6 +100,11 @@ type DirectiveRoot struct { } type ComplexityRoot struct { + Action struct { + Dest func(childComplexity int) int + Params func(childComplexity int) int + } + Alert struct { AlertID func(childComplexity int) int CreatedAt func(childComplexity int) int @@ -171,6 +178,17 @@ type ComplexityRoot struct { PageInfo func(childComplexity int) int } + Clause struct { + Field func(childComplexity int) int + Negate func(childComplexity int) int + Operator func(childComplexity int) int + Value func(childComplexity int) int + } + + Condition struct { + Clauses func(childComplexity int) int + } + ConfigHint struct { ID func(childComplexity int) int Value func(childComplexity int) int @@ -269,6 +287,11 @@ type ComplexityRoot struct { UserDisclaimer func(childComplexity int) int } + DynamicParam struct { + Expr func(childComplexity int) int + ParamID func(childComplexity int) int + } + EscalationPolicy struct { AssignedTo func(childComplexity int) int Description func(childComplexity int) int @@ -295,6 +318,11 @@ type ComplexityRoot struct { Targets func(childComplexity int) int } + Expr struct { + ConditionToExpr func(childComplexity int, input ConditionToExprInput) int + ExprToCondition func(childComplexity int, input ExprToConditionInput) int + } + FieldSearchConnection struct { Nodes func(childComplexity int) int PageInfo func(childComplexity int) int @@ -344,6 +372,7 @@ type ComplexityRoot struct { } IntegrationKey struct { + Config func(childComplexity int) int ExternalSystemName func(childComplexity int) int Href func(childComplexity int) int ID func(childComplexity int) int @@ -364,6 +393,20 @@ type ComplexityRoot struct { Name func(childComplexity int) int } + KeyConfig struct { + DefaultActions func(childComplexity int) int + Rules func(childComplexity int) int + StopAtFirstRule func(childComplexity int) int + } + + KeyRule struct { + Actions func(childComplexity int) int + ConditionExpr func(childComplexity int) int + Description func(childComplexity int) int + ID func(childComplexity int) int + Name func(childComplexity int) int + } + Label struct { Key func(childComplexity int) int Value func(childComplexity int) int @@ -434,6 +477,7 @@ type ComplexityRoot struct { UpdateEscalationPolicyStep func(childComplexity int, input UpdateEscalationPolicyStepInput) int UpdateGQLAPIKey func(childComplexity int, input UpdateGQLAPIKeyInput) int UpdateHeartbeatMonitor func(childComplexity int, input UpdateHeartbeatMonitorInput) int + UpdateKeyConfig func(childComplexity int, input UpdateKeyConfigInput) int UpdateRotation func(childComplexity int, input UpdateRotationInput) int UpdateSchedule func(childComplexity int, input UpdateScheduleInput) int UpdateScheduleTarget func(childComplexity int, input ScheduleTargetInput) int @@ -504,6 +548,7 @@ type ComplexityRoot struct { EscalationPolicies func(childComplexity int, input *EscalationPolicySearchOptions) int EscalationPolicy func(childComplexity int, id string) int ExperimentalFlags func(childComplexity int) int + Expr func(childComplexity int) int GenerateSlackAppManifest func(childComplexity int) int GqlAPIKeys func(childComplexity int) int HeartbeatMonitor func(childComplexity int, id string) int @@ -822,6 +867,10 @@ type EscalationPolicyStepResolver interface { EscalationPolicy(ctx context.Context, obj *escalation.Step) (*escalation.Policy, error) Actions(ctx context.Context, obj *escalation.Step) ([]Destination, error) } +type ExprResolver interface { + ExprToCondition(ctx context.Context, obj *Expr, input ExprToConditionInput) (*Condition, error) + ConditionToExpr(ctx context.Context, obj *Expr, input ConditionToExprInput) (string, error) +} type GQLAPIKeyResolver interface { CreatedBy(ctx context.Context, obj *GQLAPIKey) (*user.User, error) @@ -836,6 +885,8 @@ type IntegrationKeyResolver interface { Type(ctx context.Context, obj *integrationkey.IntegrationKey) (IntegrationKeyType, error) Href(ctx context.Context, obj *integrationkey.IntegrationKey) (string, error) + + Config(ctx context.Context, obj *integrationkey.IntegrationKey) (*KeyConfig, error) } type MessageLogConnectionStatsResolver interface { TimeSeries(ctx context.Context, obj *notification.SearchOptions, input TimeSeriesOptions) ([]TimeSeriesBucket, error) @@ -893,6 +944,7 @@ type MutationResolver interface { CreateGQLAPIKey(ctx context.Context, input CreateGQLAPIKeyInput) (*CreatedGQLAPIKey, error) UpdateGQLAPIKey(ctx context.Context, input UpdateGQLAPIKeyInput) (bool, error) DeleteGQLAPIKey(ctx context.Context, id string) (bool, error) + UpdateKeyConfig(ctx context.Context, input UpdateKeyConfigInput) (bool, error) } type OnCallNotificationRuleResolver interface { Target(ctx context.Context, obj *schedule.OnCallNotificationRule) (*assignment.RawTarget, error) @@ -948,6 +1000,7 @@ type QueryResolver interface { DestinationFieldSearch(ctx context.Context, input DestinationFieldSearchInput) (*FieldSearchConnection, error) DestinationFieldValueName(ctx context.Context, input DestinationFieldValidateInput) (string, error) DestinationDisplayInfo(ctx context.Context, input DestinationInput) (*DestinationDisplayInfo, error) + Expr(ctx context.Context) (*Expr, error) GqlAPIKeys(ctx context.Context) ([]GQLAPIKey, error) } type RotationResolver interface { @@ -1060,6 +1113,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in _ = ec switch typeName + "." + field { + case "Action.dest": + if e.complexity.Action.Dest == nil { + break + } + + return e.complexity.Action.Dest(childComplexity), true + + case "Action.params": + if e.complexity.Action.Params == nil { + break + } + + return e.complexity.Action.Params(childComplexity), true + case "Alert.alertID": if e.complexity.Alert.AlertID == nil { break @@ -1350,6 +1417,41 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.AuthSubjectConnection.PageInfo(childComplexity), true + case "Clause.field": + if e.complexity.Clause.Field == nil { + break + } + + return e.complexity.Clause.Field(childComplexity), true + + case "Clause.negate": + if e.complexity.Clause.Negate == nil { + break + } + + return e.complexity.Clause.Negate(childComplexity), true + + case "Clause.operator": + if e.complexity.Clause.Operator == nil { + break + } + + return e.complexity.Clause.Operator(childComplexity), true + + case "Clause.value": + if e.complexity.Clause.Value == nil { + break + } + + return e.complexity.Clause.Value(childComplexity), true + + case "Condition.clauses": + if e.complexity.Condition.Clauses == nil { + break + } + + return e.complexity.Condition.Clauses(childComplexity), true + case "ConfigHint.id": if e.complexity.ConfigHint.ID == nil { break @@ -1784,6 +1886,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.DestinationTypeInfo.UserDisclaimer(childComplexity), true + case "DynamicParam.expr": + if e.complexity.DynamicParam.Expr == nil { + break + } + + return e.complexity.DynamicParam.Expr(childComplexity), true + + case "DynamicParam.paramID": + if e.complexity.DynamicParam.ParamID == nil { + break + } + + return e.complexity.DynamicParam.ParamID(childComplexity), true + case "EscalationPolicy.assignedTo": if e.complexity.EscalationPolicy.AssignedTo == nil { break @@ -1903,6 +2019,30 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.EscalationPolicyStep.Targets(childComplexity), true + case "Expr.conditionToExpr": + if e.complexity.Expr.ConditionToExpr == nil { + break + } + + args, err := ec.field_Expr_conditionToExpr_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Expr.ConditionToExpr(childComplexity, args["input"].(ConditionToExprInput)), true + + case "Expr.exprToCondition": + if e.complexity.Expr.ExprToCondition == nil { + break + } + + args, err := ec.field_Expr_exprToCondition_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Expr.ExprToCondition(childComplexity, args["input"].(ExprToConditionInput)), true + case "FieldSearchConnection.nodes": if e.complexity.FieldSearchConnection.Nodes == nil { break @@ -2113,6 +2253,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.HeartbeatMonitor.TimeoutMinutes(childComplexity), true + case "IntegrationKey.config": + if e.complexity.IntegrationKey.Config == nil { + break + } + + return e.complexity.IntegrationKey.Config(childComplexity), true + case "IntegrationKey.externalSystemName": if e.complexity.IntegrationKey.ExternalSystemName == nil { break @@ -2197,6 +2344,62 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.IntegrationKeyTypeInfo.Name(childComplexity), true + case "KeyConfig.defaultActions": + if e.complexity.KeyConfig.DefaultActions == nil { + break + } + + return e.complexity.KeyConfig.DefaultActions(childComplexity), true + + case "KeyConfig.rules": + if e.complexity.KeyConfig.Rules == nil { + break + } + + return e.complexity.KeyConfig.Rules(childComplexity), true + + case "KeyConfig.stopAtFirstRule": + if e.complexity.KeyConfig.StopAtFirstRule == nil { + break + } + + return e.complexity.KeyConfig.StopAtFirstRule(childComplexity), true + + case "KeyRule.actions": + if e.complexity.KeyRule.Actions == nil { + break + } + + return e.complexity.KeyRule.Actions(childComplexity), true + + case "KeyRule.conditionExpr": + if e.complexity.KeyRule.ConditionExpr == nil { + break + } + + return e.complexity.KeyRule.ConditionExpr(childComplexity), true + + case "KeyRule.description": + if e.complexity.KeyRule.Description == nil { + break + } + + return e.complexity.KeyRule.Description(childComplexity), true + + case "KeyRule.id": + if e.complexity.KeyRule.ID == nil { + break + } + + return e.complexity.KeyRule.ID(childComplexity), true + + case "KeyRule.name": + if e.complexity.KeyRule.Name == nil { + break + } + + return e.complexity.KeyRule.Name(childComplexity), true + case "Label.key": if e.complexity.Label.Key == nil { break @@ -2790,6 +2993,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.UpdateHeartbeatMonitor(childComplexity, args["input"].(UpdateHeartbeatMonitorInput)), true + case "Mutation.updateKeyConfig": + if e.complexity.Mutation.UpdateKeyConfig == nil { + break + } + + args, err := ec.field_Mutation_updateKeyConfig_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.UpdateKeyConfig(childComplexity, args["input"].(UpdateKeyConfigInput)), true + case "Mutation.updateRotation": if e.complexity.Mutation.UpdateRotation == nil { break @@ -3243,6 +3458,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.ExperimentalFlags(childComplexity), true + case "Query.expr": + if e.complexity.Query.Expr == nil { + break + } + + return e.complexity.Query.Expr(childComplexity), true + case "Query.generateSlackAppManifest": if e.complexity.Query.GenerateSlackAppManifest == nil { break @@ -4691,14 +4913,18 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { rc := graphql.GetOperationContext(ctx) ec := executionContext{rc, e, 0, 0, make(chan graphql.DeferredResult)} inputUnmarshalMap := graphql.BuildUnmarshalerMap( + ec.unmarshalInputActionInput, ec.unmarshalInputAlertMetadataInput, ec.unmarshalInputAlertMetricsOptions, ec.unmarshalInputAlertRecentEventsOptions, ec.unmarshalInputAlertSearchOptions, ec.unmarshalInputAuthSubjectInput, ec.unmarshalInputCalcRotationHandoffTimesInput, + ec.unmarshalInputClauseInput, ec.unmarshalInputClearTemporarySchedulesInput, ec.unmarshalInputCloseMatchingAlertInput, + ec.unmarshalInputConditionInput, + ec.unmarshalInputConditionToExprInput, ec.unmarshalInputConfigValueInput, ec.unmarshalInputCreateAlertInput, ec.unmarshalInputCreateBasicAuthInput, @@ -4722,9 +4948,12 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec.unmarshalInputDestinationFieldSearchInput, ec.unmarshalInputDestinationFieldValidateInput, ec.unmarshalInputDestinationInput, + ec.unmarshalInputDynamicParamInput, ec.unmarshalInputEscalationPolicySearchOptions, + ec.unmarshalInputExprToConditionInput, ec.unmarshalInputFieldValueInput, ec.unmarshalInputIntegrationKeySearchOptions, + ec.unmarshalInputKeyRuleInput, ec.unmarshalInputLabelKeySearchOptions, ec.unmarshalInputLabelSearchOptions, ec.unmarshalInputLabelValueSearchOptions, @@ -4755,6 +4984,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec.unmarshalInputUpdateEscalationPolicyStepInput, ec.unmarshalInputUpdateGQLAPIKeyInput, ec.unmarshalInputUpdateHeartbeatMonitorInput, + ec.unmarshalInputUpdateKeyConfigInput, ec.unmarshalInputUpdateRotationInput, ec.unmarshalInputUpdateScheduleInput, ec.unmarshalInputUpdateServiceInput, @@ -4861,7 +5091,7 @@ func (ec *executionContext) introspectType(name string) (*introspection.Type, er return introspection.WrapTypeFromDef(ec.Schema(), ec.Schema().Types[name]), nil } -//go:embed "schema.graphql" "graph/_Mutation.graphqls" "graph/_Query.graphqls" "graph/_directives.graphqls" "graph/destinations.graphqls" "graph/errorcodes.graphqls" "graph/escalationpolicy.graphqls" "graph/gqlapikeys.graphqls" +//go:embed "schema.graphql" "graph/_Mutation.graphqls" "graph/_Query.graphqls" "graph/_directives.graphqls" "graph/destinations.graphqls" "graph/errorcodes.graphqls" "graph/escalationpolicy.graphqls" "graph/expr.graphqls" "graph/gqlapikeys.graphqls" "graph/univkeys.graphqls" var sourcesFS embed.FS func sourceData(filename string) string { @@ -4880,7 +5110,9 @@ var sources = []*ast.Source{ {Name: "graph/destinations.graphqls", Input: sourceData("graph/destinations.graphqls"), BuiltIn: false}, {Name: "graph/errorcodes.graphqls", Input: sourceData("graph/errorcodes.graphqls"), BuiltIn: false}, {Name: "graph/escalationpolicy.graphqls", Input: sourceData("graph/escalationpolicy.graphqls"), BuiltIn: false}, + {Name: "graph/expr.graphqls", Input: sourceData("graph/expr.graphqls"), BuiltIn: false}, {Name: "graph/gqlapikeys.graphqls", Input: sourceData("graph/gqlapikeys.graphqls"), BuiltIn: false}, + {Name: "graph/univkeys.graphqls", Input: sourceData("graph/univkeys.graphqls"), BuiltIn: false}, } var parsedSchema = gqlparser.MustLoadSchema(sources...) @@ -4933,6 +5165,36 @@ func (ec *executionContext) field_Alert_recentEvents_args(ctx context.Context, r return args, nil } +func (ec *executionContext) field_Expr_conditionToExpr_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 ConditionToExprInput + if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + arg0, err = ec.unmarshalNConditionToExprInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐConditionToExprInput(ctx, tmp) + if err != nil { + return nil, err + } + } + args["input"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Expr_exprToCondition_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 ExprToConditionInput + if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + arg0, err = ec.unmarshalNExprToConditionInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐExprToConditionInput(ctx, tmp) + if err != nil { + return nil, err + } + } + args["input"] = arg0 + return args, nil +} + func (ec *executionContext) field_MessageLogConnectionStats_timeSeries_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -5578,6 +5840,21 @@ func (ec *executionContext) field_Mutation_updateHeartbeatMonitor_args(ctx conte return args, nil } +func (ec *executionContext) field_Mutation_updateKeyConfig_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 UpdateKeyConfigInput + if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + arg0, err = ec.unmarshalNUpdateKeyConfigInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐUpdateKeyConfigInput(ctx, tmp) + if err != nil { + return nil, err + } + } + args["input"] = arg0 + return args, nil +} + func (ec *executionContext) field_Mutation_updateRotation_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -6459,8 +6736,8 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg // region **************************** field.gotpl ***************************** -func (ec *executionContext) _Alert_id(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Alert_id(ctx, field) +func (ec *executionContext) _Action_dest(ctx context.Context, field graphql.CollectedField, obj *Action) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Action_dest(ctx, field) if err != nil { return graphql.Null } @@ -6473,7 +6750,7 @@ func (ec *executionContext) _Alert_id(ctx context.Context, field graphql.Collect }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Alert().ID(rctx, obj) + return obj.Dest, nil }) if err != nil { ec.Error(ctx, err) @@ -6485,26 +6762,34 @@ func (ec *executionContext) _Alert_id(ctx context.Context, field graphql.Collect } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*Destination) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNDestination2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestination(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Alert_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Action_dest(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Alert", + Object: "Action", Field: field, - IsMethod: true, - IsResolver: true, + 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") + switch field.Name { + case "type": + return ec.fieldContext_Destination_type(ctx, field) + case "values": + return ec.fieldContext_Destination_values(ctx, field) + case "displayInfo": + return ec.fieldContext_Destination_displayInfo(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Destination", field.Name) }, } return fc, nil } -func (ec *executionContext) _Alert_alertID(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Alert_alertID(ctx, field) +func (ec *executionContext) _Action_params(ctx context.Context, field graphql.CollectedField, obj *Action) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Action_params(ctx, field) if err != nil { return graphql.Null } @@ -6517,7 +6802,7 @@ func (ec *executionContext) _Alert_alertID(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Alert().AlertID(rctx, obj) + return obj.Params, nil }) if err != nil { ec.Error(ctx, err) @@ -6529,26 +6814,76 @@ func (ec *executionContext) _Alert_alertID(ctx context.Context, field graphql.Co } return graphql.Null } - res := resTmp.(int) + res := resTmp.([]DynamicParam) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNDynamicParam2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDynamicParamᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Alert_alertID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Action_params(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Action", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "paramID": + return ec.fieldContext_DynamicParam_paramID(ctx, field) + case "expr": + return ec.fieldContext_DynamicParam_expr(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DynamicParam", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Alert_id(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Alert_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) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Alert().ID(rctx, obj) + }) + 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.marshalNID2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Alert_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Alert", Field: field, IsMethod: true, IsResolver: true, 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 nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Alert_status(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Alert_status(ctx, field) +func (ec *executionContext) _Alert_alertID(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Alert_alertID(ctx, field) if err != nil { return graphql.Null } @@ -6561,7 +6896,7 @@ func (ec *executionContext) _Alert_status(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Alert().Status(rctx, obj) + return ec.resolvers.Alert().AlertID(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -6573,26 +6908,26 @@ func (ec *executionContext) _Alert_status(ctx context.Context, field graphql.Col } return graphql.Null } - res := resTmp.(AlertStatus) + res := resTmp.(int) fc.Result = res - return ec.marshalNAlertStatus2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐAlertStatus(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Alert_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Alert_alertID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Alert", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type AlertStatus does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Alert_summary(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Alert_summary(ctx, field) +func (ec *executionContext) _Alert_status(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Alert_status(ctx, field) if err != nil { return graphql.Null } @@ -6605,7 +6940,7 @@ func (ec *executionContext) _Alert_summary(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Summary, nil + return ec.resolvers.Alert().Status(rctx, obj) }) if err != nil { ec.Error(ctx, err) @@ -6617,26 +6952,26 @@ func (ec *executionContext) _Alert_summary(ctx context.Context, field graphql.Co } return graphql.Null } - res := resTmp.(string) + res := resTmp.(AlertStatus) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNAlertStatus2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐAlertStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Alert_summary(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Alert_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Alert", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, 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 nil, errors.New("field of type AlertStatus does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Alert_details(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Alert_details(ctx, field) +func (ec *executionContext) _Alert_summary(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Alert_summary(ctx, field) if err != nil { return graphql.Null } @@ -6649,7 +6984,7 @@ func (ec *executionContext) _Alert_details(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Details, nil + return obj.Summary, nil }) if err != nil { ec.Error(ctx, err) @@ -6666,7 +7001,51 @@ func (ec *executionContext) _Alert_details(ctx context.Context, field graphql.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Alert_details(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Alert_summary(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Alert", + 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) _Alert_details(ctx context.Context, field graphql.CollectedField, obj *alert.Alert) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Alert_details(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) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Details, 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_Alert_details(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Alert", Field: field, @@ -6710,7 +7089,7 @@ func (ec *executionContext) _Alert_createdAt(ctx context.Context, field graphql. return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Alert_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Alert_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Alert", Field: field, @@ -6754,7 +7133,7 @@ func (ec *executionContext) _Alert_serviceID(ctx context.Context, field graphql. return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Alert_serviceID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Alert_serviceID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Alert", Field: field, @@ -6795,7 +7174,7 @@ func (ec *executionContext) _Alert_service(ctx context.Context, field graphql.Co return ec.marshalOService2ᚖgithubᚗcomᚋtargetᚋgoalertᚋserviceᚐService(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Alert_service(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Alert_service(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Alert", Field: field, @@ -6862,7 +7241,7 @@ func (ec *executionContext) _Alert_state(ctx context.Context, field graphql.Coll return ec.marshalOAlertState2ᚖgithubᚗcomᚋtargetᚋgoalertᚋalertᚐState(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Alert_state(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Alert_state(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Alert", Field: field, @@ -6975,7 +7354,7 @@ func (ec *executionContext) _Alert_pendingNotifications(ctx context.Context, fie return ec.marshalNAlertPendingNotification2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐAlertPendingNotificationᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Alert_pendingNotifications(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Alert_pendingNotifications(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Alert", Field: field, @@ -7020,7 +7399,7 @@ func (ec *executionContext) _Alert_metrics(ctx context.Context, field graphql.Co return ec.marshalOAlertMetric2ᚖgithubᚗcomᚋtargetᚋgoalertᚋalertᚋalertmetricsᚐMetric(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Alert_metrics(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Alert_metrics(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Alert", Field: field, @@ -7071,7 +7450,7 @@ func (ec *executionContext) _Alert_noiseReason(ctx context.Context, field graphq return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Alert_noiseReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Alert_noiseReason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Alert", Field: field, @@ -7112,7 +7491,7 @@ func (ec *executionContext) _Alert_meta(ctx context.Context, field graphql.Colle return ec.marshalOAlertMetadata2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐAlertMetadataᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Alert_meta(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Alert_meta(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Alert", Field: field, @@ -7217,7 +7596,7 @@ func (ec *executionContext) _AlertConnection_nodes(ctx context.Context, field gr return ec.marshalNAlert2ᚕgithubᚗcomᚋtargetᚋgoalertᚋalertᚐAlertᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AlertConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AlertConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AlertConnection", Field: field, @@ -7293,7 +7672,7 @@ func (ec *executionContext) _AlertConnection_pageInfo(ctx context.Context, field return ec.marshalNPageInfo2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AlertConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AlertConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AlertConnection", Field: field, @@ -7343,7 +7722,7 @@ func (ec *executionContext) _AlertDataPoint_timestamp(ctx context.Context, field return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AlertDataPoint_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AlertDataPoint_timestamp(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AlertDataPoint", Field: field, @@ -7387,7 +7766,7 @@ func (ec *executionContext) _AlertDataPoint_alertCount(ctx context.Context, fiel return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AlertDataPoint_alertCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AlertDataPoint_alertCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AlertDataPoint", Field: field, @@ -7431,7 +7810,7 @@ func (ec *executionContext) _AlertLogEntry_id(ctx context.Context, field graphql return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AlertLogEntry_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AlertLogEntry_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AlertLogEntry", Field: field, @@ -7475,7 +7854,7 @@ func (ec *executionContext) _AlertLogEntry_timestamp(ctx context.Context, field return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AlertLogEntry_timestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AlertLogEntry_timestamp(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AlertLogEntry", Field: field, @@ -7519,7 +7898,7 @@ func (ec *executionContext) _AlertLogEntry_message(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AlertLogEntry_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AlertLogEntry_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AlertLogEntry", Field: field, @@ -7560,7 +7939,7 @@ func (ec *executionContext) _AlertLogEntry_state(ctx context.Context, field grap return ec.marshalONotificationState2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐNotificationState(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AlertLogEntry_state(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AlertLogEntry_state(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AlertLogEntry", Field: field, @@ -7612,7 +7991,7 @@ func (ec *executionContext) _AlertLogEntryConnection_nodes(ctx context.Context, return ec.marshalNAlertLogEntry2ᚕgithubᚗcomᚋtargetᚋgoalertᚋalertᚋalertlogᚐEntryᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AlertLogEntryConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AlertLogEntryConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AlertLogEntryConnection", Field: field, @@ -7666,7 +8045,7 @@ func (ec *executionContext) _AlertLogEntryConnection_pageInfo(ctx context.Contex return ec.marshalNPageInfo2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AlertLogEntryConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AlertLogEntryConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AlertLogEntryConnection", Field: field, @@ -7716,7 +8095,7 @@ func (ec *executionContext) _AlertMetadata_key(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AlertMetadata_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AlertMetadata_key(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AlertMetadata", Field: field, @@ -7760,7 +8139,7 @@ func (ec *executionContext) _AlertMetadata_value(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AlertMetadata_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AlertMetadata_value(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AlertMetadata", Field: field, @@ -7804,7 +8183,7 @@ func (ec *executionContext) _AlertMetric_escalated(ctx context.Context, field gr return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AlertMetric_escalated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AlertMetric_escalated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AlertMetric", Field: field, @@ -7848,7 +8227,7 @@ func (ec *executionContext) _AlertMetric_closedAt(ctx context.Context, field gra return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AlertMetric_closedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AlertMetric_closedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AlertMetric", Field: field, @@ -7892,7 +8271,7 @@ func (ec *executionContext) _AlertMetric_timeToAck(ctx context.Context, field gr return ec.marshalNISODuration2ᚖgithubᚗcomᚋtargetᚋgoalertᚋutilᚋtimeutilᚐISODuration(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AlertMetric_timeToAck(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AlertMetric_timeToAck(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AlertMetric", Field: field, @@ -7936,7 +8315,7 @@ func (ec *executionContext) _AlertMetric_timeToClose(ctx context.Context, field return ec.marshalNISODuration2ᚖgithubᚗcomᚋtargetᚋgoalertᚋutilᚋtimeutilᚐISODuration(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AlertMetric_timeToClose(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AlertMetric_timeToClose(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AlertMetric", Field: field, @@ -7980,7 +8359,7 @@ func (ec *executionContext) _AlertPendingNotification_destination(ctx context.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AlertPendingNotification_destination(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AlertPendingNotification_destination(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AlertPendingNotification", Field: field, @@ -8024,7 +8403,7 @@ func (ec *executionContext) _AlertState_lastEscalation(ctx context.Context, fiel return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AlertState_lastEscalation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AlertState_lastEscalation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AlertState", Field: field, @@ -8068,7 +8447,7 @@ func (ec *executionContext) _AlertState_stepNumber(ctx context.Context, field gr return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AlertState_stepNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AlertState_stepNumber(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AlertState", Field: field, @@ -8112,7 +8491,7 @@ func (ec *executionContext) _AlertState_repeatCount(ctx context.Context, field g return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AlertState_repeatCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AlertState_repeatCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AlertState", Field: field, @@ -8156,7 +8535,7 @@ func (ec *executionContext) _AuthSubject_providerID(ctx context.Context, field g return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AuthSubject_providerID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AuthSubject_providerID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AuthSubject", Field: field, @@ -8200,7 +8579,7 @@ func (ec *executionContext) _AuthSubject_subjectID(ctx context.Context, field gr return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AuthSubject_subjectID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AuthSubject_subjectID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AuthSubject", Field: field, @@ -8244,7 +8623,7 @@ func (ec *executionContext) _AuthSubject_userID(ctx context.Context, field graph return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AuthSubject_userID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AuthSubject_userID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AuthSubject", Field: field, @@ -8288,7 +8667,7 @@ func (ec *executionContext) _AuthSubjectConnection_nodes(ctx context.Context, fi return ec.marshalNAuthSubject2ᚕgithubᚗcomᚋtargetᚋgoalertᚋuserᚐAuthSubjectᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AuthSubjectConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AuthSubjectConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AuthSubjectConnection", Field: field, @@ -8340,7 +8719,7 @@ func (ec *executionContext) _AuthSubjectConnection_pageInfo(ctx context.Context, return ec.marshalNPageInfo2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_AuthSubjectConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_AuthSubjectConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "AuthSubjectConnection", Field: field, @@ -8359,8 +8738,8 @@ func (ec *executionContext) fieldContext_AuthSubjectConnection_pageInfo(ctx cont return fc, nil } -func (ec *executionContext) _ConfigHint_id(ctx context.Context, field graphql.CollectedField, obj *ConfigHint) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConfigHint_id(ctx, field) +func (ec *executionContext) _Clause_field(ctx context.Context, field graphql.CollectedField, obj *Clause) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Clause_field(ctx, field) if err != nil { return graphql.Null } @@ -8373,7 +8752,51 @@ func (ec *executionContext) _ConfigHint_id(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ID, nil + return obj.Field, 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.(ast1.Node) + fc.Result = res + return ec.marshalNExprIdentifier2githubᚗcomᚋexprᚑlangᚋexprᚋastᚐNode(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Clause_field(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Clause", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ExprIdentifier does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Clause_operator(ctx context.Context, field graphql.CollectedField, obj *Clause) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Clause_operator(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) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Operator, nil }) if err != nil { ec.Error(ctx, err) @@ -8387,24 +8810,24 @@ func (ec *executionContext) _ConfigHint_id(ctx context.Context, field graphql.Co } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNExprOperator2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigHint_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Clause_operator(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConfigHint", + Object: "Clause", 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 nil, errors.New("field of type ExprOperator does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ConfigHint_value(ctx context.Context, field graphql.CollectedField, obj *ConfigHint) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConfigHint_value(ctx, field) +func (ec *executionContext) _Clause_value(ctx context.Context, field graphql.CollectedField, obj *Clause) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Clause_value(ctx, field) if err != nil { return graphql.Null } @@ -8429,26 +8852,124 @@ func (ec *executionContext) _ConfigHint_value(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(string) + res := resTmp.(ast1.Node) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNExprValue2githubᚗcomᚋexprᚑlangᚋexprᚋastᚐNode(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigHint_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Clause_value(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConfigHint", + Object: "Clause", 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 nil, errors.New("field of type ExprValue does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ConfigValue_id(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConfigValue_id(ctx, field) +func (ec *executionContext) _Clause_negate(ctx context.Context, field graphql.CollectedField, obj *Clause) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Clause_negate(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) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Negate, 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_Clause_negate(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Clause", + 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) _Condition_clauses(ctx context.Context, field graphql.CollectedField, obj *Condition) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Condition_clauses(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) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Clauses, 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.([]Clause) + fc.Result = res + return ec.marshalNClause2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐClauseᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Condition_clauses(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Condition", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "field": + return ec.fieldContext_Clause_field(ctx, field) + case "operator": + return ec.fieldContext_Clause_operator(ctx, field) + case "value": + return ec.fieldContext_Clause_value(ctx, field) + case "negate": + return ec.fieldContext_Clause_negate(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Clause", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _ConfigHint_id(ctx context.Context, field graphql.CollectedField, obj *ConfigHint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConfigHint_id(ctx, field) if err != nil { return graphql.Null } @@ -8478,9 +8999,9 @@ func (ec *executionContext) _ConfigValue_id(ctx context.Context, field graphql.C return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigValue_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigHint_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConfigValue", + Object: "ConfigHint", Field: field, IsMethod: false, IsResolver: false, @@ -8491,8 +9012,8 @@ func (ec *executionContext) fieldContext_ConfigValue_id(ctx context.Context, fie return fc, nil } -func (ec *executionContext) _ConfigValue_description(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConfigValue_description(ctx, field) +func (ec *executionContext) _ConfigHint_value(ctx context.Context, field graphql.CollectedField, obj *ConfigHint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConfigHint_value(ctx, field) if err != nil { return graphql.Null } @@ -8505,7 +9026,7 @@ func (ec *executionContext) _ConfigValue_description(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description, nil + return obj.Value, nil }) if err != nil { ec.Error(ctx, err) @@ -8522,9 +9043,9 @@ func (ec *executionContext) _ConfigValue_description(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigHint_value(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ConfigValue", + Object: "ConfigHint", Field: field, IsMethod: false, IsResolver: false, @@ -8535,8 +9056,8 @@ func (ec *executionContext) fieldContext_ConfigValue_description(ctx context.Con return fc, nil } -func (ec *executionContext) _ConfigValue_value(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConfigValue_value(ctx, field) +func (ec *executionContext) _ConfigValue_id(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConfigValue_id(ctx, field) if err != nil { return graphql.Null } @@ -8549,7 +9070,7 @@ func (ec *executionContext) _ConfigValue_value(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Value, nil + return obj.ID, nil }) if err != nil { ec.Error(ctx, err) @@ -8566,7 +9087,7 @@ func (ec *executionContext) _ConfigValue_value(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigValue_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigValue_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ConfigValue", Field: field, @@ -8579,8 +9100,8 @@ func (ec *executionContext) fieldContext_ConfigValue_value(ctx context.Context, return fc, nil } -func (ec *executionContext) _ConfigValue_type(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConfigValue_type(ctx, field) +func (ec *executionContext) _ConfigValue_description(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConfigValue_description(ctx, field) if err != nil { return graphql.Null } @@ -8593,7 +9114,7 @@ func (ec *executionContext) _ConfigValue_type(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Type, nil + return obj.Description, nil }) if err != nil { ec.Error(ctx, err) @@ -8605,26 +9126,26 @@ func (ec *executionContext) _ConfigValue_type(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(ConfigType) + res := resTmp.(string) fc.Result = res - return ec.marshalNConfigType2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐConfigType(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigValue_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ConfigValue", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ConfigType does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ConfigValue_password(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConfigValue_password(ctx, field) +func (ec *executionContext) _ConfigValue_value(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConfigValue_value(ctx, field) if err != nil { return graphql.Null } @@ -8637,7 +9158,7 @@ func (ec *executionContext) _ConfigValue_password(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Password, nil + return obj.Value, nil }) if err != nil { ec.Error(ctx, err) @@ -8649,26 +9170,26 @@ func (ec *executionContext) _ConfigValue_password(ctx context.Context, field gra } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(string) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigValue_password(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigValue_value(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ConfigValue", 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 nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ConfigValue_deprecated(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ConfigValue_deprecated(ctx, field) +func (ec *executionContext) _ConfigValue_type(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConfigValue_type(ctx, field) if err != nil { return graphql.Null } @@ -8681,7 +9202,7 @@ func (ec *executionContext) _ConfigValue_deprecated(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Deprecated, nil + return obj.Type, nil }) if err != nil { ec.Error(ctx, err) @@ -8693,26 +9214,26 @@ func (ec *executionContext) _ConfigValue_deprecated(ctx context.Context, field g } return graphql.Null } - res := resTmp.(string) + res := resTmp.(ConfigType) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNConfigType2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐConfigType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ConfigValue_deprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigValue_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ConfigValue", 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 nil, errors.New("field of type ConfigType does not have child fields") }, } return fc, nil } -func (ec *executionContext) _CreatedGQLAPIKey_id(ctx context.Context, field graphql.CollectedField, obj *CreatedGQLAPIKey) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CreatedGQLAPIKey_id(ctx, field) +func (ec *executionContext) _ConfigValue_password(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConfigValue_password(ctx, field) if err != nil { return graphql.Null } @@ -8725,7 +9246,7 @@ func (ec *executionContext) _CreatedGQLAPIKey_id(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ID, nil + return obj.Password, nil }) if err != nil { ec.Error(ctx, err) @@ -8737,26 +9258,26 @@ func (ec *executionContext) _CreatedGQLAPIKey_id(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(string) + res := resTmp.(bool) fc.Result = res - return ec.marshalNID2string(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CreatedGQLAPIKey_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigValue_password(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CreatedGQLAPIKey", + Object: "ConfigValue", 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 nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _CreatedGQLAPIKey_token(ctx context.Context, field graphql.CollectedField, obj *CreatedGQLAPIKey) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_CreatedGQLAPIKey_token(ctx, field) +func (ec *executionContext) _ConfigValue_deprecated(ctx context.Context, field graphql.CollectedField, obj *ConfigValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ConfigValue_deprecated(ctx, field) if err != nil { return graphql.Null } @@ -8769,7 +9290,7 @@ func (ec *executionContext) _CreatedGQLAPIKey_token(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Token, nil + return obj.Deprecated, nil }) if err != nil { ec.Error(ctx, err) @@ -8786,9 +9307,9 @@ func (ec *executionContext) _CreatedGQLAPIKey_token(ctx context.Context, field g return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_CreatedGQLAPIKey_token(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ConfigValue_deprecated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "CreatedGQLAPIKey", + Object: "ConfigValue", Field: field, IsMethod: false, IsResolver: false, @@ -8799,8 +9320,8 @@ func (ec *executionContext) fieldContext_CreatedGQLAPIKey_token(ctx context.Cont return fc, nil } -func (ec *executionContext) _DebugCarrierInfo_name(ctx context.Context, field graphql.CollectedField, obj *twilio.CarrierInfo) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DebugCarrierInfo_name(ctx, field) +func (ec *executionContext) _CreatedGQLAPIKey_id(ctx context.Context, field graphql.CollectedField, obj *CreatedGQLAPIKey) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CreatedGQLAPIKey_id(ctx, field) if err != nil { return graphql.Null } @@ -8813,7 +9334,7 @@ func (ec *executionContext) _DebugCarrierInfo_name(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return obj.ID, nil }) if err != nil { ec.Error(ctx, err) @@ -8827,24 +9348,24 @@ func (ec *executionContext) _DebugCarrierInfo_name(ctx context.Context, field gr } res := resTmp.(string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugCarrierInfo_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CreatedGQLAPIKey_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DebugCarrierInfo", + Object: "CreatedGQLAPIKey", 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 nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _DebugCarrierInfo_type(ctx context.Context, field graphql.CollectedField, obj *twilio.CarrierInfo) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DebugCarrierInfo_type(ctx, field) +func (ec *executionContext) _CreatedGQLAPIKey_token(ctx context.Context, field graphql.CollectedField, obj *CreatedGQLAPIKey) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CreatedGQLAPIKey_token(ctx, field) if err != nil { return graphql.Null } @@ -8857,7 +9378,7 @@ func (ec *executionContext) _DebugCarrierInfo_type(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Type, nil + return obj.Token, nil }) if err != nil { ec.Error(ctx, err) @@ -8874,9 +9395,9 @@ func (ec *executionContext) _DebugCarrierInfo_type(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugCarrierInfo_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_CreatedGQLAPIKey_token(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DebugCarrierInfo", + Object: "CreatedGQLAPIKey", Field: field, IsMethod: false, IsResolver: false, @@ -8887,8 +9408,8 @@ func (ec *executionContext) fieldContext_DebugCarrierInfo_type(ctx context.Conte return fc, nil } -func (ec *executionContext) _DebugCarrierInfo_mobileNetworkCode(ctx context.Context, field graphql.CollectedField, obj *twilio.CarrierInfo) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DebugCarrierInfo_mobileNetworkCode(ctx, field) +func (ec *executionContext) _DebugCarrierInfo_name(ctx context.Context, field graphql.CollectedField, obj *twilio.CarrierInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DebugCarrierInfo_name(ctx, field) if err != nil { return graphql.Null } @@ -8901,7 +9422,7 @@ func (ec *executionContext) _DebugCarrierInfo_mobileNetworkCode(ctx context.Cont }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MobileNetworkCode, nil + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) @@ -8918,7 +9439,95 @@ func (ec *executionContext) _DebugCarrierInfo_mobileNetworkCode(ctx context.Cont return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugCarrierInfo_mobileNetworkCode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DebugCarrierInfo_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "DebugCarrierInfo", + 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) _DebugCarrierInfo_type(ctx context.Context, field graphql.CollectedField, obj *twilio.CarrierInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DebugCarrierInfo_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) (interface{}, 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_DebugCarrierInfo_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "DebugCarrierInfo", + 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) _DebugCarrierInfo_mobileNetworkCode(ctx context.Context, field graphql.CollectedField, obj *twilio.CarrierInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DebugCarrierInfo_mobileNetworkCode(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) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MobileNetworkCode, 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_DebugCarrierInfo_mobileNetworkCode(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DebugCarrierInfo", Field: field, @@ -8962,7 +9571,7 @@ func (ec *executionContext) _DebugCarrierInfo_mobileCountryCode(ctx context.Cont return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugCarrierInfo_mobileCountryCode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DebugCarrierInfo_mobileCountryCode(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DebugCarrierInfo", Field: field, @@ -9006,7 +9615,7 @@ func (ec *executionContext) _DebugMessage_id(ctx context.Context, field graphql. return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugMessage_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DebugMessage_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DebugMessage", Field: field, @@ -9050,7 +9659,7 @@ func (ec *executionContext) _DebugMessage_createdAt(ctx context.Context, field g return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugMessage_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DebugMessage_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DebugMessage", Field: field, @@ -9094,7 +9703,7 @@ func (ec *executionContext) _DebugMessage_updatedAt(ctx context.Context, field g return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugMessage_updatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DebugMessage_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DebugMessage", Field: field, @@ -9138,7 +9747,7 @@ func (ec *executionContext) _DebugMessage_type(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugMessage_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DebugMessage_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DebugMessage", Field: field, @@ -9182,7 +9791,7 @@ func (ec *executionContext) _DebugMessage_status(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugMessage_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DebugMessage_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DebugMessage", Field: field, @@ -9223,7 +9832,7 @@ func (ec *executionContext) _DebugMessage_userID(ctx context.Context, field grap return ec.marshalOID2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugMessage_userID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DebugMessage_userID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DebugMessage", Field: field, @@ -9264,7 +9873,7 @@ func (ec *executionContext) _DebugMessage_userName(ctx context.Context, field gr return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugMessage_userName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DebugMessage_userName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DebugMessage", Field: field, @@ -9305,7 +9914,7 @@ func (ec *executionContext) _DebugMessage_source(ctx context.Context, field grap return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugMessage_source(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DebugMessage_source(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DebugMessage", Field: field, @@ -9349,7 +9958,7 @@ func (ec *executionContext) _DebugMessage_destination(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugMessage_destination(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DebugMessage_destination(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DebugMessage", Field: field, @@ -9390,7 +9999,7 @@ func (ec *executionContext) _DebugMessage_serviceID(ctx context.Context, field g return ec.marshalOID2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugMessage_serviceID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DebugMessage_serviceID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DebugMessage", Field: field, @@ -9431,7 +10040,7 @@ func (ec *executionContext) _DebugMessage_serviceName(ctx context.Context, field return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugMessage_serviceName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DebugMessage_serviceName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DebugMessage", Field: field, @@ -9472,7 +10081,7 @@ func (ec *executionContext) _DebugMessage_alertID(ctx context.Context, field gra return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugMessage_alertID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DebugMessage_alertID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DebugMessage", Field: field, @@ -9513,7 +10122,7 @@ func (ec *executionContext) _DebugMessage_providerID(ctx context.Context, field return ec.marshalOID2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugMessage_providerID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DebugMessage_providerID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DebugMessage", Field: field, @@ -9554,7 +10163,7 @@ func (ec *executionContext) _DebugMessage_sentAt(ctx context.Context, field grap return ec.marshalOISOTimestamp2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugMessage_sentAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DebugMessage_sentAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DebugMessage", Field: field, @@ -9598,7 +10207,7 @@ func (ec *executionContext) _DebugMessage_retryCount(ctx context.Context, field return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugMessage_retryCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DebugMessage_retryCount(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DebugMessage", Field: field, @@ -9642,7 +10251,7 @@ func (ec *executionContext) _DebugMessageStatusInfo_state(ctx context.Context, f return ec.marshalNNotificationState2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐNotificationState(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugMessageStatusInfo_state(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DebugMessageStatusInfo_state(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DebugMessageStatusInfo", Field: field, @@ -9694,7 +10303,7 @@ func (ec *executionContext) _DebugSendSMSInfo_id(ctx context.Context, field grap return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugSendSMSInfo_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DebugSendSMSInfo_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DebugSendSMSInfo", Field: field, @@ -9738,7 +10347,7 @@ func (ec *executionContext) _DebugSendSMSInfo_providerURL(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugSendSMSInfo_providerURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DebugSendSMSInfo_providerURL(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DebugSendSMSInfo", Field: field, @@ -9782,7 +10391,7 @@ func (ec *executionContext) _DebugSendSMSInfo_fromNumber(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DebugSendSMSInfo_fromNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DebugSendSMSInfo_fromNumber(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DebugSendSMSInfo", Field: field, @@ -9826,7 +10435,7 @@ func (ec *executionContext) _Destination_type(ctx context.Context, field graphql return ec.marshalNDestinationType2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Destination_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Destination_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Destination", Field: field, @@ -9870,7 +10479,7 @@ func (ec *executionContext) _Destination_values(ctx context.Context, field graph return ec.marshalNFieldValuePair2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐFieldValuePairᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Destination_values(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Destination_values(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Destination", Field: field, @@ -9920,7 +10529,7 @@ func (ec *executionContext) _Destination_displayInfo(ctx context.Context, field return ec.marshalNInlineDisplayInfo2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐInlineDisplayInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Destination_displayInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Destination_displayInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Destination", Field: field, @@ -9964,7 +10573,7 @@ func (ec *executionContext) _DestinationDisplayInfo_text(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationDisplayInfo_text(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationDisplayInfo_text(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationDisplayInfo", Field: field, @@ -10008,7 +10617,7 @@ func (ec *executionContext) _DestinationDisplayInfo_iconURL(ctx context.Context, return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationDisplayInfo_iconURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationDisplayInfo_iconURL(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationDisplayInfo", Field: field, @@ -10052,7 +10661,7 @@ func (ec *executionContext) _DestinationDisplayInfo_iconAltText(ctx context.Cont return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationDisplayInfo_iconAltText(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationDisplayInfo_iconAltText(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationDisplayInfo", Field: field, @@ -10096,7 +10705,7 @@ func (ec *executionContext) _DestinationDisplayInfo_linkURL(ctx context.Context, return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationDisplayInfo_linkURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationDisplayInfo_linkURL(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationDisplayInfo", Field: field, @@ -10140,7 +10749,7 @@ func (ec *executionContext) _DestinationDisplayInfoError_error(ctx context.Conte return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationDisplayInfoError_error(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationDisplayInfoError_error(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationDisplayInfoError", Field: field, @@ -10184,7 +10793,7 @@ func (ec *executionContext) _DestinationFieldConfig_fieldID(ctx context.Context, return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationFieldConfig_fieldID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationFieldConfig_fieldID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationFieldConfig", Field: field, @@ -10228,7 +10837,7 @@ func (ec *executionContext) _DestinationFieldConfig_label(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationFieldConfig_label(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationFieldConfig_label(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationFieldConfig", Field: field, @@ -10272,7 +10881,7 @@ func (ec *executionContext) _DestinationFieldConfig_hint(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationFieldConfig_hint(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationFieldConfig_hint(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationFieldConfig", Field: field, @@ -10316,7 +10925,7 @@ func (ec *executionContext) _DestinationFieldConfig_hintURL(ctx context.Context, return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationFieldConfig_hintURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationFieldConfig_hintURL(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationFieldConfig", Field: field, @@ -10360,7 +10969,7 @@ func (ec *executionContext) _DestinationFieldConfig_placeholderText(ctx context. return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationFieldConfig_placeholderText(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationFieldConfig_placeholderText(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationFieldConfig", Field: field, @@ -10404,7 +11013,7 @@ func (ec *executionContext) _DestinationFieldConfig_prefix(ctx context.Context, return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationFieldConfig_prefix(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationFieldConfig_prefix(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationFieldConfig", Field: field, @@ -10448,7 +11057,7 @@ func (ec *executionContext) _DestinationFieldConfig_inputType(ctx context.Contex return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationFieldConfig_inputType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationFieldConfig_inputType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationFieldConfig", Field: field, @@ -10492,7 +11101,7 @@ func (ec *executionContext) _DestinationFieldConfig_supportsSearch(ctx context.C return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationFieldConfig_supportsSearch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationFieldConfig_supportsSearch(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationFieldConfig", Field: field, @@ -10536,7 +11145,7 @@ func (ec *executionContext) _DestinationFieldConfig_supportsValidation(ctx conte return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationFieldConfig_supportsValidation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationFieldConfig_supportsValidation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationFieldConfig", Field: field, @@ -10580,7 +11189,7 @@ func (ec *executionContext) _DestinationTypeInfo_type(ctx context.Context, field return ec.marshalNDestinationType2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationTypeInfo_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationTypeInfo_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationTypeInfo", Field: field, @@ -10624,7 +11233,7 @@ func (ec *executionContext) _DestinationTypeInfo_name(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationTypeInfo_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationTypeInfo_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationTypeInfo", Field: field, @@ -10668,7 +11277,7 @@ func (ec *executionContext) _DestinationTypeInfo_iconURL(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationTypeInfo_iconURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationTypeInfo_iconURL(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationTypeInfo", Field: field, @@ -10712,7 +11321,7 @@ func (ec *executionContext) _DestinationTypeInfo_iconAltText(ctx context.Context return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationTypeInfo_iconAltText(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationTypeInfo_iconAltText(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationTypeInfo", Field: field, @@ -10756,7 +11365,7 @@ func (ec *executionContext) _DestinationTypeInfo_enabled(ctx context.Context, fi return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationTypeInfo_enabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationTypeInfo_enabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationTypeInfo", Field: field, @@ -10800,7 +11409,7 @@ func (ec *executionContext) _DestinationTypeInfo_requiredFields(ctx context.Cont return ec.marshalNDestinationFieldConfig2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestinationFieldConfigᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationTypeInfo_requiredFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationTypeInfo_requiredFields(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationTypeInfo", Field: field, @@ -10864,7 +11473,7 @@ func (ec *executionContext) _DestinationTypeInfo_userDisclaimer(ctx context.Cont return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationTypeInfo_userDisclaimer(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationTypeInfo_userDisclaimer(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationTypeInfo", Field: field, @@ -10908,7 +11517,7 @@ func (ec *executionContext) _DestinationTypeInfo_isContactMethod(ctx context.Con return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationTypeInfo_isContactMethod(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationTypeInfo_isContactMethod(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationTypeInfo", Field: field, @@ -10952,7 +11561,7 @@ func (ec *executionContext) _DestinationTypeInfo_isEPTarget(ctx context.Context, return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationTypeInfo_isEPTarget(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationTypeInfo_isEPTarget(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationTypeInfo", Field: field, @@ -10996,7 +11605,7 @@ func (ec *executionContext) _DestinationTypeInfo_isSchedOnCallNotify(ctx context return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationTypeInfo_isSchedOnCallNotify(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationTypeInfo_isSchedOnCallNotify(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationTypeInfo", Field: field, @@ -11040,7 +11649,7 @@ func (ec *executionContext) _DestinationTypeInfo_supportsStatusUpdates(ctx conte return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationTypeInfo_supportsStatusUpdates(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationTypeInfo_supportsStatusUpdates(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationTypeInfo", Field: field, @@ -11084,7 +11693,7 @@ func (ec *executionContext) _DestinationTypeInfo_statusUpdatesRequired(ctx conte return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DestinationTypeInfo_statusUpdatesRequired(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DestinationTypeInfo_statusUpdatesRequired(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "DestinationTypeInfo", Field: field, @@ -11097,6 +11706,94 @@ func (ec *executionContext) fieldContext_DestinationTypeInfo_statusUpdatesRequir return fc, nil } +func (ec *executionContext) _DynamicParam_paramID(ctx context.Context, field graphql.CollectedField, obj *DynamicParam) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DynamicParam_paramID(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) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ParamID, 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.marshalNID2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_DynamicParam_paramID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "DynamicParam", + 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) _DynamicParam_expr(ctx context.Context, field graphql.CollectedField, obj *DynamicParam) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DynamicParam_expr(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) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Expr, 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.marshalNExprStringExpression2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_DynamicParam_expr(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "DynamicParam", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ExprStringExpression does not have child fields") + }, + } + return fc, nil +} + func (ec *executionContext) _EscalationPolicy_id(ctx context.Context, field graphql.CollectedField, obj *escalation.Policy) (ret graphql.Marshaler) { fc, err := ec.fieldContext_EscalationPolicy_id(ctx, field) if err != nil { @@ -11128,7 +11825,7 @@ func (ec *executionContext) _EscalationPolicy_id(ctx context.Context, field grap return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EscalationPolicy_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EscalationPolicy_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EscalationPolicy", Field: field, @@ -11172,7 +11869,7 @@ func (ec *executionContext) _EscalationPolicy_name(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EscalationPolicy_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EscalationPolicy_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EscalationPolicy", Field: field, @@ -11216,7 +11913,7 @@ func (ec *executionContext) _EscalationPolicy_description(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EscalationPolicy_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EscalationPolicy_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EscalationPolicy", Field: field, @@ -11260,7 +11957,7 @@ func (ec *executionContext) _EscalationPolicy_repeat(ctx context.Context, field return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EscalationPolicy_repeat(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EscalationPolicy_repeat(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EscalationPolicy", Field: field, @@ -11304,7 +12001,7 @@ func (ec *executionContext) _EscalationPolicy_isFavorite(ctx context.Context, fi return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EscalationPolicy_isFavorite(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EscalationPolicy_isFavorite(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EscalationPolicy", Field: field, @@ -11348,7 +12045,7 @@ func (ec *executionContext) _EscalationPolicy_assignedTo(ctx context.Context, fi return ec.marshalNTarget2ᚕgithubᚗcomᚋtargetᚋgoalertᚋassignmentᚐRawTargetᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EscalationPolicy_assignedTo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EscalationPolicy_assignedTo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EscalationPolicy", Field: field, @@ -11400,7 +12097,7 @@ func (ec *executionContext) _EscalationPolicy_steps(ctx context.Context, field g return ec.marshalNEscalationPolicyStep2ᚕgithubᚗcomᚋtargetᚋgoalertᚋescalationᚐStepᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EscalationPolicy_steps(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EscalationPolicy_steps(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EscalationPolicy", Field: field, @@ -11458,7 +12155,7 @@ func (ec *executionContext) _EscalationPolicy_notices(ctx context.Context, field return ec.marshalNNotice2ᚕgithubᚗcomᚋtargetᚋgoalertᚋnoticeᚐNoticeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EscalationPolicy_notices(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EscalationPolicy_notices(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EscalationPolicy", Field: field, @@ -11560,7 +12257,7 @@ func (ec *executionContext) _EscalationPolicyConnection_nodes(ctx context.Contex return ec.marshalNEscalationPolicy2ᚕgithubᚗcomᚋtargetᚋgoalertᚋescalationᚐPolicyᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EscalationPolicyConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EscalationPolicyConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EscalationPolicyConnection", Field: field, @@ -11624,7 +12321,7 @@ func (ec *executionContext) _EscalationPolicyConnection_pageInfo(ctx context.Con return ec.marshalNPageInfo2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EscalationPolicyConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EscalationPolicyConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EscalationPolicyConnection", Field: field, @@ -11674,7 +12371,7 @@ func (ec *executionContext) _EscalationPolicyStep_id(ctx context.Context, field return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EscalationPolicyStep_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EscalationPolicyStep_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EscalationPolicyStep", Field: field, @@ -11718,7 +12415,7 @@ func (ec *executionContext) _EscalationPolicyStep_stepNumber(ctx context.Context return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EscalationPolicyStep_stepNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EscalationPolicyStep_stepNumber(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EscalationPolicyStep", Field: field, @@ -11762,7 +12459,7 @@ func (ec *executionContext) _EscalationPolicyStep_delayMinutes(ctx context.Conte return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EscalationPolicyStep_delayMinutes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EscalationPolicyStep_delayMinutes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EscalationPolicyStep", Field: field, @@ -11806,7 +12503,7 @@ func (ec *executionContext) _EscalationPolicyStep_targets(ctx context.Context, f return ec.marshalNTarget2ᚕgithubᚗcomᚋtargetᚋgoalertᚋassignmentᚐRawTargetᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EscalationPolicyStep_targets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EscalationPolicyStep_targets(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EscalationPolicyStep", Field: field, @@ -11855,7 +12552,7 @@ func (ec *executionContext) _EscalationPolicyStep_escalationPolicy(ctx context.C return ec.marshalOEscalationPolicy2ᚖgithubᚗcomᚋtargetᚋgoalertᚋescalationᚐPolicy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EscalationPolicyStep_escalationPolicy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EscalationPolicyStep_escalationPolicy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EscalationPolicyStep", Field: field, @@ -11919,7 +12616,7 @@ func (ec *executionContext) _EscalationPolicyStep_actions(ctx context.Context, f return ec.marshalNDestination2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestinationᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EscalationPolicyStep_actions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EscalationPolicyStep_actions(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "EscalationPolicyStep", Field: field, @@ -11940,6 +12637,120 @@ func (ec *executionContext) fieldContext_EscalationPolicyStep_actions(ctx contex return fc, nil } +func (ec *executionContext) _Expr_exprToCondition(ctx context.Context, field graphql.CollectedField, obj *Expr) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Expr_exprToCondition(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) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Expr().ExprToCondition(rctx, obj, fc.Args["input"].(ExprToConditionInput)) + }) + 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.(*Condition) + fc.Result = res + return ec.marshalNCondition2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐCondition(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Expr_exprToCondition(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Expr", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "clauses": + return ec.fieldContext_Condition_clauses(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Condition", 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_Expr_exprToCondition_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Expr_conditionToExpr(ctx context.Context, field graphql.CollectedField, obj *Expr) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Expr_conditionToExpr(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) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Expr().ConditionToExpr(rctx, obj, fc.Args["input"].(ConditionToExprInput)) + }) + 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_Expr_conditionToExpr(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Expr", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + 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_Expr_conditionToExpr_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + func (ec *executionContext) _FieldSearchConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *FieldSearchConnection) (ret graphql.Marshaler) { fc, err := ec.fieldContext_FieldSearchConnection_nodes(ctx, field) if err != nil { @@ -11971,7 +12782,7 @@ func (ec *executionContext) _FieldSearchConnection_nodes(ctx context.Context, fi return ec.marshalNFieldSearchResult2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐFieldSearchResultᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FieldSearchConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FieldSearchConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "FieldSearchConnection", Field: field, @@ -12025,7 +12836,7 @@ func (ec *executionContext) _FieldSearchConnection_pageInfo(ctx context.Context, return ec.marshalNPageInfo2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FieldSearchConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FieldSearchConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "FieldSearchConnection", Field: field, @@ -12075,7 +12886,7 @@ func (ec *executionContext) _FieldSearchResult_fieldID(ctx context.Context, fiel return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FieldSearchResult_fieldID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FieldSearchResult_fieldID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "FieldSearchResult", Field: field, @@ -12119,7 +12930,7 @@ func (ec *executionContext) _FieldSearchResult_value(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FieldSearchResult_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FieldSearchResult_value(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "FieldSearchResult", Field: field, @@ -12163,7 +12974,7 @@ func (ec *executionContext) _FieldSearchResult_label(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FieldSearchResult_label(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FieldSearchResult_label(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "FieldSearchResult", Field: field, @@ -12207,7 +13018,7 @@ func (ec *executionContext) _FieldSearchResult_isFavorite(ctx context.Context, f return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FieldSearchResult_isFavorite(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FieldSearchResult_isFavorite(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "FieldSearchResult", Field: field, @@ -12251,7 +13062,7 @@ func (ec *executionContext) _FieldValuePair_fieldID(ctx context.Context, field g return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FieldValuePair_fieldID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FieldValuePair_fieldID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "FieldValuePair", Field: field, @@ -12295,7 +13106,7 @@ func (ec *executionContext) _FieldValuePair_value(ctx context.Context, field gra return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_FieldValuePair_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_FieldValuePair_value(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "FieldValuePair", Field: field, @@ -12339,7 +13150,7 @@ func (ec *executionContext) _GQLAPIKey_id(ctx context.Context, field graphql.Col return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GQLAPIKey_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GQLAPIKey_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GQLAPIKey", Field: field, @@ -12383,7 +13194,7 @@ func (ec *executionContext) _GQLAPIKey_name(ctx context.Context, field graphql.C return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GQLAPIKey_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GQLAPIKey_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GQLAPIKey", Field: field, @@ -12427,7 +13238,7 @@ func (ec *executionContext) _GQLAPIKey_description(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GQLAPIKey_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GQLAPIKey_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GQLAPIKey", Field: field, @@ -12471,7 +13282,7 @@ func (ec *executionContext) _GQLAPIKey_createdAt(ctx context.Context, field grap return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GQLAPIKey_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GQLAPIKey_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GQLAPIKey", Field: field, @@ -12512,7 +13323,7 @@ func (ec *executionContext) _GQLAPIKey_createdBy(ctx context.Context, field grap return ec.marshalOUser2ᚖgithubᚗcomᚋtargetᚋgoalertᚋuserᚐUser(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GQLAPIKey_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GQLAPIKey_createdBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GQLAPIKey", Field: field, @@ -12584,7 +13395,7 @@ func (ec *executionContext) _GQLAPIKey_updatedAt(ctx context.Context, field grap return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GQLAPIKey_updatedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GQLAPIKey_updatedAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GQLAPIKey", Field: field, @@ -12625,7 +13436,7 @@ func (ec *executionContext) _GQLAPIKey_updatedBy(ctx context.Context, field grap return ec.marshalOUser2ᚖgithubᚗcomᚋtargetᚋgoalertᚋuserᚐUser(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GQLAPIKey_updatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GQLAPIKey_updatedBy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GQLAPIKey", Field: field, @@ -12694,7 +13505,7 @@ func (ec *executionContext) _GQLAPIKey_lastUsed(ctx context.Context, field graph return ec.marshalOGQLAPIKeyUsage2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐGQLAPIKeyUsage(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GQLAPIKey_lastUsed(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GQLAPIKey_lastUsed(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GQLAPIKey", Field: field, @@ -12746,7 +13557,7 @@ func (ec *executionContext) _GQLAPIKey_expiresAt(ctx context.Context, field grap return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GQLAPIKey_expiresAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GQLAPIKey_expiresAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GQLAPIKey", Field: field, @@ -12790,7 +13601,7 @@ func (ec *executionContext) _GQLAPIKey_query(ctx context.Context, field graphql. return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GQLAPIKey_query(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GQLAPIKey_query(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GQLAPIKey", Field: field, @@ -12834,7 +13645,7 @@ func (ec *executionContext) _GQLAPIKey_role(ctx context.Context, field graphql.C return ec.marshalNUserRole2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐUserRole(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GQLAPIKey_role(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GQLAPIKey_role(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GQLAPIKey", Field: field, @@ -12878,7 +13689,7 @@ func (ec *executionContext) _GQLAPIKeyUsage_time(ctx context.Context, field grap return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GQLAPIKeyUsage_time(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GQLAPIKeyUsage_time(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GQLAPIKeyUsage", Field: field, @@ -12922,7 +13733,7 @@ func (ec *executionContext) _GQLAPIKeyUsage_ua(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GQLAPIKeyUsage_ua(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GQLAPIKeyUsage_ua(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GQLAPIKeyUsage", Field: field, @@ -12966,7 +13777,7 @@ func (ec *executionContext) _GQLAPIKeyUsage_ip(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_GQLAPIKeyUsage_ip(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_GQLAPIKeyUsage_ip(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "GQLAPIKeyUsage", Field: field, @@ -13010,7 +13821,7 @@ func (ec *executionContext) _HeartbeatMonitor_id(ctx context.Context, field grap return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HeartbeatMonitor_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HeartbeatMonitor_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HeartbeatMonitor", Field: field, @@ -13054,7 +13865,7 @@ func (ec *executionContext) _HeartbeatMonitor_serviceID(ctx context.Context, fie return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HeartbeatMonitor_serviceID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HeartbeatMonitor_serviceID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HeartbeatMonitor", Field: field, @@ -13098,7 +13909,7 @@ func (ec *executionContext) _HeartbeatMonitor_name(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HeartbeatMonitor_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HeartbeatMonitor_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HeartbeatMonitor", Field: field, @@ -13142,7 +13953,7 @@ func (ec *executionContext) _HeartbeatMonitor_timeoutMinutes(ctx context.Context return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HeartbeatMonitor_timeoutMinutes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HeartbeatMonitor_timeoutMinutes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HeartbeatMonitor", Field: field, @@ -13186,7 +13997,7 @@ func (ec *executionContext) _HeartbeatMonitor_lastState(ctx context.Context, fie return ec.marshalNHeartbeatMonitorState2githubᚗcomᚋtargetᚋgoalertᚋheartbeatᚐState(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HeartbeatMonitor_lastState(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HeartbeatMonitor_lastState(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HeartbeatMonitor", Field: field, @@ -13227,7 +14038,7 @@ func (ec *executionContext) _HeartbeatMonitor_lastHeartbeat(ctx context.Context, return ec.marshalOISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HeartbeatMonitor_lastHeartbeat(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HeartbeatMonitor_lastHeartbeat(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HeartbeatMonitor", Field: field, @@ -13271,7 +14082,7 @@ func (ec *executionContext) _HeartbeatMonitor_href(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HeartbeatMonitor_href(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HeartbeatMonitor_href(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HeartbeatMonitor", Field: field, @@ -13315,7 +14126,7 @@ func (ec *executionContext) _HeartbeatMonitor_additionalDetails(ctx context.Cont return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_HeartbeatMonitor_additionalDetails(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_HeartbeatMonitor_additionalDetails(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "HeartbeatMonitor", Field: field, @@ -13359,7 +14170,7 @@ func (ec *executionContext) _IntegrationKey_id(ctx context.Context, field graphq return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IntegrationKey_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IntegrationKey_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "IntegrationKey", Field: field, @@ -13403,7 +14214,7 @@ func (ec *executionContext) _IntegrationKey_serviceID(ctx context.Context, field return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IntegrationKey_serviceID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IntegrationKey_serviceID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "IntegrationKey", Field: field, @@ -13447,7 +14258,7 @@ func (ec *executionContext) _IntegrationKey_type(ctx context.Context, field grap return ec.marshalNIntegrationKeyType2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐIntegrationKeyType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IntegrationKey_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IntegrationKey_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "IntegrationKey", Field: field, @@ -13491,7 +14302,7 @@ func (ec *executionContext) _IntegrationKey_name(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IntegrationKey_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IntegrationKey_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "IntegrationKey", Field: field, @@ -13535,7 +14346,7 @@ func (ec *executionContext) _IntegrationKey_href(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IntegrationKey_href(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IntegrationKey_href(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "IntegrationKey", Field: field, @@ -13576,7 +14387,7 @@ func (ec *executionContext) _IntegrationKey_externalSystemName(ctx context.Conte return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IntegrationKey_externalSystemName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IntegrationKey_externalSystemName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "IntegrationKey", Field: field, @@ -13589,6 +14400,82 @@ func (ec *executionContext) fieldContext_IntegrationKey_externalSystemName(ctx c return fc, nil } +func (ec *executionContext) _IntegrationKey_config(ctx context.Context, field graphql.CollectedField, obj *integrationkey.IntegrationKey) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IntegrationKey_config(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) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.IntegrationKey().Config(rctx, obj) + } + directive1 := func(ctx context.Context) (interface{}, error) { + flagName, err := ec.unmarshalNString2string(ctx, "univ-keys") + if err != nil { + return nil, err + } + if ec.directives.Experimental == nil { + return nil, errors.New("directive experimental is not implemented") + } + return ec.directives.Experimental(ctx, obj, directive0, flagName) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*KeyConfig); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/target/goalert/graphql2.KeyConfig`, tmp) + }) + 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.(*KeyConfig) + fc.Result = res + return ec.marshalNKeyConfig2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐKeyConfig(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IntegrationKey_config(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IntegrationKey", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "stopAtFirstRule": + return ec.fieldContext_KeyConfig_stopAtFirstRule(ctx, field) + case "rules": + return ec.fieldContext_KeyConfig_rules(ctx, field) + case "defaultActions": + return ec.fieldContext_KeyConfig_defaultActions(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type KeyConfig", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) _IntegrationKeyConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *IntegrationKeyConnection) (ret graphql.Marshaler) { fc, err := ec.fieldContext_IntegrationKeyConnection_nodes(ctx, field) if err != nil { @@ -13620,7 +14507,7 @@ func (ec *executionContext) _IntegrationKeyConnection_nodes(ctx context.Context, return ec.marshalNIntegrationKey2ᚕgithubᚗcomᚋtargetᚋgoalertᚋintegrationkeyᚐIntegrationKeyᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IntegrationKeyConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IntegrationKeyConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "IntegrationKeyConnection", Field: field, @@ -13640,6 +14527,8 @@ func (ec *executionContext) fieldContext_IntegrationKeyConnection_nodes(ctx cont return ec.fieldContext_IntegrationKey_href(ctx, field) case "externalSystemName": return ec.fieldContext_IntegrationKey_externalSystemName(ctx, field) + case "config": + return ec.fieldContext_IntegrationKey_config(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type IntegrationKey", field.Name) }, @@ -13678,7 +14567,7 @@ func (ec *executionContext) _IntegrationKeyConnection_pageInfo(ctx context.Conte return ec.marshalNPageInfo2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IntegrationKeyConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IntegrationKeyConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "IntegrationKeyConnection", Field: field, @@ -13728,7 +14617,7 @@ func (ec *executionContext) _IntegrationKeyTypeInfo_id(ctx context.Context, fiel return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IntegrationKeyTypeInfo_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IntegrationKeyTypeInfo_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "IntegrationKeyTypeInfo", Field: field, @@ -13772,7 +14661,7 @@ func (ec *executionContext) _IntegrationKeyTypeInfo_name(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IntegrationKeyTypeInfo_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IntegrationKeyTypeInfo_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "IntegrationKeyTypeInfo", Field: field, @@ -13816,7 +14705,7 @@ func (ec *executionContext) _IntegrationKeyTypeInfo_label(ctx context.Context, f return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IntegrationKeyTypeInfo_label(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IntegrationKeyTypeInfo_label(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "IntegrationKeyTypeInfo", Field: field, @@ -13860,7 +14749,7 @@ func (ec *executionContext) _IntegrationKeyTypeInfo_enabled(ctx context.Context, return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IntegrationKeyTypeInfo_enabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IntegrationKeyTypeInfo_enabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "IntegrationKeyTypeInfo", Field: field, @@ -13873,6 +14762,382 @@ func (ec *executionContext) fieldContext_IntegrationKeyTypeInfo_enabled(ctx cont return fc, nil } +func (ec *executionContext) _KeyConfig_stopAtFirstRule(ctx context.Context, field graphql.CollectedField, obj *KeyConfig) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KeyConfig_stopAtFirstRule(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) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.StopAtFirstRule, 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_KeyConfig_stopAtFirstRule(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "KeyConfig", + 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) _KeyConfig_rules(ctx context.Context, field graphql.CollectedField, obj *KeyConfig) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KeyConfig_rules(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) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Rules, 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.([]KeyRule) + fc.Result = res + return ec.marshalNKeyRule2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐKeyRuleᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_KeyConfig_rules(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "KeyConfig", + 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_KeyRule_id(ctx, field) + case "name": + return ec.fieldContext_KeyRule_name(ctx, field) + case "description": + return ec.fieldContext_KeyRule_description(ctx, field) + case "conditionExpr": + return ec.fieldContext_KeyRule_conditionExpr(ctx, field) + case "actions": + return ec.fieldContext_KeyRule_actions(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type KeyRule", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _KeyConfig_defaultActions(ctx context.Context, field graphql.CollectedField, obj *KeyConfig) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KeyConfig_defaultActions(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) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DefaultActions, 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.([]Action) + fc.Result = res + return ec.marshalNAction2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐActionᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_KeyConfig_defaultActions(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "KeyConfig", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "dest": + return ec.fieldContext_Action_dest(ctx, field) + case "params": + return ec.fieldContext_Action_params(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Action", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _KeyRule_id(ctx context.Context, field graphql.CollectedField, obj *KeyRule) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KeyRule_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) (interface{}, 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.(string) + fc.Result = res + return ec.marshalNID2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_KeyRule_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "KeyRule", + 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) _KeyRule_name(ctx context.Context, field graphql.CollectedField, obj *KeyRule) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KeyRule_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) (interface{}, 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_KeyRule_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "KeyRule", + 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) _KeyRule_description(ctx context.Context, field graphql.CollectedField, obj *KeyRule) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KeyRule_description(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) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description, 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_KeyRule_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "KeyRule", + 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) _KeyRule_conditionExpr(ctx context.Context, field graphql.CollectedField, obj *KeyRule) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KeyRule_conditionExpr(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) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ConditionExpr, 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.marshalNExprBooleanExpression2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_KeyRule_conditionExpr(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "KeyRule", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ExprBooleanExpression does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _KeyRule_actions(ctx context.Context, field graphql.CollectedField, obj *KeyRule) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KeyRule_actions(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) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Actions, 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.([]Action) + fc.Result = res + return ec.marshalNAction2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐActionᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_KeyRule_actions(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "KeyRule", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "dest": + return ec.fieldContext_Action_dest(ctx, field) + case "params": + return ec.fieldContext_Action_params(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Action", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) _Label_key(ctx context.Context, field graphql.CollectedField, obj *label.Label) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Label_key(ctx, field) if err != nil { @@ -13904,7 +15169,7 @@ func (ec *executionContext) _Label_key(ctx context.Context, field graphql.Collec return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Label_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Label_key(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Label", Field: field, @@ -13948,7 +15213,7 @@ func (ec *executionContext) _Label_value(ctx context.Context, field graphql.Coll return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Label_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Label_value(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Label", Field: field, @@ -13992,7 +15257,7 @@ func (ec *executionContext) _LabelConnection_nodes(ctx context.Context, field gr return ec.marshalNLabel2ᚕgithubᚗcomᚋtargetᚋgoalertᚋlabelᚐLabelᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LabelConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LabelConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LabelConnection", Field: field, @@ -14042,7 +15307,7 @@ func (ec *executionContext) _LabelConnection_pageInfo(ctx context.Context, field return ec.marshalNPageInfo2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LabelConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LabelConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LabelConnection", Field: field, @@ -14092,7 +15357,7 @@ func (ec *executionContext) _LinkAccountInfo_userDetails(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LinkAccountInfo_userDetails(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LinkAccountInfo_userDetails(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LinkAccountInfo", Field: field, @@ -14133,7 +15398,7 @@ func (ec *executionContext) _LinkAccountInfo_alertID(ctx context.Context, field return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LinkAccountInfo_alertID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LinkAccountInfo_alertID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LinkAccountInfo", Field: field, @@ -14174,7 +15439,7 @@ func (ec *executionContext) _LinkAccountInfo_alertNewStatus(ctx context.Context, return ec.marshalOAlertStatus2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐAlertStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LinkAccountInfo_alertNewStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LinkAccountInfo_alertNewStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "LinkAccountInfo", Field: field, @@ -14218,7 +15483,7 @@ func (ec *executionContext) _MessageLogConnection_nodes(ctx context.Context, fie return ec.marshalNDebugMessage2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDebugMessageᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MessageLogConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MessageLogConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "MessageLogConnection", Field: field, @@ -14294,7 +15559,7 @@ func (ec *executionContext) _MessageLogConnection_pageInfo(ctx context.Context, return ec.marshalNPageInfo2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MessageLogConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MessageLogConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "MessageLogConnection", Field: field, @@ -14344,7 +15609,7 @@ func (ec *executionContext) _MessageLogConnection_stats(ctx context.Context, fie return ec.marshalNMessageLogConnectionStats2ᚖgithubᚗcomᚋtargetᚋgoalertᚋnotificationᚐSearchOptions(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_MessageLogConnection_stats(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_MessageLogConnection_stats(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "MessageLogConnection", Field: field, @@ -14965,7 +16230,7 @@ func (ec *executionContext) _Mutation_endAllAuthSessionsByCurrentUser(ctx contex return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_endAllAuthSessionsByCurrentUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_endAllAuthSessionsByCurrentUser(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -16124,6 +17389,8 @@ func (ec *executionContext) fieldContext_Mutation_createIntegrationKey(ctx conte return ec.fieldContext_IntegrationKey_href(ctx, field) case "externalSystemName": return ec.fieldContext_IntegrationKey_externalSystemName(ctx, field) + case "config": + return ec.fieldContext_IntegrationKey_config(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type IntegrationKey", field.Name) }, @@ -17596,6 +18863,85 @@ func (ec *executionContext) fieldContext_Mutation_deleteGQLAPIKey(ctx context.Co return fc, nil } +func (ec *executionContext) _Mutation_updateKeyConfig(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_updateKeyConfig(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) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().UpdateKeyConfig(rctx, fc.Args["input"].(UpdateKeyConfigInput)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + flagName, err := ec.unmarshalNString2string(ctx, "univ-keys") + if err != nil { + return nil, err + } + if ec.directives.Experimental == nil { + return nil, errors.New("directive experimental is not implemented") + } + return ec.directives.Experimental(ctx, nil, directive0, flagName) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(bool); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be bool`, tmp) + }) + 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_Mutation_updateKeyConfig(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) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + 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_updateKeyConfig_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + func (ec *executionContext) _Notice_type(ctx context.Context, field graphql.CollectedField, obj *notice.Notice) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Notice_type(ctx, field) if err != nil { @@ -17627,7 +18973,7 @@ func (ec *executionContext) _Notice_type(ctx context.Context, field graphql.Coll return ec.marshalNNoticeType2githubᚗcomᚋtargetᚋgoalertᚋnoticeᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Notice_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Notice_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Notice", Field: field, @@ -17671,7 +19017,7 @@ func (ec *executionContext) _Notice_message(ctx context.Context, field graphql.C return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Notice_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Notice_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Notice", Field: field, @@ -17715,7 +19061,7 @@ func (ec *executionContext) _Notice_details(ctx context.Context, field graphql.C return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Notice_details(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Notice_details(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Notice", Field: field, @@ -17759,7 +19105,7 @@ func (ec *executionContext) _NotificationState_details(ctx context.Context, fiel return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NotificationState_details(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NotificationState_details(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NotificationState", Field: field, @@ -17800,7 +19146,7 @@ func (ec *executionContext) _NotificationState_status(ctx context.Context, field return ec.marshalONotificationStatus2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐNotificationStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NotificationState_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NotificationState_status(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NotificationState", Field: field, @@ -17844,7 +19190,7 @@ func (ec *executionContext) _NotificationState_formattedSrcValue(ctx context.Con return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_NotificationState_formattedSrcValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_NotificationState_formattedSrcValue(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "NotificationState", Field: field, @@ -17888,7 +19234,7 @@ func (ec *executionContext) _OnCallNotificationRule_id(ctx context.Context, fiel return ec.marshalNID2githubᚗcomᚋtargetᚋgoalertᚋscheduleᚐRuleID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OnCallNotificationRule_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OnCallNotificationRule_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "OnCallNotificationRule", Field: field, @@ -17932,7 +19278,7 @@ func (ec *executionContext) _OnCallNotificationRule_target(ctx context.Context, return ec.marshalNTarget2ᚖgithubᚗcomᚋtargetᚋgoalertᚋassignmentᚐRawTarget(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OnCallNotificationRule_target(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OnCallNotificationRule_target(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "OnCallNotificationRule", Field: field, @@ -17984,7 +19330,7 @@ func (ec *executionContext) _OnCallNotificationRule_dest(ctx context.Context, fi return ec.marshalNDestination2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestination(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OnCallNotificationRule_dest(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OnCallNotificationRule_dest(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "OnCallNotificationRule", Field: field, @@ -18033,7 +19379,7 @@ func (ec *executionContext) _OnCallNotificationRule_time(ctx context.Context, fi return ec.marshalOClockTime2ᚖgithubᚗcomᚋtargetᚋgoalertᚋutilᚋtimeutilᚐClock(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OnCallNotificationRule_time(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OnCallNotificationRule_time(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "OnCallNotificationRule", Field: field, @@ -18074,7 +19420,7 @@ func (ec *executionContext) _OnCallNotificationRule_weekdayFilter(ctx context.Co return ec.marshalOWeekdayFilter2ᚖgithubᚗcomᚋtargetᚋgoalertᚋutilᚋtimeutilᚐWeekdayFilter(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OnCallNotificationRule_weekdayFilter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OnCallNotificationRule_weekdayFilter(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "OnCallNotificationRule", Field: field, @@ -18118,7 +19464,7 @@ func (ec *executionContext) _OnCallShift_userID(ctx context.Context, field graph return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OnCallShift_userID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OnCallShift_userID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "OnCallShift", Field: field, @@ -18159,7 +19505,7 @@ func (ec *executionContext) _OnCallShift_user(ctx context.Context, field graphql return ec.marshalOUser2ᚖgithubᚗcomᚋtargetᚋgoalertᚋuserᚐUser(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OnCallShift_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OnCallShift_user(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "OnCallShift", Field: field, @@ -18231,7 +19577,7 @@ func (ec *executionContext) _OnCallShift_start(ctx context.Context, field graphq return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OnCallShift_start(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OnCallShift_start(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "OnCallShift", Field: field, @@ -18275,7 +19621,7 @@ func (ec *executionContext) _OnCallShift_end(ctx context.Context, field graphql. return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OnCallShift_end(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OnCallShift_end(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "OnCallShift", Field: field, @@ -18319,7 +19665,7 @@ func (ec *executionContext) _OnCallShift_truncated(ctx context.Context, field gr return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_OnCallShift_truncated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_OnCallShift_truncated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "OnCallShift", Field: field, @@ -18360,7 +19706,7 @@ func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graph return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_endCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_endCursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PageInfo", Field: field, @@ -18404,7 +19750,7 @@ func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field gra return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_hasNextPage(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PageInfo", Field: field, @@ -18448,7 +19794,7 @@ func (ec *executionContext) _PhoneNumberInfo_id(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PhoneNumberInfo_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PhoneNumberInfo_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PhoneNumberInfo", Field: field, @@ -18492,7 +19838,7 @@ func (ec *executionContext) _PhoneNumberInfo_countryCode(ctx context.Context, fi return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PhoneNumberInfo_countryCode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PhoneNumberInfo_countryCode(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PhoneNumberInfo", Field: field, @@ -18536,7 +19882,7 @@ func (ec *executionContext) _PhoneNumberInfo_regionCode(ctx context.Context, fie return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PhoneNumberInfo_regionCode(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PhoneNumberInfo_regionCode(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PhoneNumberInfo", Field: field, @@ -18580,7 +19926,7 @@ func (ec *executionContext) _PhoneNumberInfo_formatted(ctx context.Context, fiel return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PhoneNumberInfo_formatted(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PhoneNumberInfo_formatted(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PhoneNumberInfo", Field: field, @@ -18624,7 +19970,7 @@ func (ec *executionContext) _PhoneNumberInfo_valid(ctx context.Context, field gr return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PhoneNumberInfo_valid(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PhoneNumberInfo_valid(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PhoneNumberInfo", Field: field, @@ -18668,7 +20014,7 @@ func (ec *executionContext) _PhoneNumberInfo_error(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PhoneNumberInfo_error(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PhoneNumberInfo_error(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "PhoneNumberInfo", Field: field, @@ -18778,7 +20124,7 @@ func (ec *executionContext) _Query_experimentalFlags(ctx context.Context, field return ec.marshalNID2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_experimentalFlags(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_experimentalFlags(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -19353,6 +20699,8 @@ func (ec *executionContext) fieldContext_Query_integrationKey(ctx context.Contex return ec.fieldContext_IntegrationKey_href(ctx, field) case "externalSystemName": return ec.fieldContext_IntegrationKey_externalSystemName(ctx, field) + case "config": + return ec.fieldContext_IntegrationKey_config(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type IntegrationKey", field.Name) }, @@ -20639,7 +21987,7 @@ func (ec *executionContext) _Query_configHints(ctx context.Context, field graphq return ec.marshalNConfigHint2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐConfigHintᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_configHints(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_configHints(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -20689,7 +22037,7 @@ func (ec *executionContext) _Query_integrationKeyTypes(ctx context.Context, fiel return ec.marshalNIntegrationKeyTypeInfo2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐIntegrationKeyTypeInfoᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_integrationKeyTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_integrationKeyTypes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -20743,7 +22091,7 @@ func (ec *executionContext) _Query_systemLimits(ctx context.Context, field graph return ec.marshalNSystemLimit2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐSystemLimitᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_systemLimits(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_systemLimits(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -21174,7 +22522,7 @@ func (ec *executionContext) _Query_generateSlackAppManifest(ctx context.Context, return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_generateSlackAppManifest(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_generateSlackAppManifest(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -21278,7 +22626,7 @@ func (ec *executionContext) _Query_swoStatus(ctx context.Context, field graphql. return ec.marshalNSWOStatus2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐSWOStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_swoStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_swoStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -21336,7 +22684,7 @@ func (ec *executionContext) _Query_destinationTypes(ctx context.Context, field g return ec.marshalNDestinationTypeInfo2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestinationTypeInfoᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_destinationTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_destinationTypes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -21611,6 +22959,80 @@ func (ec *executionContext) fieldContext_Query_destinationDisplayInfo(ctx contex return fc, nil } +func (ec *executionContext) _Query_expr(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_expr(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) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().Expr(rctx) + } + directive1 := func(ctx context.Context) (interface{}, error) { + flagName, err := ec.unmarshalNString2string(ctx, "univ-keys") + if err != nil { + return nil, err + } + if ec.directives.Experimental == nil { + return nil, errors.New("directive experimental is not implemented") + } + return ec.directives.Experimental(ctx, nil, directive0, flagName) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*Expr); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/target/goalert/graphql2.Expr`, tmp) + }) + 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.(*Expr) + fc.Result = res + return ec.marshalNExpr2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐExpr(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_expr(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "exprToCondition": + return ec.fieldContext_Expr_exprToCondition(ctx, field) + case "conditionToExpr": + return ec.fieldContext_Expr_conditionToExpr(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Expr", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) _Query_gqlAPIKeys(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { fc, err := ec.fieldContext_Query_gqlAPIKeys(ctx, field) if err != nil { @@ -21642,7 +23064,7 @@ func (ec *executionContext) _Query_gqlAPIKeys(ctx context.Context, field graphql return ec.marshalNGQLAPIKey2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐGQLAPIKeyᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_gqlAPIKeys(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_gqlAPIKeys(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -21781,7 +23203,7 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query___schema(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Query", Field: field, @@ -21839,7 +23261,7 @@ func (ec *executionContext) _Rotation_id(ctx context.Context, field graphql.Coll return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Rotation_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Rotation_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Rotation", Field: field, @@ -21883,7 +23305,7 @@ func (ec *executionContext) _Rotation_name(ctx context.Context, field graphql.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Rotation_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Rotation_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Rotation", Field: field, @@ -21927,7 +23349,7 @@ func (ec *executionContext) _Rotation_description(ctx context.Context, field gra return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Rotation_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Rotation_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Rotation", Field: field, @@ -21971,7 +23393,7 @@ func (ec *executionContext) _Rotation_isFavorite(ctx context.Context, field grap return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Rotation_isFavorite(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Rotation_isFavorite(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Rotation", Field: field, @@ -22015,7 +23437,7 @@ func (ec *executionContext) _Rotation_start(ctx context.Context, field graphql.C return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Rotation_start(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Rotation_start(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Rotation", Field: field, @@ -22059,7 +23481,7 @@ func (ec *executionContext) _Rotation_timeZone(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Rotation_timeZone(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Rotation_timeZone(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Rotation", Field: field, @@ -22103,7 +23525,7 @@ func (ec *executionContext) _Rotation_type(ctx context.Context, field graphql.Co return ec.marshalNRotationType2githubᚗcomᚋtargetᚋgoalertᚋscheduleᚋrotationᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Rotation_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Rotation_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Rotation", Field: field, @@ -22147,7 +23569,7 @@ func (ec *executionContext) _Rotation_shiftLength(ctx context.Context, field gra return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Rotation_shiftLength(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Rotation_shiftLength(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Rotation", Field: field, @@ -22191,7 +23613,7 @@ func (ec *executionContext) _Rotation_activeUserIndex(ctx context.Context, field return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Rotation_activeUserIndex(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Rotation_activeUserIndex(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Rotation", Field: field, @@ -22235,7 +23657,7 @@ func (ec *executionContext) _Rotation_userIDs(ctx context.Context, field graphql return ec.marshalNID2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Rotation_userIDs(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Rotation_userIDs(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Rotation", Field: field, @@ -22279,7 +23701,7 @@ func (ec *executionContext) _Rotation_users(ctx context.Context, field graphql.C return ec.marshalNUser2ᚕgithubᚗcomᚋtargetᚋgoalertᚋuserᚐUserᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Rotation_users(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Rotation_users(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Rotation", Field: field, @@ -22456,7 +23878,7 @@ func (ec *executionContext) _RotationConnection_nodes(ctx context.Context, field return ec.marshalNRotation2ᚕgithubᚗcomᚋtargetᚋgoalertᚋscheduleᚋrotationᚐRotationᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RotationConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RotationConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "RotationConnection", Field: field, @@ -22528,7 +23950,7 @@ func (ec *executionContext) _RotationConnection_pageInfo(ctx context.Context, fi return ec.marshalNPageInfo2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_RotationConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_RotationConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "RotationConnection", Field: field, @@ -22578,7 +24000,7 @@ func (ec *executionContext) _SWOConnection_name(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SWOConnection_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SWOConnection_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SWOConnection", Field: field, @@ -22622,7 +24044,7 @@ func (ec *executionContext) _SWOConnection_version(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SWOConnection_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SWOConnection_version(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SWOConnection", Field: field, @@ -22666,7 +24088,7 @@ func (ec *executionContext) _SWOConnection_type(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SWOConnection_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SWOConnection_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SWOConnection", Field: field, @@ -22710,7 +24132,7 @@ func (ec *executionContext) _SWOConnection_isNext(ctx context.Context, field gra return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SWOConnection_isNext(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SWOConnection_isNext(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SWOConnection", Field: field, @@ -22754,7 +24176,7 @@ func (ec *executionContext) _SWOConnection_count(ctx context.Context, field grap return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SWOConnection_count(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SWOConnection_count(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SWOConnection", Field: field, @@ -22798,7 +24220,7 @@ func (ec *executionContext) _SWONode_id(ctx context.Context, field graphql.Colle return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SWONode_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SWONode_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SWONode", Field: field, @@ -22842,7 +24264,7 @@ func (ec *executionContext) _SWONode_canExec(ctx context.Context, field graphql. return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SWONode_canExec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SWONode_canExec(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SWONode", Field: field, @@ -22886,7 +24308,7 @@ func (ec *executionContext) _SWONode_isLeader(ctx context.Context, field graphql return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SWONode_isLeader(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SWONode_isLeader(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SWONode", Field: field, @@ -22930,7 +24352,7 @@ func (ec *executionContext) _SWONode_uptime(ctx context.Context, field graphql.C return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SWONode_uptime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SWONode_uptime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SWONode", Field: field, @@ -22974,7 +24396,7 @@ func (ec *executionContext) _SWONode_configError(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SWONode_configError(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SWONode_configError(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SWONode", Field: field, @@ -23015,7 +24437,7 @@ func (ec *executionContext) _SWONode_connections(ctx context.Context, field grap return ec.marshalOSWOConnection2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐSWOConnectionᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SWONode_connections(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SWONode_connections(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SWONode", Field: field, @@ -23071,7 +24493,7 @@ func (ec *executionContext) _SWOStatus_state(ctx context.Context, field graphql. return ec.marshalNSWOState2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐSWOState(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SWOStatus_state(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SWOStatus_state(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SWOStatus", Field: field, @@ -23115,7 +24537,7 @@ func (ec *executionContext) _SWOStatus_lastStatus(ctx context.Context, field gra return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SWOStatus_lastStatus(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SWOStatus_lastStatus(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SWOStatus", Field: field, @@ -23159,7 +24581,7 @@ func (ec *executionContext) _SWOStatus_lastError(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SWOStatus_lastError(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SWOStatus_lastError(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SWOStatus", Field: field, @@ -23203,7 +24625,7 @@ func (ec *executionContext) _SWOStatus_nodes(ctx context.Context, field graphql. return ec.marshalNSWONode2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐSWONodeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SWOStatus_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SWOStatus_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SWOStatus", Field: field, @@ -23261,7 +24683,7 @@ func (ec *executionContext) _SWOStatus_mainDBVersion(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SWOStatus_mainDBVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SWOStatus_mainDBVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SWOStatus", Field: field, @@ -23305,7 +24727,7 @@ func (ec *executionContext) _SWOStatus_nextDBVersion(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SWOStatus_nextDBVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SWOStatus_nextDBVersion(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SWOStatus", Field: field, @@ -23349,7 +24771,7 @@ func (ec *executionContext) _Schedule_id(ctx context.Context, field graphql.Coll return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Schedule_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Schedule_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Schedule", Field: field, @@ -23393,7 +24815,7 @@ func (ec *executionContext) _Schedule_name(ctx context.Context, field graphql.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Schedule_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Schedule_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Schedule", Field: field, @@ -23437,7 +24859,7 @@ func (ec *executionContext) _Schedule_description(ctx context.Context, field gra return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Schedule_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Schedule_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Schedule", Field: field, @@ -23481,7 +24903,7 @@ func (ec *executionContext) _Schedule_timeZone(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Schedule_timeZone(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Schedule_timeZone(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Schedule", Field: field, @@ -23525,7 +24947,7 @@ func (ec *executionContext) _Schedule_assignedTo(ctx context.Context, field grap return ec.marshalNTarget2ᚕgithubᚗcomᚋtargetᚋgoalertᚋassignmentᚐRawTargetᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Schedule_assignedTo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Schedule_assignedTo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Schedule", Field: field, @@ -23644,7 +25066,7 @@ func (ec *executionContext) _Schedule_targets(ctx context.Context, field graphql return ec.marshalNScheduleTarget2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐScheduleTargetᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Schedule_targets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Schedule_targets(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Schedule", Field: field, @@ -23756,7 +25178,7 @@ func (ec *executionContext) _Schedule_isFavorite(ctx context.Context, field grap return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Schedule_isFavorite(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Schedule_isFavorite(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Schedule", Field: field, @@ -23800,7 +25222,7 @@ func (ec *executionContext) _Schedule_temporarySchedules(ctx context.Context, fi return ec.marshalNTemporarySchedule2ᚕgithubᚗcomᚋtargetᚋgoalertᚋscheduleᚐTemporaryScheduleᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Schedule_temporarySchedules(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Schedule_temporarySchedules(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Schedule", Field: field, @@ -23852,7 +25274,7 @@ func (ec *executionContext) _Schedule_onCallNotificationRules(ctx context.Contex return ec.marshalNOnCallNotificationRule2ᚕgithubᚗcomᚋtargetᚋgoalertᚋscheduleᚐOnCallNotificationRuleᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Schedule_onCallNotificationRules(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Schedule_onCallNotificationRules(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Schedule", Field: field, @@ -23958,7 +25380,7 @@ func (ec *executionContext) _ScheduleConnection_nodes(ctx context.Context, field return ec.marshalNSchedule2ᚕgithubᚗcomᚋtargetᚋgoalertᚋscheduleᚐScheduleᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ScheduleConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ScheduleConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ScheduleConnection", Field: field, @@ -24028,7 +25450,7 @@ func (ec *executionContext) _ScheduleConnection_pageInfo(ctx context.Context, fi return ec.marshalNPageInfo2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ScheduleConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ScheduleConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ScheduleConnection", Field: field, @@ -24078,7 +25500,7 @@ func (ec *executionContext) _ScheduleRule_id(ctx context.Context, field graphql. return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ScheduleRule_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ScheduleRule_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ScheduleRule", Field: field, @@ -24122,7 +25544,7 @@ func (ec *executionContext) _ScheduleRule_scheduleID(ctx context.Context, field return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ScheduleRule_scheduleID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ScheduleRule_scheduleID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ScheduleRule", Field: field, @@ -24166,7 +25588,7 @@ func (ec *executionContext) _ScheduleRule_start(ctx context.Context, field graph return ec.marshalNClockTime2githubᚗcomᚋtargetᚋgoalertᚋutilᚋtimeutilᚐClock(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ScheduleRule_start(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ScheduleRule_start(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ScheduleRule", Field: field, @@ -24210,7 +25632,7 @@ func (ec *executionContext) _ScheduleRule_end(ctx context.Context, field graphql return ec.marshalNClockTime2githubᚗcomᚋtargetᚋgoalertᚋutilᚋtimeutilᚐClock(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ScheduleRule_end(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ScheduleRule_end(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ScheduleRule", Field: field, @@ -24254,7 +25676,7 @@ func (ec *executionContext) _ScheduleRule_weekdayFilter(ctx context.Context, fie return ec.marshalNWeekdayFilter2githubᚗcomᚋtargetᚋgoalertᚋutilᚋtimeutilᚐWeekdayFilter(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ScheduleRule_weekdayFilter(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ScheduleRule_weekdayFilter(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ScheduleRule", Field: field, @@ -24298,7 +25720,7 @@ func (ec *executionContext) _ScheduleRule_target(ctx context.Context, field grap return ec.marshalNTarget2ᚖgithubᚗcomᚋtargetᚋgoalertᚋassignmentᚐRawTarget(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ScheduleRule_target(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ScheduleRule_target(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ScheduleRule", Field: field, @@ -24350,7 +25772,7 @@ func (ec *executionContext) _ScheduleTarget_scheduleID(ctx context.Context, fiel return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ScheduleTarget_scheduleID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ScheduleTarget_scheduleID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ScheduleTarget", Field: field, @@ -24394,7 +25816,7 @@ func (ec *executionContext) _ScheduleTarget_target(ctx context.Context, field gr return ec.marshalNTarget2ᚖgithubᚗcomᚋtargetᚋgoalertᚋassignmentᚐRawTarget(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ScheduleTarget_target(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ScheduleTarget_target(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ScheduleTarget", Field: field, @@ -24446,7 +25868,7 @@ func (ec *executionContext) _ScheduleTarget_rules(ctx context.Context, field gra return ec.marshalNScheduleRule2ᚕgithubᚗcomᚋtargetᚋgoalertᚋscheduleᚋruleᚐRuleᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ScheduleTarget_rules(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ScheduleTarget_rules(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ScheduleTarget", Field: field, @@ -24504,7 +25926,7 @@ func (ec *executionContext) _Service_id(ctx context.Context, field graphql.Colle return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Service_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Service_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Service", Field: field, @@ -24548,7 +25970,7 @@ func (ec *executionContext) _Service_name(ctx context.Context, field graphql.Col return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Service_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Service_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Service", Field: field, @@ -24592,7 +26014,7 @@ func (ec *executionContext) _Service_description(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Service_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Service_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Service", Field: field, @@ -24636,7 +26058,7 @@ func (ec *executionContext) _Service_escalationPolicyID(ctx context.Context, fie return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Service_escalationPolicyID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Service_escalationPolicyID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Service", Field: field, @@ -24677,7 +26099,7 @@ func (ec *executionContext) _Service_escalationPolicy(ctx context.Context, field return ec.marshalOEscalationPolicy2ᚖgithubᚗcomᚋtargetᚋgoalertᚋescalationᚐPolicy(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Service_escalationPolicy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Service_escalationPolicy(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Service", Field: field, @@ -24741,7 +26163,7 @@ func (ec *executionContext) _Service_isFavorite(ctx context.Context, field graph return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Service_isFavorite(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Service_isFavorite(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Service", Field: field, @@ -24782,7 +26204,7 @@ func (ec *executionContext) _Service_maintenanceExpiresAt(ctx context.Context, f return ec.marshalOISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Service_maintenanceExpiresAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Service_maintenanceExpiresAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Service", Field: field, @@ -24826,7 +26248,7 @@ func (ec *executionContext) _Service_onCallUsers(ctx context.Context, field grap return ec.marshalNServiceOnCallUser2ᚕgithubᚗcomᚋtargetᚋgoalertᚋoncallᚐServiceOnCallUserᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Service_onCallUsers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Service_onCallUsers(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Service", Field: field, @@ -24878,7 +26300,7 @@ func (ec *executionContext) _Service_integrationKeys(ctx context.Context, field return ec.marshalNIntegrationKey2ᚕgithubᚗcomᚋtargetᚋgoalertᚋintegrationkeyᚐIntegrationKeyᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Service_integrationKeys(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Service_integrationKeys(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Service", Field: field, @@ -24898,6 +26320,8 @@ func (ec *executionContext) fieldContext_Service_integrationKeys(ctx context.Con return ec.fieldContext_IntegrationKey_href(ctx, field) case "externalSystemName": return ec.fieldContext_IntegrationKey_externalSystemName(ctx, field) + case "config": + return ec.fieldContext_IntegrationKey_config(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type IntegrationKey", field.Name) }, @@ -24936,7 +26360,7 @@ func (ec *executionContext) _Service_labels(ctx context.Context, field graphql.C return ec.marshalNLabel2ᚕgithubᚗcomᚋtargetᚋgoalertᚋlabelᚐLabelᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Service_labels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Service_labels(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Service", Field: field, @@ -24986,7 +26410,7 @@ func (ec *executionContext) _Service_heartbeatMonitors(ctx context.Context, fiel return ec.marshalNHeartbeatMonitor2ᚕgithubᚗcomᚋtargetᚋgoalertᚋheartbeatᚐMonitorᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Service_heartbeatMonitors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Service_heartbeatMonitors(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Service", Field: field, @@ -25048,7 +26472,7 @@ func (ec *executionContext) _Service_notices(ctx context.Context, field graphql. return ec.marshalNNotice2ᚕgithubᚗcomᚋtargetᚋgoalertᚋnoticeᚐNoticeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Service_notices(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Service_notices(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Service", Field: field, @@ -25100,7 +26524,7 @@ func (ec *executionContext) _ServiceConnection_nodes(ctx context.Context, field return ec.marshalNService2ᚕgithubᚗcomᚋtargetᚋgoalertᚋserviceᚐServiceᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ServiceConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ServiceConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ServiceConnection", Field: field, @@ -25170,7 +26594,7 @@ func (ec *executionContext) _ServiceConnection_pageInfo(ctx context.Context, fie return ec.marshalNPageInfo2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ServiceConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ServiceConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ServiceConnection", Field: field, @@ -25220,7 +26644,7 @@ func (ec *executionContext) _ServiceOnCallUser_userID(ctx context.Context, field return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ServiceOnCallUser_userID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ServiceOnCallUser_userID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ServiceOnCallUser", Field: field, @@ -25264,7 +26688,7 @@ func (ec *executionContext) _ServiceOnCallUser_userName(ctx context.Context, fie return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ServiceOnCallUser_userName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ServiceOnCallUser_userName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ServiceOnCallUser", Field: field, @@ -25308,7 +26732,7 @@ func (ec *executionContext) _ServiceOnCallUser_stepNumber(ctx context.Context, f return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ServiceOnCallUser_stepNumber(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ServiceOnCallUser_stepNumber(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "ServiceOnCallUser", Field: field, @@ -25352,7 +26776,7 @@ func (ec *executionContext) _SlackChannel_id(ctx context.Context, field graphql. return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SlackChannel_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SlackChannel_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SlackChannel", Field: field, @@ -25396,7 +26820,7 @@ func (ec *executionContext) _SlackChannel_name(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SlackChannel_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SlackChannel_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SlackChannel", Field: field, @@ -25440,7 +26864,7 @@ func (ec *executionContext) _SlackChannel_teamID(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SlackChannel_teamID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SlackChannel_teamID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SlackChannel", Field: field, @@ -25484,7 +26908,7 @@ func (ec *executionContext) _SlackChannelConnection_nodes(ctx context.Context, f return ec.marshalNSlackChannel2ᚕgithubᚗcomᚋtargetᚋgoalertᚋnotificationᚋslackᚐChannelᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SlackChannelConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SlackChannelConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SlackChannelConnection", Field: field, @@ -25536,7 +26960,7 @@ func (ec *executionContext) _SlackChannelConnection_pageInfo(ctx context.Context return ec.marshalNPageInfo2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SlackChannelConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SlackChannelConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SlackChannelConnection", Field: field, @@ -25586,7 +27010,7 @@ func (ec *executionContext) _SlackUserGroup_id(ctx context.Context, field graphq return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SlackUserGroup_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SlackUserGroup_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SlackUserGroup", Field: field, @@ -25630,7 +27054,7 @@ func (ec *executionContext) _SlackUserGroup_name(ctx context.Context, field grap return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SlackUserGroup_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SlackUserGroup_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SlackUserGroup", Field: field, @@ -25674,7 +27098,7 @@ func (ec *executionContext) _SlackUserGroup_handle(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SlackUserGroup_handle(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SlackUserGroup_handle(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SlackUserGroup", Field: field, @@ -25718,7 +27142,7 @@ func (ec *executionContext) _SlackUserGroupConnection_nodes(ctx context.Context, return ec.marshalNSlackUserGroup2ᚕgithubᚗcomᚋtargetᚋgoalertᚋnotificationᚋslackᚐUserGroupᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SlackUserGroupConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SlackUserGroupConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SlackUserGroupConnection", Field: field, @@ -25770,7 +27194,7 @@ func (ec *executionContext) _SlackUserGroupConnection_pageInfo(ctx context.Conte return ec.marshalNPageInfo2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SlackUserGroupConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SlackUserGroupConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SlackUserGroupConnection", Field: field, @@ -25820,7 +27244,7 @@ func (ec *executionContext) _StringConnection_nodes(ctx context.Context, field g return ec.marshalNString2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StringConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_StringConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "StringConnection", Field: field, @@ -25864,7 +27288,7 @@ func (ec *executionContext) _StringConnection_pageInfo(ctx context.Context, fiel return ec.marshalNPageInfo2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_StringConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_StringConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "StringConnection", Field: field, @@ -25914,7 +27338,7 @@ func (ec *executionContext) _SystemLimit_id(ctx context.Context, field graphql.C return ec.marshalNSystemLimitID2githubᚗcomᚋtargetᚋgoalertᚋlimitᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SystemLimit_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SystemLimit_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SystemLimit", Field: field, @@ -25958,7 +27382,7 @@ func (ec *executionContext) _SystemLimit_description(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SystemLimit_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SystemLimit_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SystemLimit", Field: field, @@ -26002,7 +27426,7 @@ func (ec *executionContext) _SystemLimit_value(ctx context.Context, field graphq return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SystemLimit_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SystemLimit_value(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "SystemLimit", Field: field, @@ -26046,7 +27470,7 @@ func (ec *executionContext) _Target_id(ctx context.Context, field graphql.Collec return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Target_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Target_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Target", Field: field, @@ -26090,7 +27514,7 @@ func (ec *executionContext) _Target_type(ctx context.Context, field graphql.Coll return ec.marshalNTargetType2githubᚗcomᚋtargetᚋgoalertᚋassignmentᚐTargetType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Target_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Target_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Target", Field: field, @@ -26134,7 +27558,7 @@ func (ec *executionContext) _Target_name(ctx context.Context, field graphql.Coll return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Target_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Target_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Target", Field: field, @@ -26178,7 +27602,7 @@ func (ec *executionContext) _TemporarySchedule_start(ctx context.Context, field return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TemporarySchedule_start(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TemporarySchedule_start(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "TemporarySchedule", Field: field, @@ -26222,7 +27646,7 @@ func (ec *executionContext) _TemporarySchedule_end(ctx context.Context, field gr return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TemporarySchedule_end(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TemporarySchedule_end(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "TemporarySchedule", Field: field, @@ -26266,7 +27690,7 @@ func (ec *executionContext) _TemporarySchedule_shifts(ctx context.Context, field return ec.marshalNOnCallShift2ᚕgithubᚗcomᚋtargetᚋgoalertᚋoncallᚐShiftᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TemporarySchedule_shifts(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TemporarySchedule_shifts(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "TemporarySchedule", Field: field, @@ -26322,7 +27746,7 @@ func (ec *executionContext) _TimeSeriesBucket_start(ctx context.Context, field g return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TimeSeriesBucket_start(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TimeSeriesBucket_start(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "TimeSeriesBucket", Field: field, @@ -26366,7 +27790,7 @@ func (ec *executionContext) _TimeSeriesBucket_end(ctx context.Context, field gra return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TimeSeriesBucket_end(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TimeSeriesBucket_end(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "TimeSeriesBucket", Field: field, @@ -26410,7 +27834,7 @@ func (ec *executionContext) _TimeSeriesBucket_count(ctx context.Context, field g return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TimeSeriesBucket_count(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TimeSeriesBucket_count(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "TimeSeriesBucket", Field: field, @@ -26454,7 +27878,7 @@ func (ec *executionContext) _TimeZone_id(ctx context.Context, field graphql.Coll return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TimeZone_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TimeZone_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "TimeZone", Field: field, @@ -26498,7 +27922,7 @@ func (ec *executionContext) _TimeZoneConnection_nodes(ctx context.Context, field return ec.marshalNTimeZone2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐTimeZoneᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TimeZoneConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TimeZoneConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "TimeZoneConnection", Field: field, @@ -26546,7 +27970,7 @@ func (ec *executionContext) _TimeZoneConnection_pageInfo(ctx context.Context, fi return ec.marshalNPageInfo2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TimeZoneConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TimeZoneConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "TimeZoneConnection", Field: field, @@ -26596,7 +28020,7 @@ func (ec *executionContext) _User_id(ctx context.Context, field graphql.Collecte return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -26640,7 +28064,7 @@ func (ec *executionContext) _User_role(ctx context.Context, field graphql.Collec return ec.marshalNUserRole2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐUserRole(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_role(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_role(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -26684,7 +28108,7 @@ func (ec *executionContext) _User_name(ctx context.Context, field graphql.Collec return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -26728,7 +28152,7 @@ func (ec *executionContext) _User_email(ctx context.Context, field graphql.Colle return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_email(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_email(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -26772,7 +28196,7 @@ func (ec *executionContext) _User_contactMethods(ctx context.Context, field grap return ec.marshalNUserContactMethod2ᚕgithubᚗcomᚋtargetᚋgoalertᚋuserᚋcontactmethodᚐContactMethodᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_contactMethods(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_contactMethods(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -26842,7 +28266,7 @@ func (ec *executionContext) _User_notificationRules(ctx context.Context, field g return ec.marshalNUserNotificationRule2ᚕgithubᚗcomᚋtargetᚋgoalertᚋuserᚋnotificationruleᚐNotificationRuleᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_notificationRules(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_notificationRules(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -26896,7 +28320,7 @@ func (ec *executionContext) _User_calendarSubscriptions(ctx context.Context, fie return ec.marshalNUserCalendarSubscription2ᚕgithubᚗcomᚋtargetᚋgoalertᚋcalsubᚐSubscriptionᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_calendarSubscriptions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_calendarSubscriptions(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -26960,7 +28384,7 @@ func (ec *executionContext) _User_statusUpdateContactMethodID(ctx context.Contex return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_statusUpdateContactMethodID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_statusUpdateContactMethodID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -27004,7 +28428,7 @@ func (ec *executionContext) _User_authSubjects(ctx context.Context, field graphq return ec.marshalNAuthSubject2ᚕgithubᚗcomᚋtargetᚋgoalertᚋuserᚐAuthSubjectᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_authSubjects(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_authSubjects(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -27056,7 +28480,7 @@ func (ec *executionContext) _User_sessions(ctx context.Context, field graphql.Co return ec.marshalNUserSession2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐUserSessionᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_sessions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_sessions(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -27112,7 +28536,7 @@ func (ec *executionContext) _User_onCallSteps(ctx context.Context, field graphql return ec.marshalNEscalationPolicyStep2ᚕgithubᚗcomᚋtargetᚋgoalertᚋescalationᚐStepᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_onCallSteps(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_onCallSteps(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -27170,7 +28594,7 @@ func (ec *executionContext) _User_isFavorite(ctx context.Context, field graphql. return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_isFavorite(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_isFavorite(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -27214,7 +28638,7 @@ func (ec *executionContext) _User_assignedSchedules(ctx context.Context, field g return ec.marshalNSchedule2ᚕgithubᚗcomᚋtargetᚋgoalertᚋscheduleᚐScheduleᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_assignedSchedules(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_assignedSchedules(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "User", Field: field, @@ -27284,7 +28708,7 @@ func (ec *executionContext) _UserCalendarSubscription_id(ctx context.Context, fi return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserCalendarSubscription_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserCalendarSubscription_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserCalendarSubscription", Field: field, @@ -27328,7 +28752,7 @@ func (ec *executionContext) _UserCalendarSubscription_name(ctx context.Context, return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserCalendarSubscription_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserCalendarSubscription_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserCalendarSubscription", Field: field, @@ -27372,7 +28796,7 @@ func (ec *executionContext) _UserCalendarSubscription_reminderMinutes(ctx contex return ec.marshalNInt2ᚕintᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserCalendarSubscription_reminderMinutes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserCalendarSubscription_reminderMinutes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserCalendarSubscription", Field: field, @@ -27416,7 +28840,7 @@ func (ec *executionContext) _UserCalendarSubscription_fullSchedule(ctx context.C return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserCalendarSubscription_fullSchedule(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserCalendarSubscription_fullSchedule(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserCalendarSubscription", Field: field, @@ -27460,7 +28884,7 @@ func (ec *executionContext) _UserCalendarSubscription_scheduleID(ctx context.Con return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserCalendarSubscription_scheduleID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserCalendarSubscription_scheduleID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserCalendarSubscription", Field: field, @@ -27501,7 +28925,7 @@ func (ec *executionContext) _UserCalendarSubscription_schedule(ctx context.Conte return ec.marshalOSchedule2ᚖgithubᚗcomᚋtargetᚋgoalertᚋscheduleᚐSchedule(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserCalendarSubscription_schedule(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserCalendarSubscription_schedule(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserCalendarSubscription", Field: field, @@ -27571,7 +28995,7 @@ func (ec *executionContext) _UserCalendarSubscription_lastAccess(ctx context.Con return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserCalendarSubscription_lastAccess(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserCalendarSubscription_lastAccess(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserCalendarSubscription", Field: field, @@ -27615,7 +29039,7 @@ func (ec *executionContext) _UserCalendarSubscription_disabled(ctx context.Conte return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserCalendarSubscription_disabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserCalendarSubscription_disabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserCalendarSubscription", Field: field, @@ -27656,7 +29080,7 @@ func (ec *executionContext) _UserCalendarSubscription_url(ctx context.Context, f return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserCalendarSubscription_url(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserCalendarSubscription_url(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserCalendarSubscription", Field: field, @@ -27700,7 +29124,7 @@ func (ec *executionContext) _UserConnection_nodes(ctx context.Context, field gra return ec.marshalNUser2ᚕgithubᚗcomᚋtargetᚋgoalertᚋuserᚐUserᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserConnection", Field: field, @@ -27772,7 +29196,7 @@ func (ec *executionContext) _UserConnection_pageInfo(ctx context.Context, field return ec.marshalNPageInfo2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserConnection", Field: field, @@ -27822,7 +29246,7 @@ func (ec *executionContext) _UserContactMethod_id(ctx context.Context, field gra return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserContactMethod_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserContactMethod_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserContactMethod", Field: field, @@ -27863,7 +29287,7 @@ func (ec *executionContext) _UserContactMethod_type(ctx context.Context, field g return ec.marshalOContactMethodType2githubᚗcomᚋtargetᚋgoalertᚋuserᚋcontactmethodᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserContactMethod_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserContactMethod_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserContactMethod", Field: field, @@ -27907,7 +29331,7 @@ func (ec *executionContext) _UserContactMethod_dest(ctx context.Context, field g return ec.marshalNDestination2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestination(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserContactMethod_dest(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserContactMethod_dest(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserContactMethod", Field: field, @@ -27959,7 +29383,7 @@ func (ec *executionContext) _UserContactMethod_name(ctx context.Context, field g return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserContactMethod_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserContactMethod_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserContactMethod", Field: field, @@ -28003,7 +29427,7 @@ func (ec *executionContext) _UserContactMethod_value(ctx context.Context, field return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserContactMethod_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserContactMethod_value(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserContactMethod", Field: field, @@ -28047,7 +29471,7 @@ func (ec *executionContext) _UserContactMethod_formattedValue(ctx context.Contex return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserContactMethod_formattedValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserContactMethod_formattedValue(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserContactMethod", Field: field, @@ -28091,7 +29515,7 @@ func (ec *executionContext) _UserContactMethod_disabled(ctx context.Context, fie return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserContactMethod_disabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserContactMethod_disabled(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserContactMethod", Field: field, @@ -28135,7 +29559,7 @@ func (ec *executionContext) _UserContactMethod_pending(ctx context.Context, fiel return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserContactMethod_pending(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserContactMethod_pending(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserContactMethod", Field: field, @@ -28176,7 +29600,7 @@ func (ec *executionContext) _UserContactMethod_lastTestVerifyAt(ctx context.Cont return ec.marshalOISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserContactMethod_lastTestVerifyAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserContactMethod_lastTestVerifyAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserContactMethod", Field: field, @@ -28217,7 +29641,7 @@ func (ec *executionContext) _UserContactMethod_lastTestMessageState(ctx context. return ec.marshalONotificationState2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐNotificationState(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserContactMethod_lastTestMessageState(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserContactMethod_lastTestMessageState(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserContactMethod", Field: field, @@ -28266,7 +29690,7 @@ func (ec *executionContext) _UserContactMethod_lastVerifyMessageState(ctx contex return ec.marshalONotificationState2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐNotificationState(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserContactMethod_lastVerifyMessageState(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserContactMethod_lastVerifyMessageState(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserContactMethod", Field: field, @@ -28318,7 +29742,7 @@ func (ec *executionContext) _UserContactMethod_statusUpdates(ctx context.Context return ec.marshalNStatusUpdateState2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐStatusUpdateState(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserContactMethod_statusUpdates(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserContactMethod_statusUpdates(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserContactMethod", Field: field, @@ -28362,7 +29786,7 @@ func (ec *executionContext) _UserNotificationRule_id(ctx context.Context, field return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserNotificationRule_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserNotificationRule_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserNotificationRule", Field: field, @@ -28406,7 +29830,7 @@ func (ec *executionContext) _UserNotificationRule_delayMinutes(ctx context.Conte return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserNotificationRule_delayMinutes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserNotificationRule_delayMinutes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserNotificationRule", Field: field, @@ -28450,7 +29874,7 @@ func (ec *executionContext) _UserNotificationRule_contactMethodID(ctx context.Co return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserNotificationRule_contactMethodID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserNotificationRule_contactMethodID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserNotificationRule", Field: field, @@ -28491,7 +29915,7 @@ func (ec *executionContext) _UserNotificationRule_contactMethod(ctx context.Cont return ec.marshalOUserContactMethod2ᚖgithubᚗcomᚋtargetᚋgoalertᚋuserᚋcontactmethodᚐContactMethod(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserNotificationRule_contactMethod(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserNotificationRule_contactMethod(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserNotificationRule", Field: field, @@ -28561,7 +29985,7 @@ func (ec *executionContext) _UserOverride_id(ctx context.Context, field graphql. return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserOverride_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserOverride_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserOverride", Field: field, @@ -28605,7 +30029,7 @@ func (ec *executionContext) _UserOverride_start(ctx context.Context, field graph return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserOverride_start(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserOverride_start(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserOverride", Field: field, @@ -28649,7 +30073,7 @@ func (ec *executionContext) _UserOverride_end(ctx context.Context, field graphql return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserOverride_end(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserOverride_end(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserOverride", Field: field, @@ -28693,7 +30117,7 @@ func (ec *executionContext) _UserOverride_addUserID(ctx context.Context, field g return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserOverride_addUserID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserOverride_addUserID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserOverride", Field: field, @@ -28737,7 +30161,7 @@ func (ec *executionContext) _UserOverride_removeUserID(ctx context.Context, fiel return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserOverride_removeUserID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserOverride_removeUserID(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserOverride", Field: field, @@ -28778,7 +30202,7 @@ func (ec *executionContext) _UserOverride_addUser(ctx context.Context, field gra return ec.marshalOUser2ᚖgithubᚗcomᚋtargetᚋgoalertᚋuserᚐUser(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserOverride_addUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserOverride_addUser(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserOverride", Field: field, @@ -28847,7 +30271,7 @@ func (ec *executionContext) _UserOverride_removeUser(ctx context.Context, field return ec.marshalOUser2ᚖgithubᚗcomᚋtargetᚋgoalertᚋuserᚐUser(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserOverride_removeUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserOverride_removeUser(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserOverride", Field: field, @@ -28919,7 +30343,7 @@ func (ec *executionContext) _UserOverride_target(ctx context.Context, field grap return ec.marshalNTarget2ᚖgithubᚗcomᚋtargetᚋgoalertᚋassignmentᚐRawTarget(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserOverride_target(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserOverride_target(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserOverride", Field: field, @@ -28971,7 +30395,7 @@ func (ec *executionContext) _UserOverrideConnection_nodes(ctx context.Context, f return ec.marshalNUserOverride2ᚕgithubᚗcomᚋtargetᚋgoalertᚋoverrideᚐUserOverrideᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserOverrideConnection_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserOverrideConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserOverrideConnection", Field: field, @@ -29033,7 +30457,7 @@ func (ec *executionContext) _UserOverrideConnection_pageInfo(ctx context.Context return ec.marshalNPageInfo2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserOverrideConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserOverrideConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserOverrideConnection", Field: field, @@ -29083,7 +30507,7 @@ func (ec *executionContext) _UserSession_id(ctx context.Context, field graphql.C return ec.marshalNID2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserSession_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserSession_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserSession", Field: field, @@ -29127,7 +30551,7 @@ func (ec *executionContext) _UserSession_current(ctx context.Context, field grap return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserSession_current(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserSession_current(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserSession", Field: field, @@ -29171,7 +30595,7 @@ func (ec *executionContext) _UserSession_userAgent(ctx context.Context, field gr return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserSession_userAgent(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserSession_userAgent(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserSession", Field: field, @@ -29215,7 +30639,7 @@ func (ec *executionContext) _UserSession_createdAt(ctx context.Context, field gr return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserSession_createdAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserSession_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserSession", Field: field, @@ -29259,7 +30683,7 @@ func (ec *executionContext) _UserSession_lastAccessAt(ctx context.Context, field return ec.marshalNISOTimestamp2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserSession_lastAccessAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserSession_lastAccessAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "UserSession", Field: field, @@ -29303,7 +30727,7 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -29344,7 +30768,7 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -29388,7 +30812,7 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_locations(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -29432,7 +30856,7 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_args(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -29486,7 +30910,7 @@ func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_isRepeatable(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Directive", Field: field, @@ -29530,7 +30954,7 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, @@ -29571,7 +30995,7 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, @@ -29615,7 +31039,7 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_isDeprecated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, @@ -29656,7 +31080,7 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_deprecationReason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__EnumValue", Field: field, @@ -29700,7 +31124,7 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -29741,7 +31165,7 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -29785,7 +31209,7 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_args(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -29839,7 +31263,7 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -29905,7 +31329,7 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_isDeprecated(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -29946,7 +31370,7 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_deprecationReason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Field", Field: field, @@ -29990,7 +31414,7 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, @@ -30031,7 +31455,7 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, @@ -30075,7 +31499,7 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_type(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, @@ -30138,7 +31562,7 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_defaultValue(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__InputValue", Field: field, @@ -30179,7 +31603,7 @@ func (ec *executionContext) ___Schema_description(ctx context.Context, field gra return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -30223,7 +31647,7 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_types(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -30289,7 +31713,7 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_queryType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -30352,7 +31776,7 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_mutationType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -30415,7 +31839,7 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_subscriptionType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -30481,7 +31905,7 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Schema_directives(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Schema", Field: field, @@ -30537,7 +31961,7 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll return ec.marshalN__TypeKind2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_kind(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -30578,7 +32002,7 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -30619,7 +32043,7 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_description(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -30726,7 +32150,7 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_interfaces(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -30789,7 +32213,7 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_possibleTypes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -30914,7 +32338,7 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_inputFields(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -30965,7 +32389,7 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_ofType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -31028,7 +32452,7 @@ func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field gr return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Type_specifiedByURL(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "__Type", Field: field, @@ -31045,6 +32469,40 @@ func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Conte // region **************************** input.gotpl ***************************** +func (ec *executionContext) unmarshalInputActionInput(ctx context.Context, obj interface{}) (ActionInput, error) { + var it ActionInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"dest", "params"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "dest": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("dest")) + data, err := ec.unmarshalNDestinationInput2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestinationInput(ctx, v) + if err != nil { + return it, err + } + it.Dest = data + case "params": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("params")) + data, err := ec.unmarshalNDynamicParamInput2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDynamicParamInputᚄ(ctx, v) + if err != nil { + return it, err + } + it.Params = data + } + } + + return it, nil +} + func (ec *executionContext) unmarshalInputAlertMetadataInput(ctx context.Context, obj interface{}) (AlertMetadataInput, error) { var it AlertMetadataInput asMap := map[string]interface{}{} @@ -31384,6 +32842,54 @@ func (ec *executionContext) unmarshalInputCalcRotationHandoffTimesInput(ctx cont return it, nil } +func (ec *executionContext) unmarshalInputClauseInput(ctx context.Context, obj interface{}) (ClauseInput, error) { + var it ClauseInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"field", "operator", "value", "negate"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "field": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) + data, err := ec.unmarshalNExprIdentifier2githubᚗcomᚋexprᚑlangᚋexprᚋastᚐNode(ctx, v) + if err != nil { + return it, err + } + it.Field = data + case "operator": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("operator")) + data, err := ec.unmarshalNExprOperator2string(ctx, v) + if err != nil { + return it, err + } + it.Operator = data + case "value": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) + data, err := ec.unmarshalNExprValue2githubᚗcomᚋexprᚑlangᚋexprᚋastᚐNode(ctx, v) + if err != nil { + return it, err + } + it.Value = data + case "negate": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("negate")) + data, err := ec.unmarshalNBoolean2bool(ctx, v) + if err != nil { + return it, err + } + it.Negate = data + } + } + + return it, nil +} + func (ec *executionContext) unmarshalInputClearTemporarySchedulesInput(ctx context.Context, obj interface{}) (ClearTemporarySchedulesInput, error) { var it ClearTemporarySchedulesInput asMap := map[string]interface{}{} @@ -31473,6 +32979,60 @@ func (ec *executionContext) unmarshalInputCloseMatchingAlertInput(ctx context.Co return it, nil } +func (ec *executionContext) unmarshalInputConditionInput(ctx context.Context, obj interface{}) (ConditionInput, error) { + var it ConditionInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"clauses"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "clauses": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clauses")) + data, err := ec.unmarshalNClauseInput2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐClauseInputᚄ(ctx, v) + if err != nil { + return it, err + } + it.Clauses = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputConditionToExprInput(ctx context.Context, obj interface{}) (ConditionToExprInput, error) { + var it ConditionToExprInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"condition"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "condition": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("condition")) + data, err := ec.unmarshalNConditionInput2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐConditionInput(ctx, v) + if err != nil { + return it, err + } + it.Condition = data + } + } + + return it, nil +} + func (ec *executionContext) unmarshalInputConfigValueInput(ctx context.Context, obj interface{}) (ConfigValueInput, error) { var it ConfigValueInput asMap := map[string]interface{}{} @@ -32714,6 +34274,40 @@ func (ec *executionContext) unmarshalInputDestinationInput(ctx context.Context, return it, nil } +func (ec *executionContext) unmarshalInputDynamicParamInput(ctx context.Context, obj interface{}) (DynamicParamInput, error) { + var it DynamicParamInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"paramID", "expr"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "paramID": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("paramID")) + data, err := ec.unmarshalNID2string(ctx, v) + if err != nil { + return it, err + } + it.ParamID = data + case "expr": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("expr")) + data, err := ec.unmarshalNExprStringExpression2string(ctx, v) + if err != nil { + return it, err + } + it.Expr = data + } + } + + return it, nil +} + func (ec *executionContext) unmarshalInputEscalationPolicySearchOptions(ctx context.Context, obj interface{}) (EscalationPolicySearchOptions, error) { var it EscalationPolicySearchOptions asMap := map[string]interface{}{} @@ -32792,6 +34386,33 @@ func (ec *executionContext) unmarshalInputEscalationPolicySearchOptions(ctx cont return it, nil } +func (ec *executionContext) unmarshalInputExprToConditionInput(ctx context.Context, obj interface{}) (ExprToConditionInput, error) { + var it ExprToConditionInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"expr"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "expr": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("expr")) + data, err := ec.unmarshalNExprBooleanExpression2string(ctx, v) + if err != nil { + return it, err + } + it.Expr = data + } + } + + return it, nil +} + func (ec *executionContext) unmarshalInputFieldValueInput(ctx context.Context, obj interface{}) (FieldValueInput, error) { var it FieldValueInput asMap := map[string]interface{}{} @@ -32884,6 +34505,61 @@ func (ec *executionContext) unmarshalInputIntegrationKeySearchOptions(ctx contex return it, nil } +func (ec *executionContext) unmarshalInputKeyRuleInput(ctx context.Context, obj interface{}) (KeyRuleInput, error) { + var it KeyRuleInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"id", "name", "description", "conditionExpr", "actions"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "id": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) + data, err := ec.unmarshalOID2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.ID = data + case "name": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "description": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Description = data + case "conditionExpr": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("conditionExpr")) + data, err := ec.unmarshalNExprBooleanExpression2string(ctx, v) + if err != nil { + return it, err + } + it.ConditionExpr = data + case "actions": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("actions")) + data, err := ec.unmarshalNActionInput2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐActionInputᚄ(ctx, v) + if err != nil { + return it, err + } + it.Actions = data + } + } + + return it, nil +} + func (ec *executionContext) unmarshalInputLabelKeySearchOptions(ctx context.Context, obj interface{}) (LabelKeySearchOptions, error) { var it LabelKeySearchOptions asMap := map[string]interface{}{} @@ -34393,6 +36069,54 @@ func (ec *executionContext) unmarshalInputUpdateHeartbeatMonitorInput(ctx contex return it, nil } +func (ec *executionContext) unmarshalInputUpdateKeyConfigInput(ctx context.Context, obj interface{}) (UpdateKeyConfigInput, error) { + var it UpdateKeyConfigInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"keyID", "stopAtFirstRule", "rules", "defaultActions"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "keyID": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyID")) + data, err := ec.unmarshalNID2string(ctx, v) + if err != nil { + return it, err + } + it.KeyID = data + case "stopAtFirstRule": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("stopAtFirstRule")) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) + if err != nil { + return it, err + } + it.StopAtFirstRule = data + case "rules": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("rules")) + data, err := ec.unmarshalOKeyRuleInput2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐKeyRuleInputᚄ(ctx, v) + if err != nil { + return it, err + } + it.Rules = data + case "defaultActions": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("defaultActions")) + data, err := ec.unmarshalOActionInput2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐActionInputᚄ(ctx, v) + if err != nil { + return it, err + } + it.DefaultActions = data + } + } + + return it, nil +} + func (ec *executionContext) unmarshalInputUpdateRotationInput(ctx context.Context, obj interface{}) (UpdateRotationInput, error) { var it UpdateRotationInput asMap := map[string]interface{}{} @@ -35049,6 +36773,50 @@ func (ec *executionContext) _InlineDisplayInfo(ctx context.Context, sel ast.Sele // region **************************** object.gotpl **************************** +var actionImplementors = []string{"Action"} + +func (ec *executionContext) _Action(ctx context.Context, sel ast.SelectionSet, obj *Action) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, actionImplementors) + + 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("Action") + case "dest": + out.Values[i] = ec._Action_dest(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "params": + out.Values[i] = ec._Action_params(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 alertImplementors = []string{"Alert"} func (ec *executionContext) _Alert(ctx context.Context, sel ast.SelectionSet, obj *alert.Alert) graphql.Marshaler { @@ -35191,7 +36959,7 @@ func (ec *executionContext) _Alert(ctx context.Context, sel ast.SelectionSet, ob case "service": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -35224,7 +36992,7 @@ func (ec *executionContext) _Alert(ctx context.Context, sel ast.SelectionSet, ob case "state": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -35329,7 +37097,7 @@ func (ec *executionContext) _Alert(ctx context.Context, sel ast.SelectionSet, ob case "metrics": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -35362,7 +37130,7 @@ func (ec *executionContext) _Alert(ctx context.Context, sel ast.SelectionSet, ob case "noiseReason": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -35395,7 +37163,7 @@ func (ec *executionContext) _Alert(ctx context.Context, sel ast.SelectionSet, ob case "meta": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -35632,7 +37400,7 @@ func (ec *executionContext) _AlertLogEntry(ctx context.Context, sel ast.Selectio case "state": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -36070,6 +37838,99 @@ func (ec *executionContext) _AuthSubjectConnection(ctx context.Context, sel ast. return out } +var clauseImplementors = []string{"Clause"} + +func (ec *executionContext) _Clause(ctx context.Context, sel ast.SelectionSet, obj *Clause) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, clauseImplementors) + + 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("Clause") + case "field": + out.Values[i] = ec._Clause_field(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "operator": + out.Values[i] = ec._Clause_operator(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "value": + out.Values[i] = ec._Clause_value(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "negate": + out.Values[i] = ec._Clause_negate(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 conditionImplementors = []string{"Condition"} + +func (ec *executionContext) _Condition(ctx context.Context, sel ast.SelectionSet, obj *Condition) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, conditionImplementors) + + 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("Condition") + case "clauses": + out.Values[i] = ec._Condition_clauses(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 configHintImplementors = []string{"ConfigHint"} func (ec *executionContext) _ConfigHint(ctx context.Context, sel ast.SelectionSet, obj *ConfigHint) graphql.Marshaler { @@ -36795,6 +38656,50 @@ func (ec *executionContext) _DestinationTypeInfo(ctx context.Context, sel ast.Se return out } +var dynamicParamImplementors = []string{"DynamicParam"} + +func (ec *executionContext) _DynamicParam(ctx context.Context, sel ast.SelectionSet, obj *DynamicParam) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, dynamicParamImplementors) + + 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("DynamicParam") + case "paramID": + out.Values[i] = ec._DynamicParam_paramID(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "expr": + out.Values[i] = ec._DynamicParam_expr(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 escalationPolicyImplementors = []string{"EscalationPolicy"} func (ec *executionContext) _EscalationPolicy(ctx context.Context, sel ast.SelectionSet, obj *escalation.Policy) graphql.Marshaler { @@ -37138,7 +39043,7 @@ func (ec *executionContext) _EscalationPolicyStep(ctx context.Context, sel ast.S case "escalationPolicy": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -37168,7 +39073,113 @@ func (ec *executionContext) _EscalationPolicyStep(ctx context.Context, sel ast.S } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "actions": + case "actions": + 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._EscalationPolicyStep_actions(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) }) + 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 exprImplementors = []string{"Expr"} + +func (ec *executionContext) _Expr(ctx context.Context, sel ast.SelectionSet, obj *Expr) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, exprImplementors) + + 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("Expr") + case "exprToCondition": + 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._Expr_exprToCondition(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 "conditionToExpr": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -37177,7 +39188,7 @@ func (ec *executionContext) _EscalationPolicyStep(ctx context.Context, sel ast.S ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._EscalationPolicyStep_actions(ctx, field, obj) + res = ec._Expr_conditionToExpr(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -37403,7 +39414,7 @@ func (ec *executionContext) _GQLAPIKey(ctx context.Context, sel ast.SelectionSet case "createdBy": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -37441,7 +39452,7 @@ func (ec *executionContext) _GQLAPIKey(ctx context.Context, sel ast.SelectionSet case "updatedBy": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -37693,147 +39704,286 @@ func (ec *executionContext) _HeartbeatMonitor(ctx context.Context, sel ast.Selec return out } -var integrationKeyImplementors = []string{"IntegrationKey"} +var integrationKeyImplementors = []string{"IntegrationKey"} + +func (ec *executionContext) _IntegrationKey(ctx context.Context, sel ast.SelectionSet, obj *integrationkey.IntegrationKey) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, integrationKeyImplementors) + + 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("IntegrationKey") + case "id": + out.Values[i] = ec._IntegrationKey_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "serviceID": + out.Values[i] = ec._IntegrationKey_serviceID(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "type": + 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._IntegrationKey_type(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 "name": + out.Values[i] = ec._IntegrationKey_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "href": + 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._IntegrationKey_href(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 "externalSystemName": + out.Values[i] = ec._IntegrationKey_externalSystemName(ctx, field, obj) + case "config": + 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._IntegrationKey_config(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) }) + 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 integrationKeyConnectionImplementors = []string{"IntegrationKeyConnection"} + +func (ec *executionContext) _IntegrationKeyConnection(ctx context.Context, sel ast.SelectionSet, obj *IntegrationKeyConnection) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, integrationKeyConnectionImplementors) + + 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("IntegrationKeyConnection") + case "nodes": + out.Values[i] = ec._IntegrationKeyConnection_nodes(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "pageInfo": + out.Values[i] = ec._IntegrationKeyConnection_pageInfo(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 integrationKeyTypeInfoImplementors = []string{"IntegrationKeyTypeInfo"} + +func (ec *executionContext) _IntegrationKeyTypeInfo(ctx context.Context, sel ast.SelectionSet, obj *IntegrationKeyTypeInfo) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, integrationKeyTypeInfoImplementors) + + 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("IntegrationKeyTypeInfo") + case "id": + out.Values[i] = ec._IntegrationKeyTypeInfo_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "name": + out.Values[i] = ec._IntegrationKeyTypeInfo_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "label": + out.Values[i] = ec._IntegrationKeyTypeInfo_label(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "enabled": + out.Values[i] = ec._IntegrationKeyTypeInfo_enabled(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 keyConfigImplementors = []string{"KeyConfig"} -func (ec *executionContext) _IntegrationKey(ctx context.Context, sel ast.SelectionSet, obj *integrationkey.IntegrationKey) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, integrationKeyImplementors) +func (ec *executionContext) _KeyConfig(ctx context.Context, sel ast.SelectionSet, obj *KeyConfig) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, keyConfigImplementors) 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("IntegrationKey") - case "id": - out.Values[i] = ec._IntegrationKey_id(ctx, field, obj) + out.Values[i] = graphql.MarshalString("KeyConfig") + case "stopAtFirstRule": + out.Values[i] = ec._KeyConfig_stopAtFirstRule(ctx, field, obj) if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "serviceID": - out.Values[i] = ec._IntegrationKey_serviceID(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "type": - 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._IntegrationKey_type(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 "name": - out.Values[i] = ec._IntegrationKey_name(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "href": - 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._IntegrationKey_href(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.Invalids++ } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "externalSystemName": - out.Values[i] = ec._IntegrationKey_externalSystemName(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 integrationKeyConnectionImplementors = []string{"IntegrationKeyConnection"} - -func (ec *executionContext) _IntegrationKeyConnection(ctx context.Context, sel ast.SelectionSet, obj *IntegrationKeyConnection) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, integrationKeyConnectionImplementors) - - 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("IntegrationKeyConnection") - case "nodes": - out.Values[i] = ec._IntegrationKeyConnection_nodes(ctx, field, obj) + case "rules": + out.Values[i] = ec._KeyConfig_rules(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "pageInfo": - out.Values[i] = ec._IntegrationKeyConnection_pageInfo(ctx, field, obj) + case "defaultActions": + out.Values[i] = ec._KeyConfig_defaultActions(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } @@ -37860,34 +40010,39 @@ func (ec *executionContext) _IntegrationKeyConnection(ctx context.Context, sel a return out } -var integrationKeyTypeInfoImplementors = []string{"IntegrationKeyTypeInfo"} +var keyRuleImplementors = []string{"KeyRule"} -func (ec *executionContext) _IntegrationKeyTypeInfo(ctx context.Context, sel ast.SelectionSet, obj *IntegrationKeyTypeInfo) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, integrationKeyTypeInfoImplementors) +func (ec *executionContext) _KeyRule(ctx context.Context, sel ast.SelectionSet, obj *KeyRule) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, keyRuleImplementors) 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("IntegrationKeyTypeInfo") + out.Values[i] = graphql.MarshalString("KeyRule") case "id": - out.Values[i] = ec._IntegrationKeyTypeInfo_id(ctx, field, obj) + out.Values[i] = ec._KeyRule_id(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "name": - out.Values[i] = ec._IntegrationKeyTypeInfo_name(ctx, field, obj) + out.Values[i] = ec._KeyRule_name(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "label": - out.Values[i] = ec._IntegrationKeyTypeInfo_label(ctx, field, obj) + case "description": + out.Values[i] = ec._KeyRule_description(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "enabled": - out.Values[i] = ec._IntegrationKeyTypeInfo_enabled(ctx, field, obj) + case "conditionExpr": + out.Values[i] = ec._KeyRule_conditionExpr(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "actions": + out.Values[i] = ec._KeyRule_actions(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } @@ -38502,6 +40657,13 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) if out.Values[i] == graphql.Null { out.Invalids++ } + case "updateKeyConfig": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_updateKeyConfig(ctx, field) + }) + if out.Values[i] == graphql.Null { + out.Invalids++ + } default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -38754,7 +40916,7 @@ func (ec *executionContext) _OnCallShift(ctx context.Context, sel ast.SelectionS case "user": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -38949,7 +41111,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "phoneNumberInfo": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -39034,7 +41196,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "user": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -39075,7 +41237,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "alert": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -39116,7 +41278,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "service": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -39135,7 +41297,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "integrationKey": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -39154,7 +41316,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "heartbeatMonitor": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -39195,7 +41357,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "rotation": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -39258,7 +41420,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "schedule": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -39277,7 +41439,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "userCalendarSubscription": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -39318,7 +41480,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "escalationPolicy": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -39513,7 +41675,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "userOverride": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -39642,7 +41804,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "userContactMethod": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -39683,7 +41845,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "slackChannel": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -39724,7 +41886,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "slackUserGroup": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -39765,7 +41927,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr case "linkAccountInfo": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -39912,6 +42074,28 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "expr": + 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._Query_expr(ctx, field) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) case "gqlAPIKeys": field := field @@ -40683,7 +42867,7 @@ func (ec *executionContext) _Schedule(ctx context.Context, sel ast.SelectionSet, case "target": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -41102,7 +43286,7 @@ func (ec *executionContext) _Service(ctx context.Context, sel ast.SelectionSet, case "escalationPolicy": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -42516,7 +44700,7 @@ func (ec *executionContext) _UserCalendarSubscription(ctx context.Context, sel a case "schedule": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -42559,7 +44743,7 @@ func (ec *executionContext) _UserCalendarSubscription(ctx context.Context, sel a case "url": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -42802,7 +44986,7 @@ func (ec *executionContext) _UserContactMethod(ctx context.Context, sel ast.Sele case "lastTestMessageState": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -42835,7 +45019,7 @@ func (ec *executionContext) _UserContactMethod(ctx context.Context, sel ast.Sele case "lastVerifyMessageState": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -42953,7 +45137,7 @@ func (ec *executionContext) _UserNotificationRule(ctx context.Context, sel ast.S case "contactMethod": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -43045,7 +45229,7 @@ func (ec *executionContext) _UserOverride(ctx context.Context, sel ast.Selection case "addUser": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -43078,7 +45262,7 @@ func (ec *executionContext) _UserOverride(ctx context.Context, sel ast.Selection case "removeUser": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) @@ -43596,6 +45780,76 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o // region ***************************** type.gotpl ***************************** +func (ec *executionContext) marshalNAction2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐAction(ctx context.Context, sel ast.SelectionSet, v Action) graphql.Marshaler { + return ec._Action(ctx, sel, &v) +} + +func (ec *executionContext) marshalNAction2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐActionᚄ(ctx context.Context, sel ast.SelectionSet, v []Action) 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.marshalNAction2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐAction(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) unmarshalNActionInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐActionInput(ctx context.Context, v interface{}) (ActionInput, error) { + res, err := ec.unmarshalInputActionInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNActionInput2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐActionInputᚄ(ctx context.Context, v interface{}) ([]ActionInput, error) { + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]ActionInput, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNActionInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐActionInput(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + func (ec *executionContext) marshalNAlert2githubᚗcomᚋtargetᚋgoalertᚋalertᚐAlert(ctx context.Context, sel ast.SelectionSet, v alert.Alert) graphql.Marshaler { return ec._Alert(ctx, sel, &v) } @@ -43869,6 +46123,76 @@ func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.Se return res } +func (ec *executionContext) marshalNClause2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐClause(ctx context.Context, sel ast.SelectionSet, v Clause) graphql.Marshaler { + return ec._Clause(ctx, sel, &v) +} + +func (ec *executionContext) marshalNClause2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐClauseᚄ(ctx context.Context, sel ast.SelectionSet, v []Clause) 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.marshalNClause2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐClause(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) unmarshalNClauseInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐClauseInput(ctx context.Context, v interface{}) (ClauseInput, error) { + res, err := ec.unmarshalInputClauseInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNClauseInput2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐClauseInputᚄ(ctx context.Context, v interface{}) ([]ClauseInput, error) { + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]ClauseInput, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNClauseInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐClauseInput(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + func (ec *executionContext) unmarshalNClearTemporarySchedulesInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐClearTemporarySchedulesInput(ctx context.Context, v interface{}) (ClearTemporarySchedulesInput, error) { res, err := ec.unmarshalInputClearTemporarySchedulesInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) @@ -43889,6 +46213,30 @@ func (ec *executionContext) unmarshalNCloseMatchingAlertInput2githubᚗcomᚋtar return res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) marshalNCondition2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐCondition(ctx context.Context, sel ast.SelectionSet, v Condition) graphql.Marshaler { + return ec._Condition(ctx, sel, &v) +} + +func (ec *executionContext) marshalNCondition2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐCondition(ctx context.Context, sel ast.SelectionSet, v *Condition) 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._Condition(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNConditionInput2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐConditionInput(ctx context.Context, v interface{}) (*ConditionInput, error) { + res, err := ec.unmarshalInputConditionInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNConditionToExprInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐConditionToExprInput(ctx context.Context, v interface{}) (ConditionToExprInput, error) { + res, err := ec.unmarshalInputConditionToExprInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) marshalNConfigHint2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐConfigHint(ctx context.Context, sel ast.SelectionSet, v ConfigHint) graphql.Marshaler { return ec._ConfigHint(ctx, sel, &v) } @@ -44280,7 +46628,208 @@ func (ec *executionContext) marshalNDestinationFieldConfig2ᚕgithubᚗcomᚋtar if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNDestinationFieldConfig2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestinationFieldConfig(ctx, sel, v[i]) + ret[i] = ec.marshalNDestinationFieldConfig2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestinationFieldConfig(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) unmarshalNDestinationFieldSearchInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestinationFieldSearchInput(ctx context.Context, v interface{}) (DestinationFieldSearchInput, error) { + res, err := ec.unmarshalInputDestinationFieldSearchInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNDestinationFieldValidateInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestinationFieldValidateInput(ctx context.Context, v interface{}) (DestinationFieldValidateInput, error) { + res, err := ec.unmarshalInputDestinationFieldValidateInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNDestinationInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestinationInput(ctx context.Context, v interface{}) (DestinationInput, error) { + res, err := ec.unmarshalInputDestinationInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNDestinationInput2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestinationInput(ctx context.Context, v interface{}) (*DestinationInput, error) { + res, err := ec.unmarshalInputDestinationInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNDestinationType2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNDestinationType2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(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 +} + +func (ec *executionContext) marshalNDestinationTypeInfo2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestinationTypeInfo(ctx context.Context, sel ast.SelectionSet, v DestinationTypeInfo) graphql.Marshaler { + return ec._DestinationTypeInfo(ctx, sel, &v) +} + +func (ec *executionContext) marshalNDestinationTypeInfo2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestinationTypeInfoᚄ(ctx context.Context, sel ast.SelectionSet, v []DestinationTypeInfo) 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.marshalNDestinationTypeInfo2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestinationTypeInfo(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) marshalNDynamicParam2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDynamicParam(ctx context.Context, sel ast.SelectionSet, v DynamicParam) graphql.Marshaler { + return ec._DynamicParam(ctx, sel, &v) +} + +func (ec *executionContext) marshalNDynamicParam2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDynamicParamᚄ(ctx context.Context, sel ast.SelectionSet, v []DynamicParam) 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.marshalNDynamicParam2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDynamicParam(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) unmarshalNDynamicParamInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDynamicParamInput(ctx context.Context, v interface{}) (DynamicParamInput, error) { + res, err := ec.unmarshalInputDynamicParamInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNDynamicParamInput2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDynamicParamInputᚄ(ctx context.Context, v interface{}) ([]DynamicParamInput, error) { + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]DynamicParamInput, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNDynamicParamInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDynamicParamInput(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalNEscalationPolicy2githubᚗcomᚋtargetᚋgoalertᚋescalationᚐPolicy(ctx context.Context, sel ast.SelectionSet, v escalation.Policy) graphql.Marshaler { + return ec._EscalationPolicy(ctx, sel, &v) +} + +func (ec *executionContext) marshalNEscalationPolicy2ᚕgithubᚗcomᚋtargetᚋgoalertᚋescalationᚐPolicyᚄ(ctx context.Context, sel ast.SelectionSet, v []escalation.Policy) 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.marshalNEscalationPolicy2githubᚗcomᚋtargetᚋgoalertᚋescalationᚐPolicy(ctx, sel, v[i]) } if isLen1 { f(i) @@ -44300,41 +46849,25 @@ func (ec *executionContext) marshalNDestinationFieldConfig2ᚕgithubᚗcomᚋtar return ret } -func (ec *executionContext) unmarshalNDestinationFieldSearchInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestinationFieldSearchInput(ctx context.Context, v interface{}) (DestinationFieldSearchInput, error) { - res, err := ec.unmarshalInputDestinationFieldSearchInput(ctx, v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) unmarshalNDestinationFieldValidateInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestinationFieldValidateInput(ctx context.Context, v interface{}) (DestinationFieldValidateInput, error) { - res, err := ec.unmarshalInputDestinationFieldValidateInput(ctx, v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) unmarshalNDestinationInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestinationInput(ctx context.Context, v interface{}) (DestinationInput, error) { - res, err := ec.unmarshalInputDestinationInput(ctx, v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) unmarshalNDestinationType2string(ctx context.Context, v interface{}) (string, error) { - res, err := graphql.UnmarshalString(v) - return res, graphql.ErrorOnPath(ctx, err) +func (ec *executionContext) marshalNEscalationPolicyConnection2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐEscalationPolicyConnection(ctx context.Context, sel ast.SelectionSet, v EscalationPolicyConnection) graphql.Marshaler { + return ec._EscalationPolicyConnection(ctx, sel, &v) } -func (ec *executionContext) marshalNDestinationType2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { - res := graphql.MarshalString(v) - if res == graphql.Null { +func (ec *executionContext) marshalNEscalationPolicyConnection2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐEscalationPolicyConnection(ctx context.Context, sel ast.SelectionSet, v *EscalationPolicyConnection) 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 res + return ec._EscalationPolicyConnection(ctx, sel, v) } -func (ec *executionContext) marshalNDestinationTypeInfo2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestinationTypeInfo(ctx context.Context, sel ast.SelectionSet, v DestinationTypeInfo) graphql.Marshaler { - return ec._DestinationTypeInfo(ctx, sel, &v) +func (ec *executionContext) marshalNEscalationPolicyStep2githubᚗcomᚋtargetᚋgoalertᚋescalationᚐStep(ctx context.Context, sel ast.SelectionSet, v escalation.Step) graphql.Marshaler { + return ec._EscalationPolicyStep(ctx, sel, &v) } -func (ec *executionContext) marshalNDestinationTypeInfo2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestinationTypeInfoᚄ(ctx context.Context, sel ast.SelectionSet, v []DestinationTypeInfo) graphql.Marshaler { +func (ec *executionContext) marshalNEscalationPolicyStep2ᚕgithubᚗcomᚋtargetᚋgoalertᚋescalationᚐStepᚄ(ctx context.Context, sel ast.SelectionSet, v []escalation.Step) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -44358,7 +46891,7 @@ func (ec *executionContext) marshalNDestinationTypeInfo2ᚕgithubᚗcomᚋtarget if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNDestinationTypeInfo2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐDestinationTypeInfo(ctx, sel, v[i]) + ret[i] = ec.marshalNEscalationPolicyStep2githubᚗcomᚋtargetᚋgoalertᚋescalationᚐStep(ctx, sel, v[i]) } if isLen1 { f(i) @@ -44378,114 +46911,110 @@ func (ec *executionContext) marshalNDestinationTypeInfo2ᚕgithubᚗcomᚋtarget return ret } -func (ec *executionContext) marshalNEscalationPolicy2githubᚗcomᚋtargetᚋgoalertᚋescalationᚐPolicy(ctx context.Context, sel ast.SelectionSet, v escalation.Policy) graphql.Marshaler { - return ec._EscalationPolicy(ctx, sel, &v) +func (ec *executionContext) marshalNExpr2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐExpr(ctx context.Context, sel ast.SelectionSet, v Expr) graphql.Marshaler { + return ec._Expr(ctx, sel, &v) } -func (ec *executionContext) marshalNEscalationPolicy2ᚕgithubᚗcomᚋtargetᚋgoalertᚋescalationᚐPolicyᚄ(ctx context.Context, sel ast.SelectionSet, v []escalation.Policy) 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.marshalNEscalationPolicy2githubᚗcomᚋtargetᚋgoalertᚋescalationᚐPolicy(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) +func (ec *executionContext) marshalNExpr2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐExpr(ctx context.Context, sel ast.SelectionSet, v *Expr) 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 } - wg.Wait() + return ec._Expr(ctx, sel, v) +} - for _, e := range ret { - if e == graphql.Null { - return graphql.Null +func (ec *executionContext) unmarshalNExprBooleanExpression2string(ctx context.Context, v interface{}) (string, error) { + res, err := UnmarshalExprBooleanExpression(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNExprBooleanExpression2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := MarshalExprBooleanExpression(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 ret + return res } -func (ec *executionContext) marshalNEscalationPolicyConnection2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐEscalationPolicyConnection(ctx context.Context, sel ast.SelectionSet, v EscalationPolicyConnection) graphql.Marshaler { - return ec._EscalationPolicyConnection(ctx, sel, &v) +func (ec *executionContext) unmarshalNExprIdentifier2githubᚗcomᚋexprᚑlangᚋexprᚋastᚐNode(ctx context.Context, v interface{}) (ast1.Node, error) { + res, err := UnmarshalExprIdentifier(v) + return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNEscalationPolicyConnection2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐEscalationPolicyConnection(ctx context.Context, sel ast.SelectionSet, v *EscalationPolicyConnection) graphql.Marshaler { +func (ec *executionContext) marshalNExprIdentifier2githubᚗcomᚋexprᚑlangᚋexprᚋastᚐNode(ctx context.Context, sel ast.SelectionSet, v ast1.Node) 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._EscalationPolicyConnection(ctx, sel, v) + res := MarshalExprIdentifier(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 } -func (ec *executionContext) marshalNEscalationPolicyStep2githubᚗcomᚋtargetᚋgoalertᚋescalationᚐStep(ctx context.Context, sel ast.SelectionSet, v escalation.Step) graphql.Marshaler { - return ec._EscalationPolicyStep(ctx, sel, &v) +func (ec *executionContext) unmarshalNExprOperator2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNEscalationPolicyStep2ᚕgithubᚗcomᚋtargetᚋgoalertᚋescalationᚐStepᚄ(ctx context.Context, sel ast.SelectionSet, v []escalation.Step) 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.marshalNEscalationPolicyStep2githubᚗcomᚋtargetᚋgoalertᚋescalationᚐStep(ctx, sel, v[i]) - } - if isLen1 { - f(i) - } else { - go f(i) +func (ec *executionContext) marshalNExprOperator2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(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") } - } - wg.Wait() + return res +} - for _, e := range ret { - if e == graphql.Null { - return graphql.Null +func (ec *executionContext) unmarshalNExprStringExpression2string(ctx context.Context, v interface{}) (string, error) { + res, err := UnmarshalExprStringExpression(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNExprStringExpression2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := MarshalExprStringExpression(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 +} - return ret +func (ec *executionContext) unmarshalNExprToConditionInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐExprToConditionInput(ctx context.Context, v interface{}) (ExprToConditionInput, error) { + res, err := ec.unmarshalInputExprToConditionInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNExprValue2githubᚗcomᚋexprᚑlangᚋexprᚋastᚐNode(ctx context.Context, v interface{}) (ast1.Node, error) { + res, err := UnmarshalExprValue(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNExprValue2githubᚗcomᚋexprᚑlangᚋexprᚋastᚐNode(ctx context.Context, sel ast.SelectionSet, v ast1.Node) 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 + } + res := MarshalExprValue(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 } func (ec *executionContext) marshalNFieldSearchConnection2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐFieldSearchConnection(ctx context.Context, sel ast.SelectionSet, v FieldSearchConnection) graphql.Marshaler { @@ -45049,6 +47578,73 @@ func (ec *executionContext) marshalNIntegrationKeyTypeInfo2ᚕgithubᚗcomᚋtar return ret } +func (ec *executionContext) marshalNKeyConfig2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐKeyConfig(ctx context.Context, sel ast.SelectionSet, v KeyConfig) graphql.Marshaler { + return ec._KeyConfig(ctx, sel, &v) +} + +func (ec *executionContext) marshalNKeyConfig2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐKeyConfig(ctx context.Context, sel ast.SelectionSet, v *KeyConfig) 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._KeyConfig(ctx, sel, v) +} + +func (ec *executionContext) marshalNKeyRule2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐKeyRule(ctx context.Context, sel ast.SelectionSet, v KeyRule) graphql.Marshaler { + return ec._KeyRule(ctx, sel, &v) +} + +func (ec *executionContext) marshalNKeyRule2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐKeyRuleᚄ(ctx context.Context, sel ast.SelectionSet, v []KeyRule) 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.marshalNKeyRule2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐKeyRule(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) unmarshalNKeyRuleInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐKeyRuleInput(ctx context.Context, v interface{}) (KeyRuleInput, error) { + res, err := ec.unmarshalInputKeyRuleInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) marshalNLabel2githubᚗcomᚋtargetᚋgoalertᚋlabelᚐLabel(ctx context.Context, sel ast.SelectionSet, v label.Label) graphql.Marshaler { return ec._Label(ctx, sel, &v) } @@ -46393,6 +48989,11 @@ func (ec *executionContext) unmarshalNUpdateHeartbeatMonitorInput2githubᚗcom return res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) unmarshalNUpdateKeyConfigInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐUpdateKeyConfigInput(ctx context.Context, v interface{}) (UpdateKeyConfigInput, error) { + res, err := ec.unmarshalInputUpdateKeyConfigInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) unmarshalNUpdateRotationInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐUpdateRotationInput(ctx context.Context, v interface{}) (UpdateRotationInput, error) { res, err := ec.unmarshalInputUpdateRotationInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) @@ -47032,6 +49633,26 @@ func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel a return res } +func (ec *executionContext) unmarshalOActionInput2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐActionInputᚄ(ctx context.Context, v interface{}) ([]ActionInput, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]ActionInput, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNActionInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐActionInput(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + func (ec *executionContext) marshalOAlert2ᚕgithubᚗcomᚋtargetᚋgoalertᚋalertᚐAlertᚄ(ctx context.Context, sel ast.SelectionSet, v []alert.Alert) graphql.Marshaler { if v == nil { return graphql.Null @@ -47744,6 +50365,26 @@ func (ec *executionContext) unmarshalOIntegrationKeySearchOptions2ᚖgithubᚗco return &res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) unmarshalOKeyRuleInput2ᚕgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐKeyRuleInputᚄ(ctx context.Context, v interface{}) ([]KeyRuleInput, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]KeyRuleInput, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNKeyRuleInput2githubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐKeyRuleInput(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + func (ec *executionContext) unmarshalOLabelKeySearchOptions2ᚖgithubᚗcomᚋtargetᚋgoalertᚋgraphql2ᚐLabelKeySearchOptions(ctx context.Context, v interface{}) (*LabelKeySearchOptions, error) { if v == nil { return nil, nil diff --git a/graphql2/gqlgen.yml b/graphql2/gqlgen.yml index c36f3c7ffa..0a96c78119 100644 --- a/graphql2/gqlgen.yml +++ b/graphql2/gqlgen.yml @@ -110,3 +110,13 @@ models: - github.com/target/goalert/schedule.RuleID MessageLogConnectionStats: model: github.com/target/goalert/notification.SearchOptions + ExprExpression: + model: github.com/target/goalert/graphql2.ExprExpression + ExprBooleanExpression: + model: github.com/target/goalert/graphql2.ExprBooleanExpression + ExprStringExpression: + model: github.com/target/goalert/graphql2.ExprStringExpression + ExprValue: + model: github.com/target/goalert/graphql2.ExprValue + ExprIdentifier: + model: github.com/target/goalert/graphql2.ExprIdentifier diff --git a/graphql2/graph/errorcodes.graphqls b/graphql2/graph/errorcodes.graphqls index 97e585ff83..618eb986db 100644 --- a/graphql2/graph/errorcodes.graphqls +++ b/graphql2/graph/errorcodes.graphqls @@ -19,4 +19,9 @@ enum ErrorCode { A separate error will be returned for each invalid field. """ INVALID_DEST_FIELD_VALUE + + """ + The expr expression is too complex to be converted to a Condition. + """ + EXPR_TOO_COMPLEX } diff --git a/graphql2/graph/expr.graphqls b/graphql2/graph/expr.graphqls new file mode 100644 index 0000000000..801152c7a6 --- /dev/null +++ b/graphql2/graph/expr.graphqls @@ -0,0 +1,96 @@ +extend type Query { + expr: Expr! @experimental(flagName: "univ-keys") +} + +""" +Expr contains helpers for working with Expr expressions. +""" +type Expr { + """ + exprToCondition converts an Expr expression to a Condition. + """ + exprToCondition(input: ExprToConditionInput!): Condition! + @goField(forceResolver: true) + + """ + conditionToExpr converts a Condition to an Expr expression. + """ + conditionToExpr(input: ConditionToExprInput!): String! + @goField(forceResolver: true) +} + +""" +ExprExpression is a scalar type that represents an Expr expression. +""" +scalar ExprExpression + +""" +ExprBooleanExpression is a scalar type that represents an Expr expression that evaluates to a boolean. +""" +scalar ExprBooleanExpression + +""" +ExprStringExpression is a scalar type that represents an Expr expression that evaluates to a string. +""" +scalar ExprStringExpression + +""" +ExprValue is a scalar type that represents an Expr value. +""" +scalar ExprValue + +""" +ExprIdentifier is a scalar type that represents an Expr identifier. +""" +scalar ExprIdentifier + +""" +ExprOperator is a scalar type that represents an Expr operator. +""" +scalar ExprOperator + +input ExprToConditionInput { + expr: ExprBooleanExpression! +} + +type Condition { + clauses: [Clause!]! +} + +type Clause { + field: ExprIdentifier! + operator: ExprOperator! + + """ + Value is a constant value that the field should be compared against. + """ + value: ExprValue! + + """ + Negate indicates whether the clause should be negated (e.g., not contains vs. contains). + """ + negate: Boolean! +} + +input ConditionToExprInput { + condition: ConditionInput! +} + +input ConditionInput { + clauses: [ClauseInput!]! +} + +input ClauseInput { + field: ExprIdentifier! + operator: ExprOperator! + + """ + Value is a constant value that the field should be compared against. + """ + value: ExprValue! + + """ + Negate indicates whether the clause should be negated (e.g., not contains vs. contains). + """ + negate: Boolean! +} diff --git a/graphql2/graph/univkeys.graphqls b/graphql2/graph/univkeys.graphqls new file mode 100644 index 0000000000..16283431d0 --- /dev/null +++ b/graphql2/graph/univkeys.graphqls @@ -0,0 +1,92 @@ +extend type IntegrationKey { + """ + config returns the configuration for the key. + """ + config: KeyConfig! @experimental(flagName: "univ-keys") +} + +extend type Mutation { + updateKeyConfig(input: UpdateKeyConfigInput!): Boolean! + @experimental(flagName: "univ-keys") +} + +type KeyConfig { + """ + Stop evaluating rules after the first rule that matches. + """ + stopAtFirstRule: Boolean! + + rules: [KeyRule!]! + + """ + defaultAction is the action to take if no rules match the request. + """ + defaultActions: [Action!]! +} + +type KeyRule { + id: ID! + + name: String! + description: String! + + """ + An expression that must evaluate to true for the rule to match. + """ + conditionExpr: ExprBooleanExpression! + + actions: [Action!]! +} + +input UpdateKeyConfigInput { + keyID: ID! + + """ + Stop evaluating rules after the first rule that matches. + """ + stopAtFirstRule: Boolean + + rules: [KeyRuleInput!] + + """ + defaultAction is the action to take if no rules match the request. + """ + defaultActions: [ActionInput!] +} + +input KeyRuleInput { + """ + The ID of an existing rule being updated. + """ + id: ID + + name: String! + description: String! + + """ + An expression that must evaluate to true for the rule to match. + """ + conditionExpr: ExprBooleanExpression! + + actions: [ActionInput!]! +} + +input ActionInput { + dest: DestinationInput! + params: [DynamicParamInput!]! +} + +type Action { + dest: Destination! + params: [DynamicParam!]! +} + +input DynamicParamInput { + paramID: ID! + expr: ExprStringExpression! +} + +type DynamicParam { + paramID: ID! + expr: ExprStringExpression! +} diff --git a/graphql2/graphqlapp/config.go b/graphql2/graphqlapp/config.go index 403d44f51f..8f6e02a177 100644 --- a/graphql2/graphqlapp/config.go +++ b/graphql2/graphqlapp/config.go @@ -4,19 +4,26 @@ import ( "context" "github.com/target/goalert/config" + "github.com/target/goalert/expflag" "github.com/target/goalert/graphql2" "github.com/target/goalert/permission" ) func (a *Query) IntegrationKeyTypes(ctx context.Context) ([]graphql2.IntegrationKeyTypeInfo, error) { cfg := config.FromContext(ctx) - return []graphql2.IntegrationKeyTypeInfo{ + typeInfo := []graphql2.IntegrationKeyTypeInfo{ {ID: "email", Name: "Email", Label: "Email Address", Enabled: cfg.EmailIngressEnabled()}, {ID: "generic", Name: "Generic API", Label: "Generic Webhook URL", Enabled: true}, {ID: "grafana", Name: "Grafana", Label: "Grafana Webhook URL", Enabled: true}, {ID: "site24x7", Name: "Site 24x7", Label: "Site24x7 Webhook URL", Enabled: true}, {ID: "prometheusAlertmanager", Label: "Alertmanager Webhook URL", Name: "Prometheus Alertmanager", Enabled: true}, - }, nil + } + + if expflag.ContextHas(ctx, expflag.UnivKeys) { + typeInfo = append(typeInfo, graphql2.IntegrationKeyTypeInfo{ID: "universal", Label: "Universal Integration Key URL", Name: "Universal Integration Key", Enabled: true}) + } + + return typeInfo, nil } func (q *Query) Config(ctx context.Context, all *bool) ([]graphql2.ConfigValue, error) { diff --git a/graphql2/graphqlapp/expr.go b/graphql2/graphqlapp/expr.go new file mode 100644 index 0000000000..69ccdf9893 --- /dev/null +++ b/graphql2/graphqlapp/expr.go @@ -0,0 +1,155 @@ +package graphqlapp + +import ( + "context" + "fmt" + "slices" + "strings" + + "github.com/99designs/gqlgen/graphql" + "github.com/expr-lang/expr/ast" + "github.com/expr-lang/expr/parser" + "github.com/pkg/errors" + "github.com/target/goalert/graphql2" + "github.com/target/goalert/validation" + "github.com/vektah/gqlparser/v2/gqlerror" +) + +type Expr App + +func (a *App) Expr() graphql2.ExprResolver { return (*Expr)(a) } +func (q *Query) Expr(context.Context) (*graphql2.Expr, error) { return &graphql2.Expr{}, nil } + +var errTooComplex = errors.New("expression is too complex") + +func gqlErrTooComplex(ctx context.Context) error { + return &gqlerror.Error{ + Message: errTooComplex.Error(), + Path: graphql.GetPath(ctx), + Extensions: map[string]interface{}{ + "code": graphql2.ErrorCodeExprTooComplex, + }, + } +} + +var supportedOperators = []string{"==", "!=", "<", ">", "<=", ">=", "in", "contains", "matches"} + +// getBinaryNode returns the binary node and whether it should be negated. +func getBinaryNode(n ast.Node) (node *ast.BinaryNode, negate bool) { + if un, ok := n.(*ast.UnaryNode); ok && un.Operator == "not" { + negate = true + node, _ = un.Node.(*ast.BinaryNode) + } else { + node, _ = n.(*ast.BinaryNode) + } + + return node, negate +} + +// exprToCondition converts an expression string to a Condition. +func exprToCondition(expr string) (*graphql2.Condition, error) { + tree, err := parser.Parse(expr) + if err != nil { + return nil, err + } + + top, topNegate := getBinaryNode(tree.Node) + if top == nil { + return nil, errTooComplex + } + + var clauses []graphql2.Clause + var handleBinary func(n *ast.BinaryNode, negate bool) error + handleBinary = func(n *ast.BinaryNode, negate bool) error { + if n.Operator == "and" || n.Operator == "&&" { // AND, process left hand side first, then right hand side + if negate { + // This would require inverting the remaining expression which + // would equal to an OR operation which is not supported. + return errTooComplex + } + + left, leftNegate := getBinaryNode(n.Left) + right, rightNegate := getBinaryNode(n.Right) + if left == nil || right == nil { + return errTooComplex + } + + if err := handleBinary(left, leftNegate); err != nil { + return err + } + if err := handleBinary(right, rightNegate); err != nil { + return err + } + return nil + } + + if !slices.Contains(supportedOperators, n.Operator) { + return errTooComplex + } + + if !graphql2.ExprIsID(n.Left) { + return errTooComplex + } + + if !graphql2.ExprIsLiteral(n.Right) { + return errTooComplex + } + + clauses = append(clauses, graphql2.Clause{ + Field: n.Left, + Operator: n.Operator, + Value: n.Right, + Negate: negate, + }) + + return nil + } + + if err := handleBinary(top, topNegate); err != nil { + return nil, err + } + + return &graphql2.Condition{ + Clauses: clauses, + }, nil +} + +func (e *Expr) ExprToCondition(ctx context.Context, _ *graphql2.Expr, input graphql2.ExprToConditionInput) (*graphql2.Condition, error) { + cond, err := exprToCondition(input.Expr) + if errors.Is(err, errTooComplex) { + return nil, gqlErrTooComplex(ctx) + } + if err != nil { + addInputError(ctx, validation.NewFieldError("input.expr", err.Error())) + return nil, errAlreadySet + } + + return cond, nil +} + +func clauseToExpr(path string, c graphql2.ClauseInput) (string, error) { + if !slices.Contains(supportedOperators, c.Operator) { + return "", validation.NewFieldError(path+".operator", "unsupported operator") + } + + var negateStr string + if c.Negate { + negateStr = "not " + } + return fmt.Sprintf("%s %s%s %s", c.Field.String(), negateStr, c.Operator, c.Value), nil +} + +func (e *Expr) ConditionToExpr(ctx context.Context, _ *graphql2.Expr, input graphql2.ConditionToExprInput) (string, error) { + var exprs []string + for i, c := range input.Condition.Clauses { + str, err := clauseToExpr(fmt.Sprintf("input.condition[%d]", i), c) + if err != nil { + addInputError(ctx, err) + return "", errAlreadySet + } + + exprs = append(exprs, str) + } + + return strings.Join(exprs, " and "), nil +} diff --git a/graphql2/graphqlapp/expr_test.go b/graphql2/graphqlapp/expr_test.go new file mode 100644 index 0000000000..7fafbb51a6 --- /dev/null +++ b/graphql2/graphqlapp/expr_test.go @@ -0,0 +1,94 @@ +package graphqlapp + +import ( + "testing" + + "github.com/expr-lang/expr/ast" + "github.com/expr-lang/expr/parser" + "github.com/stretchr/testify/require" + "github.com/target/goalert/graphql2" +) + +func TestExprToCondition(t *testing.T) { + check := func(desc, expr string, expected []graphql2.Clause) { + t.Helper() + + t.Run(desc, func(t *testing.T) { + t.Log("expr:", expr) + cond, err := exprToCondition(expr) + require.NoError(t, err) + require.NotNil(t, cond) + require.Len(t, cond.Clauses, len(expected)) + for i := range expected { + require.Equal(t, expected[i].Field.String(), cond.Clauses[i].Field.String(), "clause[%d].Field", i) + require.Equal(t, expected[i].Operator, cond.Clauses[i].Operator, "clause[%d].Operator", i) + require.Equal(t, expected[i].Value.String(), cond.Clauses[i].Value.String(), "clause[%d].Value", i) + require.Equal(t, expected[i].Negate, cond.Clauses[i].Negate, "clause[%d].Negate", i) + } + }) + } + expr := func(s string) ast.Node { + t.Helper() + + tree, err := parser.Parse(s) + require.NoError(t, err) + return tree.Node + } + + check("simple", "expr == true", []graphql2.Clause{ + {Field: expr("expr"), Operator: "==", Value: expr("true")}, + }) + + check("member", "expr[0].bar == true", []graphql2.Clause{ + {Field: expr("expr[0].bar"), Operator: "==", Value: expr("true")}, + }) + + check("string", "expr == \"true\"", []graphql2.Clause{ + {Field: expr("expr"), Operator: "==", Value: expr("\"true\"")}, + }) + check("multi", "expr == true && expr2 == 1 and expr contains \"yep\" and expr not contains 'asdf'", []graphql2.Clause{ + {Field: expr("expr"), Operator: "==", Value: expr("true")}, + {Field: expr("expr2"), Operator: "==", Value: expr("1")}, + {Field: expr("expr"), Operator: "contains", Value: expr("\"yep\"")}, + {Field: expr("expr"), Operator: "contains", Value: expr("\"asdf\""), Negate: true}, + }) + + check("one of", "expr in ['a', 'b', 'c'] and expr not in ['d']", []graphql2.Clause{ + {Field: expr("expr"), Operator: "in", Value: expr(`["a","b","c"]`)}, + {Field: expr("expr"), Operator: "in", Value: expr(`["d"]`), Negate: true}, + }) + + t.Run("too complex", func(t *testing.T) { + _, err := exprToCondition("1+1 == 2") + require.ErrorIs(t, err, errTooComplex) + }) + t.Run("invalid", func(t *testing.T) { + _, err := exprToCondition("1 + asd\"f") + require.Error(t, err) + }) +} + +func TestClauseToExpr(t *testing.T) { + check := func(desc string, clause graphql2.ClauseInput, expected string) { + t.Helper() + t.Run(desc, func(t *testing.T) { + t.Log("clause:", clause) + expr, err := clauseToExpr("", clause) + require.NoError(t, err) + require.Equal(t, expected, expr) + }) + } + expr := func(s string) ast.Node { + t.Helper() + + tree, err := parser.Parse(s) + require.NoError(t, err) + return tree.Node + } + + check("simple", graphql2.ClauseInput{Field: expr("foo"), Operator: "==", Value: expr("true")}, "foo == true") + check("string", graphql2.ClauseInput{Field: expr("foo"), Operator: "==", Value: expr("\"true\"")}, "foo == \"true\"") + check("array", graphql2.ClauseInput{Field: expr("foo"), Operator: "in", Value: expr(`["a","b","c"]`)}, `foo in ["a", "b", "c"]`) + check("contains", graphql2.ClauseInput{Field: expr("foo"), Operator: "contains", Value: expr("\"asdf\"")}, `foo contains "asdf"`) + check("not contains", graphql2.ClauseInput{Field: expr("foo"), Operator: "contains", Value: expr("\"asdf\""), Negate: true}, `foo not contains "asdf"`) +} diff --git a/graphql2/graphqlapp/integrationkey.go b/graphql2/graphqlapp/integrationkey.go index 2213569002..7d71ff65e5 100644 --- a/graphql2/graphqlapp/integrationkey.go +++ b/graphql2/graphqlapp/integrationkey.go @@ -5,10 +5,12 @@ import ( "database/sql" "net/url" + "github.com/google/uuid" "github.com/target/goalert/config" "github.com/target/goalert/graphql2" "github.com/target/goalert/integrationkey" "github.com/target/goalert/search" + "github.com/target/goalert/validation/validate" ) type IntegrationKey App @@ -18,6 +20,58 @@ func (a *App) IntegrationKey() graphql2.IntegrationKeyResolver { return (*Integr func (q *Query) IntegrationKey(ctx context.Context, id string) (*integrationkey.IntegrationKey, error) { return q.IntKeyStore.FindOne(ctx, id) } + +func (m *Mutation) UpdateKeyConfig(ctx context.Context, input graphql2.UpdateKeyConfigInput) (bool, error) { + err := withContextTx(ctx, m.DB, func(ctx context.Context, tx *sql.Tx) error { + id, err := validate.ParseUUID("IntegrationKey.ID", input.KeyID) + if err != nil { + return err + } + + cfg, err := m.IntKeyStore.Config(ctx, tx, id) + if err != nil { + return err + } + + if input.StopAtFirstRule != nil { + cfg.StopAfterFirstMatchingRule = *input.StopAtFirstRule + } + + if input.Rules != nil { + cfg.Rules = make([]integrationkey.Rule, 0, len(input.Rules)) + for _, r := range input.Rules { + var ruleID uuid.UUID + if r.ID != nil { + ruleID, err = validate.ParseUUID("Rule.ID", *r.ID) + if err != nil { + return err + } + } + + cfg.Rules = append(cfg.Rules, integrationkey.Rule{ + ID: ruleID, + Name: r.Name, + Description: r.Description, + ConditionExpr: r.ConditionExpr, + Actions: actionsGQLToGo(r.Actions), + }) + } + } + + if input.DefaultActions != nil { + cfg.DefaultActions = actionsGQLToGo(input.DefaultActions) + } + + err = m.IntKeyStore.SetConfig(ctx, tx, id, cfg) + return err + }) + if err != nil { + return false, err + } + + return true, nil +} + func (m *Mutation) CreateIntegrationKey(ctx context.Context, input graphql2.CreateIntegrationKeyInput) (key *integrationkey.IntegrationKey, err error) { var serviceID string if input.ServiceID != nil { @@ -37,9 +91,101 @@ func (m *Mutation) CreateIntegrationKey(ctx context.Context, input graphql2.Crea }) return key, err } + +func (key *IntegrationKey) Config(ctx context.Context, raw *integrationkey.IntegrationKey) (*graphql2.KeyConfig, error) { + id, err := validate.ParseUUID("IntegrationKey.ID", raw.ID) + if err != nil { + return nil, err + } + + cfg, err := key.IntKeyStore.Config(ctx, key.DB, id) + if err != nil { + return nil, err + } + + var rules []graphql2.KeyRule + for _, r := range cfg.Rules { + rules = append(rules, graphql2.KeyRule{ + ID: r.ID.String(), + Name: r.Name, + Description: r.Description, + ConditionExpr: r.ConditionExpr, + Actions: actionsGoToGQL(r.Actions), + }) + } + + return &graphql2.KeyConfig{ + StopAtFirstRule: cfg.StopAfterFirstMatchingRule, + Rules: rules, + DefaultActions: actionsGoToGQL(cfg.DefaultActions), + }, nil +} + +func actionsGQLToGo(a []graphql2.ActionInput) []integrationkey.Action { + res := make([]integrationkey.Action, 0, len(a)) + for _, v := range a { + res = append(res, integrationkey.Action{ + Type: v.Dest.Type, + StaticParams: fviToMap(v.Dest.Values), + DynamicParams: paramInputToMap(v.Params), + }) + } + return res +} + +func actionsGoToGQL(a []integrationkey.Action) []graphql2.Action { + res := make([]graphql2.Action, 0, len(a)) + for _, v := range a { + res = append(res, graphql2.Action{ + Dest: &graphql2.Destination{Type: v.Type, Values: mapToFieldValue(v.StaticParams)}, + Params: mapToParams(v.DynamicParams), + }) + } + return res +} + +func fviToMap(f []graphql2.FieldValueInput) map[string]string { + res := make(map[string]string, len(f)) + for _, v := range f { + res[v.FieldID] = v.Value + } + return res +} + +func paramInputToMap(p []graphql2.DynamicParamInput) map[string]string { + res := make(map[string]string, len(p)) + for _, v := range p { + res[v.ParamID] = v.Expr + } + return res +} + +func mapToFieldValue(m map[string]string) []graphql2.FieldValuePair { + res := make([]graphql2.FieldValuePair, 0, len(m)) + for k, v := range m { + res = append(res, graphql2.FieldValuePair{ + FieldID: k, + Value: v, + }) + } + return res +} + +func mapToParams(m map[string]string) []graphql2.DynamicParam { + res := make([]graphql2.DynamicParam, 0, len(m)) + for k, v := range m { + res = append(res, graphql2.DynamicParam{ + ParamID: k, + Expr: v, + }) + } + return res +} + func (key *IntegrationKey) Type(ctx context.Context, raw *integrationkey.IntegrationKey) (graphql2.IntegrationKeyType, error) { return graphql2.IntegrationKeyType(raw.Type), nil } + func (key *IntegrationKey) Href(ctx context.Context, raw *integrationkey.IntegrationKey) (string, error) { cfg := config.FromContext(ctx) q := make(url.Values) diff --git a/graphql2/models_gen.go b/graphql2/models_gen.go index ac2445f454..d316faba6c 100644 --- a/graphql2/models_gen.go +++ b/graphql2/models_gen.go @@ -8,6 +8,7 @@ import ( "strconv" "time" + ast1 "github.com/expr-lang/expr/ast" "github.com/target/goalert/alert" "github.com/target/goalert/alert/alertlog" "github.com/target/goalert/assignment" @@ -31,6 +32,16 @@ type InlineDisplayInfo interface { IsInlineDisplayInfo() } +type Action struct { + Dest *Destination `json:"dest"` + Params []DynamicParam `json:"params"` +} + +type ActionInput struct { + Dest *DestinationInput `json:"dest"` + Params []DynamicParamInput `json:"params"` +} + type AlertConnection struct { Nodes []alert.Alert `json:"nodes"` PageInfo *PageInfo `json:"pageInfo"` @@ -100,6 +111,24 @@ type CalcRotationHandoffTimesInput struct { Count int `json:"count"` } +type Clause struct { + Field ast1.Node `json:"field"` + Operator string `json:"operator"` + // Value is a constant value that the field should be compared against. + Value ast1.Node `json:"value"` + // Negate indicates whether the clause should be negated (e.g., not contains vs. contains). + Negate bool `json:"negate"` +} + +type ClauseInput struct { + Field ast1.Node `json:"field"` + Operator string `json:"operator"` + // Value is a constant value that the field should be compared against. + Value ast1.Node `json:"value"` + // Negate indicates whether the clause should be negated (e.g., not contains vs. contains). + Negate bool `json:"negate"` +} + type ClearTemporarySchedulesInput struct { ScheduleID string `json:"scheduleID"` Start time.Time `json:"start"` @@ -113,6 +142,18 @@ type CloseMatchingAlertInput struct { Dedup *string `json:"dedup,omitempty"` } +type Condition struct { + Clauses []Clause `json:"clauses"` +} + +type ConditionInput struct { + Clauses []ClauseInput `json:"clauses"` +} + +type ConditionToExprInput struct { + Condition *ConditionInput `json:"condition"` +} + type ConfigHint struct { ID string `json:"id"` Value string `json:"value"` @@ -417,6 +458,16 @@ type DestinationTypeInfo struct { StatusUpdatesRequired bool `json:"statusUpdatesRequired"` } +type DynamicParam struct { + ParamID string `json:"paramID"` + Expr string `json:"expr"` +} + +type DynamicParamInput struct { + ParamID string `json:"paramID"` + Expr string `json:"expr"` +} + type EscalationPolicyConnection struct { Nodes []escalation.Policy `json:"nodes"` PageInfo *PageInfo `json:"pageInfo"` @@ -431,6 +482,18 @@ type EscalationPolicySearchOptions struct { FavoritesFirst *bool `json:"favoritesFirst,omitempty"` } +// Expr contains helpers for working with Expr expressions. +type Expr struct { + // exprToCondition converts an Expr expression to a Condition. + ExprToCondition *Condition `json:"exprToCondition"` + // conditionToExpr converts a Condition to an Expr expression. + ConditionToExpr string `json:"conditionToExpr"` +} + +type ExprToConditionInput struct { + Expr string `json:"expr"` +} + // FieldSearchConnection is a connection to a list of FieldSearchResult. type FieldSearchConnection struct { Nodes []FieldSearchResult `json:"nodes"` @@ -500,6 +563,33 @@ type IntegrationKeyTypeInfo struct { Enabled bool `json:"enabled"` } +type KeyConfig struct { + // Stop evaluating rules after the first rule that matches. + StopAtFirstRule bool `json:"stopAtFirstRule"` + Rules []KeyRule `json:"rules"` + // defaultAction is the action to take if no rules match the request. + DefaultActions []Action `json:"defaultActions"` +} + +type KeyRule struct { + ID string `json:"id"` + Name string `json:"name"` + Description string `json:"description"` + // An expression that must evaluate to true for the rule to match. + ConditionExpr string `json:"conditionExpr"` + Actions []Action `json:"actions"` +} + +type KeyRuleInput struct { + // The ID of an existing rule being updated. + ID *string `json:"id,omitempty"` + Name string `json:"name"` + Description string `json:"description"` + // An expression that must evaluate to true for the rule to match. + ConditionExpr string `json:"conditionExpr"` + Actions []ActionInput `json:"actions"` +} + type LabelConnection struct { Nodes []label.Label `json:"nodes"` PageInfo *PageInfo `json:"pageInfo"` @@ -810,6 +900,15 @@ type UpdateHeartbeatMonitorInput struct { AdditionalDetails *string `json:"additionalDetails,omitempty"` } +type UpdateKeyConfigInput struct { + KeyID string `json:"keyID"` + // Stop evaluating rules after the first rule that matches. + StopAtFirstRule *bool `json:"stopAtFirstRule,omitempty"` + Rules []KeyRuleInput `json:"rules,omitempty"` + // defaultAction is the action to take if no rules match the request. + DefaultActions []ActionInput `json:"defaultActions,omitempty"` +} + type UpdateRotationInput struct { ID string `json:"id"` Name *string `json:"name,omitempty"` @@ -1062,16 +1161,19 @@ const ( // // A separate error will be returned for each invalid field. ErrorCodeInvalidDestFieldValue ErrorCode = "INVALID_DEST_FIELD_VALUE" + // The expr expression is too complex to be converted to a Condition. + ErrorCodeExprTooComplex ErrorCode = "EXPR_TOO_COMPLEX" ) var AllErrorCode = []ErrorCode{ ErrorCodeInvalidInputValue, ErrorCodeInvalidDestFieldValue, + ErrorCodeExprTooComplex, } func (e ErrorCode) IsValid() bool { switch e { - case ErrorCodeInvalidInputValue, ErrorCodeInvalidDestFieldValue: + case ErrorCodeInvalidInputValue, ErrorCodeInvalidDestFieldValue, ErrorCodeExprTooComplex: return true } return false @@ -1106,6 +1208,7 @@ const ( IntegrationKeyTypeSite24x7 IntegrationKeyType = "site24x7" IntegrationKeyTypePrometheusAlertmanager IntegrationKeyType = "prometheusAlertmanager" IntegrationKeyTypeEmail IntegrationKeyType = "email" + IntegrationKeyTypeUniversal IntegrationKeyType = "universal" ) var AllIntegrationKeyType = []IntegrationKeyType{ @@ -1114,11 +1217,12 @@ var AllIntegrationKeyType = []IntegrationKeyType{ IntegrationKeyTypeSite24x7, IntegrationKeyTypePrometheusAlertmanager, IntegrationKeyTypeEmail, + IntegrationKeyTypeUniversal, } func (e IntegrationKeyType) IsValid() bool { switch e { - case IntegrationKeyTypeGeneric, IntegrationKeyTypeGrafana, IntegrationKeyTypeSite24x7, IntegrationKeyTypePrometheusAlertmanager, IntegrationKeyTypeEmail: + case IntegrationKeyTypeGeneric, IntegrationKeyTypeGrafana, IntegrationKeyTypeSite24x7, IntegrationKeyTypePrometheusAlertmanager, IntegrationKeyTypeEmail, IntegrationKeyTypeUniversal: return true } return false diff --git a/graphql2/schema.graphql b/graphql2/schema.graphql index 284f92fab7..8203cb8a03 100644 --- a/graphql2/schema.graphql +++ b/graphql2/schema.graphql @@ -1062,6 +1062,7 @@ enum IntegrationKeyType { site24x7 prometheusAlertmanager email + universal } type ServiceOnCallUser { diff --git a/integrationkey/config.go b/integrationkey/config.go new file mode 100644 index 0000000000..f7cb443809 --- /dev/null +++ b/integrationkey/config.go @@ -0,0 +1,119 @@ +package integrationkey + +import ( + "context" + "database/sql" + "encoding/json" + "errors" + "fmt" + + "github.com/google/uuid" + "github.com/target/goalert/gadb" + "github.com/target/goalert/permission" + "github.com/target/goalert/validation" +) + +type dbConfig struct { + Version int // should be 1 + V1 Config +} + +// Config stores the configuration for an integration key for how to handle incoming requests. +type Config struct { + Rules []Rule + + // DefaultActions are the actions to take if no rules match. + DefaultActions []Action + + StopAfterFirstMatchingRule bool +} + +// A Rule is a set of conditions and actions to take if those conditions are met. +type Rule struct { + ID uuid.UUID + Name string + Description string + ConditionExpr string + Actions []Action +} + +// An Action is a single action to take if a rule matches. +type Action struct { + // Type is the type of action to perform, like slack, email, or alert. + Type string + + // StaticParams are parameters that are always the same for this action (e.g., the channel ID). + StaticParams map[string]string + + // DynamicParams are parameters that are determined at runtime (e.g., the message to send). + // The keys are the parameter names, and the values are the Expr expression strings. + DynamicParams map[string]string +} + +func (s *Store) Config(ctx context.Context, db gadb.DBTX, keyID uuid.UUID) (*Config, error) { + err := permission.LimitCheckAny(ctx, permission.User) + if err != nil { + return nil, err + } + + data, err := gadb.New(db).IntKeyGetConfig(ctx, keyID) + if errors.Is(err, sql.ErrNoRows) { + return &Config{}, nil + } + if err != nil { + return nil, err + } + + var cfg dbConfig + err = json.Unmarshal(data, &cfg) + if err != nil { + return nil, fmt.Errorf("unmarshal config: %w", err) + } + if cfg.Version != 1 { + return nil, fmt.Errorf("unsupported config version: %d", cfg.Version) + } + + return &cfg.V1, nil +} + +func (s *Store) SetConfig(ctx context.Context, db gadb.DBTX, keyID uuid.UUID, cfg *Config) error { + err := permission.LimitCheckAny(ctx, permission.User) + if err != nil { + return err + } + + gdb := gadb.New(db) + keyType, err := gdb.IntKeyGetType(ctx, keyID) + if err != nil { + return err + } + if keyType != gadb.EnumIntegrationKeysTypeUniversal { + return validation.NewGenericError("config only supported for universal keys") + } + + if cfg == nil { + return gdb.IntKeyDeleteConfig(ctx, keyID) + } + + // ensure all rule IDs are set + for i := range cfg.Rules { + if cfg.Rules[i].ID == uuid.Nil { + cfg.Rules[i].ID = uuid.New() + } + } + + data, err := json.Marshal(dbConfig{Version: 1, V1: *cfg}) + if err != nil { + return fmt.Errorf("marshal config: %w", err) + } + + err = gadb.New(db).IntKeySetConfig(ctx, gadb.IntKeySetConfigParams{ + ID: keyID, + Config: data, + }) + if err != nil { + return err + } + + return nil +} diff --git a/integrationkey/integrationkey.go b/integrationkey/integrationkey.go index 13ea122788..0957f63daf 100644 --- a/integrationkey/integrationkey.go +++ b/integrationkey/integrationkey.go @@ -17,7 +17,7 @@ func (i IntegrationKey) Normalize() (*IntegrationKey, error) { err := validate.Many( validate.IDName("Name", i.Name), validate.UUID("ServiceID", i.ServiceID), - validate.OneOf("Type", i.Type, TypeGrafana, TypeSite24x7, TypePrometheusAlertmanager, TypeGeneric, TypeEmail), + validate.OneOf("Type", i.Type, TypeGrafana, TypeSite24x7, TypePrometheusAlertmanager, TypeGeneric, TypeEmail, TypeUniversal), validate.ASCII("ExternalSystemName", i.ExternalSystemName, 0, 255), ) if err != nil { diff --git a/integrationkey/queries.sql b/integrationkey/queries.sql index e39cbe1e76..6d1d3f3d6c 100644 --- a/integrationkey/queries.sql +++ b/integrationkey/queries.sql @@ -39,3 +39,31 @@ WHERE DELETE FROM integration_keys WHERE id = ANY (@ids::uuid[]); +-- name: IntKeyGetConfig :one +SELECT + config +FROM + uik_config +WHERE + id = $1 +FOR UPDATE; + +-- name: IntKeySetConfig :exec +INSERT INTO uik_config(id, config) + VALUES ($1, $2) +ON CONFLICT (id) + DO UPDATE SET + config = $2; + +-- name: IntKeyDeleteConfig :exec +DELETE FROM uik_config +WHERE id = $1; + +-- name: IntKeyGetType :one +SELECT + type +FROM + integration_keys +WHERE + id = $1; + diff --git a/integrationkey/store.go b/integrationkey/store.go index 8ee2908d03..dcd0b532af 100644 --- a/integrationkey/store.go +++ b/integrationkey/store.go @@ -5,8 +5,10 @@ import ( "database/sql" "github.com/target/goalert/auth/authtoken" + "github.com/target/goalert/expflag" "github.com/target/goalert/gadb" "github.com/target/goalert/permission" + "github.com/target/goalert/validation" "github.com/target/goalert/validation/validate" "github.com/google/uuid" @@ -44,7 +46,7 @@ func (s *Store) GetServiceID(ctx context.Context, id string, t Type) (string, er keyUUID, err := validate.ParseUUID("IntegrationKeyID", id) err = validate.Many( err, - validate.OneOf("IntegrationType", t, TypeGrafana, TypeSite24x7, TypePrometheusAlertmanager, TypeGeneric, TypeEmail), + validate.OneOf("IntegrationType", t, TypeGrafana, TypeSite24x7, TypePrometheusAlertmanager, TypeGeneric, TypeEmail, TypeUniversal), ) if err != nil { return "", err @@ -80,6 +82,10 @@ func (s *Store) Create(ctx context.Context, dbtx gadb.DBTX, i *IntegrationKey) ( return nil, err } + if i.Type == TypeUniversal && !expflag.ContextHas(ctx, expflag.UnivKeys) { + return nil, validation.NewGenericError("experimental flag not enabled") + } + serviceUUID, err := uuid.Parse(n.ServiceID) if err != nil { return nil, err diff --git a/integrationkey/type.go b/integrationkey/type.go index ffa6c35f00..741833c6ea 100644 --- a/integrationkey/type.go +++ b/integrationkey/type.go @@ -15,6 +15,7 @@ const ( TypePrometheusAlertmanager Type = "prometheusAlertmanager" TypeGeneric Type = "generic" TypeEmail Type = "email" + TypeUniversal Type = "universal" ) func (s Type) Value() (driver.Value, error) { diff --git a/migrate/migrations/20240502114803-universal-integration-key.sql b/migrate/migrations/20240502114803-universal-integration-key.sql new file mode 100644 index 0000000000..a99e5d0de2 --- /dev/null +++ b/migrate/migrations/20240502114803-universal-integration-key.sql @@ -0,0 +1,8 @@ +-- +migrate Up notransaction +ALTER TYPE enum_integration_keys_type + ADD VALUE IF NOT EXISTS 'universal'; + +ALTER TYPE enum_alert_source + ADD VALUE IF NOT EXISTS 'universal'; + +-- +migrate Down diff --git a/migrate/migrations/20240503155449-uik-config.sql b/migrate/migrations/20240503155449-uik-config.sql new file mode 100644 index 0000000000..78878c188a --- /dev/null +++ b/migrate/migrations/20240503155449-uik-config.sql @@ -0,0 +1,9 @@ +-- +migrate Up +CREATE TABLE uik_config( + id uuid PRIMARY KEY REFERENCES integration_keys(id) ON DELETE CASCADE, + config jsonb NOT NULL +); + +-- +migrate Down +DROP TABLE uik_config; + diff --git a/migrate/schema.sql b/migrate/schema.sql index 06c1c5dcd1..94c5579f8b 100644 --- a/migrate/schema.sql +++ b/migrate/schema.sql @@ -1,7 +1,7 @@ -- This file is auto-generated by "make db-schema"; DO NOT EDIT --- DATA=75b49324476222eb037d3cba6e07d309090a82b93508ac3e72d9908279657a33 - --- DISK=e74e9237489fd549f592dca04bb8781e83c9923a5d594b24709b6496990b385a - --- PSQL=e74e9237489fd549f592dca04bb8781e83c9923a5d594b24709b6496990b385a - +-- DATA=25ff5d48c560608b1e4e3761b99ba1994a8d11aa721e8d88f43858d179e90196 - +-- DISK=b6cce12f3c845f8b025e22f161830579d11aa44aefaea8535418d18ebed1e557 - +-- PSQL=b6cce12f3c845f8b025e22f161830579d11aa44aefaea8535418d18ebed1e557 - -- -- pgdump-lite database dump -- @@ -55,7 +55,8 @@ CREATE TYPE enum_alert_source AS ENUM ( 'grafana', 'manual', 'prometheusAlertmanager', - 'site24x7' + 'site24x7', + 'universal' ); CREATE TYPE enum_alert_status AS ENUM ( @@ -75,7 +76,8 @@ CREATE TYPE enum_integration_keys_type AS ENUM ( 'generic', 'grafana', 'prometheusAlertmanager', - 'site24x7' + 'site24x7', + 'universal' ); CREATE TYPE enum_limit_type AS ENUM ( @@ -2061,6 +2063,16 @@ CREATE INDEX twilio_voice_errors_phone_number_outgoing_occurred_at_idx ON public CREATE UNIQUE INDEX twilio_voice_errors_uniq_id ON public.twilio_voice_errors USING btree (id); +CREATE TABLE uik_config ( + config jsonb NOT NULL, + id uuid NOT NULL, + CONSTRAINT uik_config_id_fkey FOREIGN KEY (id) REFERENCES integration_keys(id) ON DELETE CASCADE, + CONSTRAINT uik_config_pkey PRIMARY KEY (id) +); + +CREATE UNIQUE INDEX uik_config_pkey ON public.uik_config USING btree (id); + + CREATE TABLE user_calendar_subscriptions ( config jsonb NOT NULL, created_at timestamp with time zone DEFAULT now() NOT NULL, diff --git a/package.json b/package.json index 7aa5f69b32..1b0f9b3f5e 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ ] }, "devDependencies": { - "@apollo/client": "3.9.5", + "@apollo/client": "3.10.1", "@babel/core": "7.24.0", "@babel/plugin-transform-modules-commonjs": "7.23.3", "@dnd-kit/core": "6.0.8", @@ -62,7 +62,7 @@ "@types/diff": "5.0.8", "@types/glob": "8.1.0", "@types/jest": "29.5.12", - "@types/lodash": "4.14.202", + "@types/lodash": "4.17.1", "@types/luxon": "3.4.2", "@types/node": "20.11.30", "@types/prop-types": "15.7.11", @@ -92,13 +92,13 @@ "eslint-plugin-jsx-a11y": "6.8.0", "eslint-plugin-n": "16.6.2", "eslint-plugin-node": "11.1.0", - "eslint-plugin-prettier": "5.0.0", + "eslint-plugin-prettier": "5.1.3", "eslint-plugin-promise": "6.1.1", "eslint-plugin-react": "7.34.1", - "eslint-plugin-react-hooks": "4.6.0", + "eslint-plugin-react-hooks": "4.6.2", "eslint-plugin-storybook": "0.8.0", "fuse.js": "7.0.0", - "glob": "10.3.10", + "glob": "10.3.14", "graphiql": "3.0.10", "graphql": "16.8.1", "http-server": "14.1.1", @@ -107,7 +107,7 @@ "luxon": "3.4.4", "mdast-util-find-and-replace": "3.0.1", "mdi-material-ui": "7.8.0", - "msw": "2.0.11", + "msw": "2.3.0", "msw-storybook-addon": "2.0.0--canary.122.06f0c92.0", "prettier": "3.2.5", "prettier-plugin-go-template": "0.0.15", @@ -124,7 +124,7 @@ "react-markdown": "9.0.1", "react-redux": "8.1.3", "react-transition-group": "4.4.5", - "react-virtualized-auto-sizer": "1.0.20", + "react-virtualized-auto-sizer": "1.0.24", "recharts": "2.9.2", "redux": "4.2.1", "redux-devtools-extension": "2.13.9", @@ -132,10 +132,10 @@ "remark-breaks": "4.0.0", "remark-gfm": "4.0.0", "semver": "7.6.0", - "storybook": "8.0.0", + "storybook": "8.0.9", "storybook-addon-mock": "4.3.0", "stylelint": "16.2.1", - "stylelint-config-standard": "34.0.0", + "stylelint-config-standard": "36.0.0", "typescript": "5.2.2", "urql": "4.0.6", "vite": "5.1.7", diff --git a/pkg/sysapi/sysapi.pb.go b/pkg/sysapi/sysapi.pb.go index d1b5ed11f0..cf01595653 100644 --- a/pkg/sysapi/sysapi.pb.go +++ b/pkg/sysapi/sysapi.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.34.1 // protoc v5.26.0 // source: pkg/sysapi/sysapi.proto diff --git a/test/integration/schedules.spec.ts b/test/integration/schedules.spec.ts index 4a1533c3ab..76b3e16e30 100644 --- a/test/integration/schedules.spec.ts +++ b/test/integration/schedules.spec.ts @@ -28,7 +28,7 @@ test.afterEach(async ({ page }) => { await page.click('button:has-text("Confirm")') }) -test('local time hover', async ({ page, isMobile }) => { +test('local time hover', async ({ page }) => { // change schedule tz to Europe/Amsterdam await page.click('[aria-label="Edit"]') await page.fill('input[name=time-zone]', 'Europe/Amsterdam') @@ -37,31 +37,6 @@ test('local time hover', async ({ page, isMobile }) => { await page.goto(`${baseURL}/schedules/${scheduleID}/shifts`) - // add user override - if (!isMobile) { - await page.click('button:has-text("Create Override")') - await page.keyboard.press('Tab') - await page.keyboard.press('ArrowDown') - await page.keyboard.press('ArrowDown') - await page.keyboard.press('Enter') - } else { - await page.click('[data-testid="AddIcon"]') - await page.keyboard.press('Tab') - await page.keyboard.press('Tab') - await page.keyboard.press('ArrowDown') - await page.keyboard.press('ArrowDown') - await page.keyboard.press('Enter') - } - - // should display schedule timezone in form - await expect(page.locator('form[id=dialog-form]')).toContainText( - 'Times shown in schedule timezone (Europe/Amsterdam)', - ) - await page.locator('input[name=addUserID]').fill('Admin McIntegrationFace') - - await page.click('li:has-text("Admin McIntegrationFace")') - await page.locator('button[type=submit]').click() - // should display schedule tz on hover await page.hover(`[data-testid="shift-details"]`) await expect(page.locator('[data-testid="shift-tooltip"]')).toContainText( diff --git a/test/smoke/harness/harness.go b/test/smoke/harness/harness.go index 5ca8d6f940..d264de8b4f 100644 --- a/test/smoke/harness/harness.go +++ b/test/smoke/harness/harness.go @@ -22,7 +22,6 @@ import ( "github.com/google/uuid" "github.com/jackc/pgx/v5" - pgx5 "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/stdlib" "github.com/pkg/errors" "github.com/stretchr/testify/assert" @@ -553,7 +552,7 @@ func (h *Harness) dumpDB() { h.t.Fatalf("failed to create abs dump path: %v", err) } - conn, err := pgx5.Connect(context.Background(), h.dbURL) + conn, err := pgx.Connect(context.Background(), h.dbURL) if err != nil { h.t.Fatalf("failed to get db connection: %v", err) } diff --git a/web/src/app/admin/admin-service-metrics/AdminServiceFilter.tsx b/web/src/app/admin/admin-service-metrics/AdminServiceFilter.tsx index a64d706e8b..78a5c024a0 100644 --- a/web/src/app/admin/admin-service-metrics/AdminServiceFilter.tsx +++ b/web/src/app/admin/admin-service-metrics/AdminServiceFilter.tsx @@ -20,6 +20,7 @@ import { } from '@mui/material' import { LabelKeySelect } from '../../selection' import { LabelValueSelect } from '../../selection/LabelValueSelect' +import { useFeatures } from '../../util/RequireConfig' function AdminServiceFilter(): JSX.Element { const [open, setOpen] = useState(false) @@ -37,6 +38,7 @@ function AdminServiceFilter(): JSX.Element { 'labelKey', 'labelValue', ) + const intKeyTypes = useFeatures().integrationKeyTypes.map((t) => t.id) const removeFilter = (filterName: string): void => { if (filterName === 'labelKey') { @@ -133,13 +135,7 @@ function AdminServiceFilter(): JSX.Element { multiple fullWidth id='int-key-targets' - options={[ - 'generic', - 'grafana', - 'site24x7', - 'prometheusAlertmanager', - 'email', - ]} + options={intKeyTypes} value={params.intKeyTgts} onChange={(_, value) => setParams({ ...params, intKeyTgts: value }) diff --git a/web/src/app/escalation-policies/PolicyCreateDialog.tsx b/web/src/app/escalation-policies/PolicyCreateDialog.tsx index 538cd71f7e..9732615893 100644 --- a/web/src/app/escalation-policies/PolicyCreateDialog.tsx +++ b/web/src/app/escalation-policies/PolicyCreateDialog.tsx @@ -1,5 +1,5 @@ import React, { useState } from 'react' -import { gql, useMutation } from '@apollo/client' +import { gql, useMutation } from 'urql' import { fieldErrors, nonFieldErrors } from '../util/errutil' import FormDialog from '../dialogs/FormDialog' import PolicyForm, { PolicyFormValue } from './PolicyForm' @@ -21,18 +21,9 @@ function PolicyCreateDialog(props: { onClose: () => void }): JSX.Element { favorite: true, } const [value, setValue] = useState(defaultValue) - const [createPolicy, createPolicyStatus] = useMutation(mutation, { - variables: { - input: { - name: value && value.name, - description: value && value.description, - repeat: value && value.repeat.value, - favorite: true, - }, - }, - }) + const [createPolicyStatus, createPolicy] = useMutation(mutation) - const { loading, data, error } = createPolicyStatus + const { fetching, data, error } = createPolicyStatus if (data && data.createEscalationPolicy) { return ( @@ -45,14 +36,26 @@ function PolicyCreateDialog(props: { onClose: () => void }): JSX.Element { return ( createPolicy()} + onSubmit={() => + createPolicy( + { + input: { + name: value && value.name, + description: value && value.description, + repeat: value && value.repeat.value, + favorite: true, + }, + }, + { additionalTypenames: ['EscalationPolicyConnection'] }, + ) + } form={ setValue(value)} /> diff --git a/web/src/app/escalation-policies/PolicyList.tsx b/web/src/app/escalation-policies/PolicyList.tsx index 89aecf09dd..055369c1fe 100644 --- a/web/src/app/escalation-policies/PolicyList.tsx +++ b/web/src/app/escalation-policies/PolicyList.tsx @@ -1,11 +1,16 @@ -import React from 'react' -import { gql } from 'urql' -import QueryList from '../lists/QueryList' +import React, { Suspense, useState } from 'react' +import { gql, useQuery } from 'urql' import PolicyCreateDialog from './PolicyCreateDialog' +import Search from '../util/Search' +import FlatList from '../lists/FlatList' +import { FavoriteIcon } from '../util/SetFavoriteButton' +import ListPageControls from '../lists/ListPageControls' +import { useURLParam } from '../actions' +import { EscalationPolicyConnection } from '../../schema' const query = gql` query epsQuery($input: EscalationPolicySearchOptions) { - data: escalationPolicies(input: $input) { + escalationPolicies(input: $input) { nodes { id name @@ -20,19 +25,62 @@ const query = gql` } ` +const context = { suspense: false } export default function PolicyList(): JSX.Element { + const [search] = useURLParam('search', '') + const [create, setCreate] = useState(false) + const [cursor, setCursor] = useState('') + + const inputVars = { + favoritesFirst: true, + search, + after: cursor, + } + + const [q] = useQuery<{ escalationPolicies: EscalationPolicyConnection }>({ + query, + variables: { input: inputVars }, + context, + }) + const nextCursor = q.data?.escalationPolicies.pageInfo.hasNextPage + ? q.data?.escalationPolicies.pageInfo.endCursor + : '' + // cache the next page + useQuery({ + query, + variables: { input: { ...inputVars, after: nextCursor } }, + context, + pause: !nextCursor, + }) + return ( - ({ - title: n.name, - subText: n.description, - url: n.id, - isFavorite: n.isFavorite, - })} - renderCreateDialog={(onClose) => } - createLabel='Escalation Policy' - /> + + + {create && setCreate(false)} />} + + setCreate(true)} + slots={{ + search: , + list: ( + ({ + title: u.name, + subText: u.description, + url: u.id, + secondaryAction: u.isFavorite ? : undefined, + })) || [] + } + /> + ), + }} + /> + ) } diff --git a/web/src/app/lists/FlatList.tsx b/web/src/app/lists/FlatList.tsx index 1c4172c28a..7064353314 100644 --- a/web/src/app/lists/FlatList.tsx +++ b/web/src/app/lists/FlatList.tsx @@ -101,8 +101,8 @@ export interface FlatListNotice extends Notice { handleOnClick?: (event: MouseEvent) => void 'data-cy'?: string } -export interface FlatListItemOptions extends ListItemProps { - title?: string +export interface FlatListItemOptions extends Omit { + title?: React.ReactNode primaryText?: React.ReactNode highlight?: boolean subText?: JSX.Element | string @@ -119,7 +119,7 @@ export interface FlatListItemOptions extends ListItemProps { } export interface SectionTitle { - title: string + title: React.ReactNode icon?: React.ReactNode | null subText?: JSX.Element | string } @@ -172,7 +172,7 @@ export default function FlatList({ const classes = useStyles() // collapsable sections state - const [openSections, setOpenSections] = useState( + const [openSections, setOpenSections] = useState( sections && sections.length ? [sections[0].title] : [], ) @@ -182,7 +182,9 @@ export default function FlatList({ if ( openSections.length && sectionArr?.length && - !sectionArr?.find((section: string) => section === openSections[0]) + !sectionArr?.find( + (section: React.ReactNode) => section === openSections[0], + ) ) { setOpenSections([sectionArr[0]]) } @@ -367,7 +369,7 @@ export default function FlatList({ } function renderCollapsableItems(): JSX.Element[] | undefined { - const toggleSection = (section: string): void => { + const toggleSection = (section: React.ReactNode): void => { if (openSections?.includes(section)) { setOpenSections( openSections.filter((openSection) => openSection !== section), diff --git a/web/src/app/lists/FlatListItem.tsx b/web/src/app/lists/FlatListItem.tsx index dd89211dda..090426ab5e 100644 --- a/web/src/app/lists/FlatListItem.tsx +++ b/web/src/app/lists/FlatListItem.tsx @@ -7,7 +7,7 @@ import ListItemIcon from '@mui/material/ListItemIcon' import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction' import ListItemText from '@mui/material/ListItemText' import makeStyles from '@mui/styles/makeStyles' -import AppLink from '../util/AppLink' +import AppLink, { AppLinkListItem } from '../util/AppLink' import { FlatListItemOptions } from './FlatList' const useStyles = makeStyles(() => ({ @@ -63,7 +63,8 @@ export default function FlatListItem(props: FlatListItemProps): JSX.Element { let linkProps = {} if (url) { linkProps = { - component: AppLink, + // if you render a link with a secondary action, MUI will render the tag without an
  • around it + component: secondaryAction ? AppLink : AppLinkListItem, to: url, button: true, } @@ -101,6 +102,7 @@ export default function FlatListItem(props: FlatListItemProps): JSX.Element { [classes.listItemDisabled]: disabled, }), tabIndex: 0, + component: typeof subText === 'string' ? 'p' : 'div', }} /> {secondaryAction && ( diff --git a/web/src/app/lists/ListPageControls.tsx b/web/src/app/lists/ListPageControls.tsx new file mode 100644 index 0000000000..fc72e10ab2 --- /dev/null +++ b/web/src/app/lists/ListPageControls.tsx @@ -0,0 +1,157 @@ +import React, { useEffect } from 'react' +import { + Button, + Card, + CircularProgress, + Grid, + IconButton, + Theme, +} from '@mui/material' +import makeStyles from '@mui/styles/makeStyles' +import { Add, ChevronLeft, ChevronRight } from '@mui/icons-material' +import CreateFAB from './CreateFAB' +import { useIsWidthDown } from '../util/useWidth' +import { usePages } from '../util/pagination' +import { useURLKey } from '../actions' + +const useStyles = makeStyles((theme: Theme) => ({ + progress: { + color: theme.palette.secondary.main, + position: 'absolute', + }, + controls: { + [theme.breakpoints.down('sm')]: { + '&:not(:first-child)': { + marginBottom: '4.5em', + paddingBottom: '1em', + }, + }, + }, +})) +type ListPageControlsBaseProps = { + nextCursor: string | null | undefined + onCursorChange: (cursor: string) => void + + loading?: boolean + + slots: { + list: React.ReactNode + search?: React.ReactNode + } + + // ignored unless onCreateClick is provided + createLabel?: string +} + +type ListPageControlsCreatableProps = ListPageControlsBaseProps & { + createLabel: string + onCreateClick: () => void +} + +export type ListPageControlsProps = + | ListPageControlsBaseProps + | ListPageControlsCreatableProps + +function canCreate( + props: ListPageControlsProps, +): props is ListPageControlsCreatableProps { + return 'onCreateClick' in props && !!props.onCreateClick +} + +export default function ListPageControls( + props: ListPageControlsProps, +): React.ReactNode { + const classes = useStyles() + const showCreate = canCreate(props) + const isMobile = useIsWidthDown('md') + + const [back, next, reset] = usePages(props.nextCursor) + const urlKey = useURLKey() + // reset pageNumber on page reload + useEffect(() => { + props.onCursorChange(reset()) + }, [urlKey]) + + return ( + + + {props.slots.search && {props.slots.search}} + + {showCreate && !isMobile && ( + + + + )} + + + + {props.slots.list} + + + + + { + if (back) props.onCursorChange(back()) + window.scrollTo(0, 0) + }} + > + + + + + { + if (next) props.onCursorChange(next()) + window.scrollTo(0, 0) + }} + > + {props.loading && ( + + )} + + + + + {showCreate && isMobile && ( + + + + )} + + ) +} diff --git a/web/src/app/lists/PaginatedList.tsx b/web/src/app/lists/PaginatedList.tsx index ad3964a05e..4881a8a6fd 100644 --- a/web/src/app/lists/PaginatedList.tsx +++ b/web/src/app/lists/PaginatedList.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode, ReactElement, forwardRef } from 'react' +import React, { ReactNode, ReactElement } from 'react' import Avatar from '@mui/material/Avatar' import List from '@mui/material/List' import ListItem from '@mui/material/ListItem' @@ -13,7 +13,7 @@ import { FavoriteIcon } from '../util/SetFavoriteButton' import { ITEMS_PER_PAGE } from '../config' import Spinner from '../loading/components/Spinner' import { CheckboxItemsProps } from './ControlledPaginatedList' -import AppLink, { AppLinkProps } from '../util/AppLink' +import { AppLinkListItem } from '../util/AppLink' import { debug } from '../util/debug' import useStatusColors from '../theme/useStatusColors' @@ -128,15 +128,6 @@ export function PaginatedList(props: PaginatedListProps): JSX.Element { } } - const AppLinkListItem = forwardRef( - (props, ref) => ( -
  • - -
  • - ), - ) - AppLinkListItem.displayName = 'AppLinkListItem' - // must be explicitly set when using, in accordance with TS definitions const urlProps = item.url && { component: AppLinkListItem, diff --git a/web/src/app/main/AppRoutes.tsx b/web/src/app/main/AppRoutes.tsx index f09bd6f434..af6a4cd761 100644 --- a/web/src/app/main/AppRoutes.tsx +++ b/web/src/app/main/AppRoutes.tsx @@ -42,6 +42,8 @@ import { useSessionInfo } from '../util/RequireConfig' import WizardRouter from '../wizard/WizardRouter' import LocalDev from '../localdev/LocalDev' import AdminSwitchoverGuide from '../admin/switchover/AdminSwitchoverGuide' +import UniversalKeyPage from '../services/UniversalKey/UniversalKeyPage' +import { useExpFlag } from '../util/useExpFlag' // ParamRoute will pass route parameters as props to the route's child. function ParamRoute(props: RouteProps): JSX.Element { @@ -70,7 +72,7 @@ const alertQuery = gql` } } ` - +const EXP_ROUTE_UNIV_KEY = '/services/:serviceID/integration-keys/:keyID' // Allow any component to be used as a route. // eslint-disable-next-line @typescript-eslint/no-explicit-any export const routes: Record> = { @@ -100,6 +102,7 @@ export const routes: Record> = { '/services/:serviceID/alerts/:alertID': AlertDetailPage, '/services/:serviceID/heartbeat-monitors': HeartbeatMonitorList, '/services/:serviceID/integration-keys': IntegrationKeyList, + [EXP_ROUTE_UNIV_KEY]: UniversalKeyPage, '/services/:serviceID/labels': ServiceLabelList, '/services/:serviceID/alert-metrics': AlertMetrics, @@ -146,6 +149,8 @@ export default function AppRoutes(): JSX.Element { }) const alertServiceID = urlAlertID && alertQ.data?.alert?.serviceID + const hasUnivKeysFlag = useExpFlag('univ-keys') + useLayoutEffect(() => { if (path.endsWith('/') && path !== '/') { setPath(path.slice(0, -1) + location.search + location.hash, { @@ -189,14 +194,16 @@ export default function AppRoutes(): JSX.Element { return ( - { - Object.entries(routes).map(([path, component]) => ( + {Object.entries(routes) + .filter((value) => { + if (value[0] === EXP_ROUTE_UNIV_KEY && !hasUnivKeysFlag) { + return false + } + return true + }) + .map(([path, component]) => ( - - // not worth the type headache, we just want our routes - // eslint-disable-next-line @typescript-eslint/no-explicit-any - )) as any - } + ))} ) diff --git a/web/src/app/main/components/BreadCrumb.tsx b/web/src/app/main/components/BreadCrumb.tsx new file mode 100644 index 0000000000..4cd80ab4e2 --- /dev/null +++ b/web/src/app/main/components/BreadCrumb.tsx @@ -0,0 +1,129 @@ +import React from 'react' +import { Theme, Typography } from '@mui/material' +import AppLink from '../../util/AppLink' +import { camelCase, startCase } from 'lodash' +import { useQuery } from 'urql' + +interface BreadCrumbProps { + crumb: Routes | string + urlParts: string[] + index: number + link?: string +} + +type Routes = + | 'alerts' + | 'schedules' + | 'rotations' + | 'users' + | 'escalation-policies' + | 'services' + | 'integration-keys' + +// todo: not needed once appbar is using same color prop for dark/light modes +const getContrastColor = (theme: Theme): string => { + return theme.palette.getContrastText( + theme.palette.mode === 'dark' + ? theme.palette.background.paper + : theme.palette.primary.main, + ) +} + +const typeMap: { [key: string]: string } = { + alerts: 'Alert', + schedules: 'Schedule', + 'escalation-policies': 'Escalation Policy', + rotations: 'Rotation', + users: 'User', + services: 'Service', + 'integration-keys': 'IntegrationKey', +} + +const toTitleCase = (str: string): string => + startCase(str) + .replace(/^Wizard/, 'Setup Wizard') + .replace('On Call', 'On-Call') + .replace('Docs', 'Documentation') + .replace('Limits', 'System Limits') + .replace('Admin ', 'Admin: ') + .replace(/Config$/, 'Configuration') + .replace('Api', 'API') + +export function useName(crumb: string, index: number, parts: string[]): string { + const isUUID = + /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(crumb) + + let type = typeMap[crumb] + let queryName = 'skipping' + if (isUUID) { + type = parts[index - 1] // if uuid, grab type from previous crumb + queryName = camelCase(typeMap[parts[index - 1]]) + } + + // query for details page name if on a subpage + // skip if not a uuid - use type + const [result] = useQuery({ + query: `query ($id: ID!) { + data: ${queryName}(id: $id) { + id + name + } + }`, + variables: { id: crumb }, + pause: !isUUID, + }) + + if (type && isUUID && result?.data?.data?.name) { + return result.data.data.name + } + + return toTitleCase(crumb) +} + +export default function BreadCrumb(props: BreadCrumbProps): JSX.Element { + const { index, crumb, link, urlParts } = props + + const name = useName(crumb, index, urlParts) + + const text = ( + + {name} + + ) + + if (!link) { + return text + } + + return ( + h6': { + cursor: 'pointer', + backgroundColor: 'rgba(255, 255, 255, 0.2)', + borderRadius: '6px', + padding: '4px', + }, + }} + > + {text} + + ) +} diff --git a/web/src/app/main/components/ToolbarPageTitle.tsx b/web/src/app/main/components/ToolbarPageTitle.tsx index 71a75fd5bc..8a410d0532 100644 --- a/web/src/app/main/components/ToolbarPageTitle.tsx +++ b/web/src/app/main/components/ToolbarPageTitle.tsx @@ -1,41 +1,16 @@ import * as React from 'react' -import Typography from '@mui/material/Typography' import Breadcrumbs from '@mui/material/Breadcrumbs' import { ChevronRight } from '@mui/icons-material' -import { useQuery } from 'urql' import { useLocation } from 'wouter' import { Theme } from '@mui/material' -import { startCase, camelCase } from 'lodash' -import { applicationName as appName } from '../../env' -import { routes } from '../AppRoutes' -import { useConfigValue } from '../../util/RequireConfig' -import AppLink from '../../util/AppLink' +import BreadCrumb from './BreadCrumb' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore type definition is broken for this file -import makeMatcher from 'wouter/matcher' import { useIsWidthDown } from '../../util/useWidth' -const typeMap: { [key: string]: string } = { - alerts: 'Alert', - schedules: 'Schedule', - 'escalation-policies': 'Escalation Policy', - rotations: 'Rotation', - users: 'User', - services: 'Service', -} -const toTitleCase = (str: string): string => - startCase(str) - .replace(/^Wizard/, 'Setup Wizard') - .replace('On Call', 'On-Call') - .replace('Docs', 'Documentation') - .replace('Limits', 'System Limits') - .replace('Admin ', 'Admin: ') - .replace(/Config$/, 'Configuration') - .replace('Api', 'API') - // todo: not needed once appbar is using same color prop for dark/light modes -const getContrastColor = (theme: Theme): string => { +export const getContrastColor = (theme: Theme): string => { return theme.palette.getContrastText( theme.palette.mode === 'dark' ? theme.palette.background.paper @@ -43,121 +18,11 @@ const getContrastColor = (theme: Theme): string => { ) } -const renderCrumb = ( - index: number, - title: string, - link?: string, -): JSX.Element => { - const text = ( - - {title} - - ) - - if (!link) { - return text - } - - return ( - h6': { - cursor: 'pointer', - backgroundColor: 'rgba(255, 255, 255, 0.2)', - borderRadius: '6px', - padding: '4px', - }, - }} - > - {text} - - ) -} - -const matchPath = makeMatcher() - -function useName(type = '', id = ''): string { - const queryName = camelCase(typeMap[type] ?? 'skipping') - const isUUID = - /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(id) - // query for details page name if on a subpage - const [result] = useQuery({ - query: `query ($id: ID!) { - data: ${queryName}(id: $id) { - id - name - } - }`, - variables: { id }, - pause: !type || !isUUID, - }) - - if (type && isUUID && result?.data?.data?.name) { - return result.data.data.name - } - - return toTitleCase(isUUID ? typeMap[type] ?? type : id) -} - -function useBreadcrumbs(): [string, JSX.Element[] | JSX.Element] { - const [path] = useLocation() - - let title = '' - const crumbs: Array = [] - const parts = path.split('/') - const name = useName(parts[1], parts[2]) - parts.slice(1).forEach((part, i) => { - title = i === 1 ? name : toTitleCase(part) - if (parts[1] === 'admin') { - // admin doesn't have IDs to lookup - // and instead just has fixed sub-page names - title = toTitleCase(part) - } - crumbs.push(renderCrumb(i, title, parts.slice(0, i + 2).join('/'))) - }) - - const isValidRoute = Object.keys(routes).some((pattern) => { - const [match] = matchPath(pattern, path) - return match - }) - - if (!isValidRoute) { - const title = toTitleCase('page-not-found') - return [title, renderCrumb(0, title)] - } - - if (/^\d+$/.test(title)) { - title = 'Alert ' + title - } - - return [title, crumbs] -} - export default function ToolbarPageTitle(): JSX.Element { - const [title, crumbs] = useBreadcrumbs() - const [applicationName] = useConfigValue('General.ApplicationName') const isMobile = useIsWidthDown('md') - React.useLayoutEffect(() => { - document.title = `${applicationName || appName} - ${title}` - }, [title, applicationName]) + const [path] = useLocation() + const parts = React.useMemo(() => path.split('/').slice(1), [path]) return ( } > - {crumbs} + {parts.map((part, idx) => ( + + ))} ) } diff --git a/web/src/app/rotations/RotationList.tsx b/web/src/app/rotations/RotationList.tsx index 249126c987..edf9e2e6b1 100644 --- a/web/src/app/rotations/RotationList.tsx +++ b/web/src/app/rotations/RotationList.tsx @@ -1,11 +1,16 @@ -import React from 'react' -import { gql } from 'urql' -import QueryList from '../lists/QueryList' +import React, { Suspense, useState } from 'react' +import { gql, useQuery } from 'urql' import RotationCreateDialog from './RotationCreateDialog' +import { useURLParam } from '../actions' +import { RotationConnection } from '../../schema' +import ListPageControls from '../lists/ListPageControls' +import Search from '../util/Search' +import FlatList from '../lists/FlatList' +import { FavoriteIcon } from '../util/SetFavoriteButton' const query = gql` query rotationsQuery($input: RotationSearchOptions) { - data: rotations(input: $input) { + rotations(input: $input) { nodes { id name @@ -20,21 +25,62 @@ const query = gql` } ` +const context = { suspense: false } export default function RotationList(): JSX.Element { + const [search] = useURLParam('search', '') + const [create, setCreate] = useState(false) + const [cursor, setCursor] = useState('') + + const inputVars = { + favoritesFirst: true, + search, + after: cursor, + } + + const [q] = useQuery<{ rotations: RotationConnection }>({ + query, + variables: { input: inputVars }, + context, + }) + const nextCursor = q.data?.rotations.pageInfo.hasNextPage + ? q.data?.rotations.pageInfo.endCursor + : '' + // cache the next page + useQuery({ + query, + variables: { input: { ...inputVars, after: nextCursor } }, + context, + pause: !nextCursor, + }) + return ( - ({ - title: n.name, - subText: n.description, - url: n.id, - isFavorite: n.isFavorite, - })} - renderCreateDialog={(onClose) => ( - - )} - createLabel='Rotation' - /> + + + {create && setCreate(false)} />} + + setCreate(true)} + slots={{ + search: , + list: ( + ({ + title: u.name, + subText: u.description, + url: u.id, + secondaryAction: u.isFavorite ? : undefined, + })) || [] + } + /> + ), + }} + /> + ) } diff --git a/web/src/app/schedules/ScheduleList.tsx b/web/src/app/schedules/ScheduleList.tsx index de22219fff..ec22f71283 100644 --- a/web/src/app/schedules/ScheduleList.tsx +++ b/web/src/app/schedules/ScheduleList.tsx @@ -1,11 +1,16 @@ -import React from 'react' -import { gql } from 'urql' -import QueryList from '../lists/QueryList' +import React, { Suspense, useState } from 'react' +import { gql, useQuery } from 'urql' import ScheduleCreateDialog from './ScheduleCreateDialog' +import { useURLParam } from '../actions' +import { ScheduleConnection } from '../../schema' +import ListPageControls from '../lists/ListPageControls' +import Search from '../util/Search' +import FlatList from '../lists/FlatList' +import { FavoriteIcon } from '../util/SetFavoriteButton' const query = gql` query schedulesQuery($input: ScheduleSearchOptions) { - data: schedules(input: $input) { + schedules(input: $input) { nodes { id name @@ -20,21 +25,62 @@ const query = gql` } ` +const context = { suspense: false } export default function ScheduleList(): JSX.Element { + const [search] = useURLParam('search', '') + const [create, setCreate] = useState(false) + const [cursor, setCursor] = useState('') + + const inputVars = { + favoritesFirst: true, + search, + after: cursor, + } + + const [q] = useQuery<{ schedules: ScheduleConnection }>({ + query, + variables: { input: inputVars }, + context, + }) + const nextCursor = q.data?.schedules.pageInfo.hasNextPage + ? q.data?.schedules.pageInfo.endCursor + : '' + // cache the next page + useQuery({ + query, + variables: { input: { ...inputVars, after: nextCursor } }, + context, + pause: !nextCursor, + }) + return ( - ({ - title: n.name, - subText: n.description, - url: n.id, - isFavorite: n.isFavorite, - })} - renderCreateDialog={(onClose) => ( - - )} - createLabel='Schedule' - /> + + + {create && setCreate(false)} />} + + setCreate(true)} + slots={{ + search: , + list: ( + ({ + title: u.name, + subText: u.description, + url: u.id, + secondaryAction: u.isFavorite ? : undefined, + })) || [] + } + /> + ), + }} + /> + ) } diff --git a/web/src/app/schedules/ScheduleRuleDeleteDialog.tsx b/web/src/app/schedules/ScheduleRuleDeleteDialog.tsx index 3d941d1b44..5f8ac0b717 100644 --- a/web/src/app/schedules/ScheduleRuleDeleteDialog.tsx +++ b/web/src/app/schedules/ScheduleRuleDeleteDialog.tsx @@ -1,6 +1,5 @@ import React from 'react' -import { useMutation } from '@apollo/client' -import { gql, useQuery } from 'urql' +import { gql, useQuery, useMutation } from 'urql' import FormDialog from '../dialogs/FormDialog' import { startCase } from 'lodash' import { GenericError } from '../error-pages' @@ -46,9 +45,7 @@ export default function ScheduleRuleDeleteDialog( variables: { id: props.scheduleID, tgt: props.target }, }) - const [deleteRule] = useMutation(mutation, { - onCompleted: props.onClose, - }) + const [deleteRuleStatus, deleteRule] = useMutation(mutation) if (error) { return @@ -64,16 +61,21 @@ export default function ScheduleRuleDeleteDialog( title={`Remove ${startCase(props.target.type)} From Schedule?`} subTitle={`This will remove all rules, as well as end any active or future on-call shifts on this schedule for ${props.target.type}: ${data.schedule.target.target.name}.`} caption='Overrides will not be affected.' + loading={deleteRuleStatus.fetching} + errors={deleteRuleStatus.error ? [deleteRuleStatus.error] : []} confirm onSubmit={() => { - deleteRule({ - variables: { + deleteRule( + { input: { target: props.target, scheduleID: props.scheduleID, rules: [], }, }, + { additionalTypenames: ['Schedule'] }, + ).then((result) => { + if (!result.error) props.onClose() }) }} /> diff --git a/web/src/app/schedules/ScheduleShiftList.tsx b/web/src/app/schedules/ScheduleShiftList.tsx index 16e77936a8..0400463296 100644 --- a/web/src/app/schedules/ScheduleShiftList.tsx +++ b/web/src/app/schedules/ScheduleShiftList.tsx @@ -1,4 +1,4 @@ -import { gql, useQuery } from '@apollo/client' +import { gql, useQuery } from 'urql' import { GroupAdd } from '@mui/icons-material' import { Button, @@ -71,6 +71,8 @@ interface ScheduleShiftListProps { scheduleID: string } +const context = { suspense: false } + function ScheduleShiftList({ scheduleID, }: ScheduleShiftListProps): JSX.Element { @@ -124,7 +126,9 @@ function ScheduleShiftList({ 'duration', ) - const { data } = useQuery(query, { + const [{ data }] = useQuery({ + query, + context, variables: { id: scheduleID, start, @@ -178,10 +182,11 @@ function ScheduleShiftList({ const scheduleTZDetails = `From ${schedStartTime} to ${schedEndTime} ${tzAbbr}` const localTZDetails = `From ${localStartTime} to ${localEndTime} ${localTzAbbr}` return ( - - - {localTZDetails} - + {scheduleTZDetails}} + placement='right' + > + {localTZDetails} ) } @@ -194,8 +199,11 @@ function ScheduleShiftList({ s.truncated ? ' at least' : '' } ${localEndTime} ${localTzAbbr}` return ( - - {localTZDetails} + {scheduleTZDetails}} + placement='right' + > + {localTZDetails} ) } @@ -205,14 +213,10 @@ function ScheduleShiftList({ const localTZDetails = `Active after ${localStartTime} ${localTzAbbr}` return ( {scheduleTZDetails}} placement='right' - PopperProps={{ - // @ts-expect-error test id - 'data-testid': 'shift-tooltip', - }} > - {localTZDetails} + {localTZDetails} ) } diff --git a/web/src/app/schedules/ScheduleTZFilter.jsx b/web/src/app/schedules/ScheduleTZFilter.jsx deleted file mode 100644 index 7ffacce9e8..0000000000 --- a/web/src/app/schedules/ScheduleTZFilter.jsx +++ /dev/null @@ -1,61 +0,0 @@ -import React from 'react' -import { gql, useQuery } from '@apollo/client' -import p from 'prop-types' -import { FormControlLabel, Switch } from '@mui/material' -import { DateTime } from 'luxon' - -import { useURLParam } from '../actions/hooks' - -const tzQuery = gql` - query ($id: ID!) { - schedule(id: $id) { - id - timeZone - } - } -` - -export function ScheduleTZFilter(props) { - const [zone, setZone] = useURLParam('tz', 'local') - const { data, loading, error } = useQuery(tzQuery, { - pollInterval: 0, - variables: { id: props.scheduleID }, - }) - - let label, tz - if (error) { - label = 'Error: ' + (error.message || error) - } else if (!data && loading) { - label = 'Fetching timezone information...' - } else { - tz = data.schedule.timeZone - const short = DateTime.local({ zone: tz }).toFormat('ZZZZ') - const tzName = tz === short ? tz : tz + ` (${short})` - label = props.label ? props.label(tzName) : `Show times in ${tzName}` - } - - return ( - setZone(e.target.checked ? tz : 'local')} - value={tz} - disabled={Boolean(loading || error)} - /> - } - label={label} - /> - ) -} - -ScheduleTZFilter.propTypes = { - label: p.func, - - scheduleID: p.string.isRequired, - - // provided by connect - zone: p.string, - setZone: p.func, -} diff --git a/web/src/app/schedules/useOverrideNotices.ts b/web/src/app/schedules/useOverrideNotices.ts index 973b214cf1..206854164d 100644 --- a/web/src/app/schedules/useOverrideNotices.ts +++ b/web/src/app/schedules/useOverrideNotices.ts @@ -1,6 +1,6 @@ import { Notice, TemporarySchedule } from '../../schema' import { parseInterval, SpanISO } from '../util/shifts' -import { useQuery, gql } from '@apollo/client' +import { useQuery, gql } from 'urql' const scheduleQuery = gql` query ($id: ID!) { @@ -19,15 +19,13 @@ export default function useOverrideNotices( scheduleID: string, value: SpanISO, ): Notice[] { - const { data, loading } = useQuery(scheduleQuery, { + const [{ data }] = useQuery({ + query: scheduleQuery, variables: { id: scheduleID, }, - pollInterval: 0, }) - if (loading) { - return [] - } + const tempSchedules = data?.schedule?.temporarySchedules const zone = data?.schedule?.timeZone const valueInterval = parseInterval(value, zone) diff --git a/web/src/app/services/IntegrationKeyCreateDialog.tsx b/web/src/app/services/IntegrationKeyCreateDialog.tsx index 8f6a3a0e30..306a11cca7 100644 --- a/web/src/app/services/IntegrationKeyCreateDialog.tsx +++ b/web/src/app/services/IntegrationKeyCreateDialog.tsx @@ -1,10 +1,10 @@ import React, { useState } from 'react' import { useMutation, gql } from 'urql' - -import { fieldErrors, nonFieldErrors } from '../util/errutil' - -import FormDialog from '../dialogs/FormDialog' import IntegrationKeyForm, { Value } from './IntegrationKeyForm' +import { Redirect } from 'wouter' +import FormDialog from '../dialogs/FormDialog' +import { useExpFlag } from '../util/useExpFlag' +import { fieldErrors, nonFieldErrors } from '../util/errutil' const mutation = gql` mutation ($input: CreateIntegrationKeyInput!) { @@ -23,13 +23,26 @@ export default function IntegrationKeyCreateDialog(props: { }): JSX.Element { const [value, setValue] = useState(null) const { serviceID, onClose } = props - const [createKeyStatus, createKey] = useMutation(mutation) + const hasUnivKeysFlag = useExpFlag('univ-keys') + let caption + if (hasUnivKeysFlag && value?.type === 'universal') { + caption = 'Submit to configure universal key rules' + } + + if (createKeyStatus?.data?.createIntegrationKey?.type === 'universal') { + return ( + + ) + } return ( { + if (value?.type === 'universal') { + return + } + + onClose() + }) }} form={ ({ title: key.name, + url: key.type === 'universal' ? key.id : undefined, subText: ( ({ title: key.name, - subText: , + subText: , secondaryAction: ( setDeleteDialog(key.id)} size='large' + sx={{ right: '-16px' }} > @@ -187,20 +189,20 @@ export default function IntegrationKeyList(props: { } /> {!!extItems.length && ( - - - - }> - Externally Managed Keys - - - - - - + + } + sx={{ ml: '6px', mr: '12px' }} + > + Externally Managed Keys + + + + + )} diff --git a/web/src/app/services/ServiceCreateDialog.tsx b/web/src/app/services/ServiceCreateDialog.tsx index 18093af6d0..0c98717578 100644 --- a/web/src/app/services/ServiceCreateDialog.tsx +++ b/web/src/app/services/ServiceCreateDialog.tsx @@ -110,9 +110,14 @@ export default function ServiceCreateDialog(props: { } } - return commit({ - input: inputVars(value), - }).then(null, onErr) + return commit( + { + input: inputVars(value), + }, + { + additionalTypenames: ['ServiceConnection'], + }, + ).then(null, onErr) }} form={ ('search', '') - const { labelKey, labelValue, integrationKey } = - getServiceFilters(searchParam) + const [search, setSearch] = useURLParam('search', '') + const { labelKey, labelValue, integrationKey } = getServiceFilters(search) + const [create, setCreate] = useState(false) + const [cursor, setCursor] = useState('') + + const inputVars = { + favoritesFirst: true, + search, + after: cursor, + } + + const [q] = useQuery<{ services: ServiceConnection }>({ + query, + variables: { input: inputVars }, + context, + }) + const nextCursor = q.data?.services.pageInfo.hasNextPage + ? q.data?.services.pageInfo.endCursor + : '' + // cache the next page + useQuery({ + query, + variables: { input: { ...inputVars, after: nextCursor } }, + context, + pause: !nextCursor, + }) return ( - ({ - title: n.name, - subText: n.description, - url: n.id, - isFavorite: n.isFavorite, - })} - renderCreateDialog={(onClose) => ( - - )} - createLabel='Service' - searchAdornment={ - { - const labelSearch = labelKey ? labelKey + '=' + labelValue : '' - const intKeySearch = integrationKey ? 'token=' + integrationKey : '' - const searchStr = - intKeySearch && labelSearch - ? intKeySearch + ' ' + labelSearch - : intKeySearch + labelSearch - setSearchParam(searchStr) - }} - onReset={() => setSearchParam('')} - /> - } - /> + + + {create && setCreate(false)} />} + + setCreate(true)} + slots={{ + search: ( + { + const labelSearch = labelKey + ? labelKey + '=' + labelValue + : '' + const intKeySearch = integrationKey + ? 'token=' + integrationKey + : '' + const searchStr = + intKeySearch && labelSearch + ? intKeySearch + ' ' + labelSearch + : intKeySearch + labelSearch + setSearch(searchStr) + }} + onReset={() => setSearch('')} + /> + } + /> + ), + list: ( + ({ + title: u.name, + subText: u.description, + url: u.id, + secondaryAction: u.isFavorite ? : undefined, + })) || [] + } + /> + ), + }} + /> + ) } diff --git a/web/src/app/services/UniversalKey/UniversalKeyPage.tsx b/web/src/app/services/UniversalKey/UniversalKeyPage.tsx new file mode 100644 index 0000000000..760674c3e1 --- /dev/null +++ b/web/src/app/services/UniversalKey/UniversalKeyPage.tsx @@ -0,0 +1,16 @@ +import React from 'react' + +interface UniversalKeyPageProps { + serviceID: string + keyName: string +} + +export default function UniversalKeyPage({ + serviceID, + keyName, +}: UniversalKeyPageProps): JSX.Element { + if (serviceID && keyName) { + return
    + } + return
    +} diff --git a/web/src/app/users/UserContactMethodEditDialog.tsx b/web/src/app/users/UserContactMethodEditDialog.tsx index 9fbd9e113b..6476fb581a 100644 --- a/web/src/app/users/UserContactMethodEditDialog.tsx +++ b/web/src/app/users/UserContactMethodEditDialog.tsx @@ -1,10 +1,9 @@ import React, { useState } from 'react' -import { gql, useMutation } from '@apollo/client' import { fieldErrors, nonFieldErrors } from '../util/errutil' import FormDialog from '../dialogs/FormDialog' import UserContactMethodForm from './UserContactMethodForm' import { pick } from 'lodash' -import { useQuery } from 'urql' +import { gql, useMutation, useQuery } from 'urql' import { useExpFlag } from '../util/useExpFlag' import { ContactMethodType, StatusUpdateState } from '../../schema' import UserContactMethodEditDialogDest from './UserContactMethodEditDialogDest' @@ -50,7 +49,7 @@ function UserContactMethodEditDialog({ query, variables: { id: contactMethodID }, }) - const [commit, status] = useMutation(mutation) + const [status, commit] = useMutation(mutation) const { error } = status const defaultValue = { @@ -78,15 +77,16 @@ function UserContactMethodEditDialog({ enableStatusUpdates: updates.statusUpdates === 'ENABLED', }).statusUpdates } - commit({ - variables: { + commit( + { input: { ...updates, id: contactMethodID, }, }, - }).then((result) => { - if (result.errors) return + { additionalTypenames: ['UserContactMethod'] }, + ).then((result) => { + if (result.error) return onClose() }) }} diff --git a/web/src/app/users/UserContactMethodList.tsx b/web/src/app/users/UserContactMethodList.tsx index b67e87de54..abf21298ab 100644 --- a/web/src/app/users/UserContactMethodList.tsx +++ b/web/src/app/users/UserContactMethodList.tsx @@ -1,4 +1,4 @@ -import React, { useState, ReactNode } from 'react' +import React, { useState, ReactNode, Suspense } from 'react' import { gql, useQuery } from 'urql' import FlatList from '../lists/FlatList' import { Button, Card, CardHeader, Grid, IconButton } from '@mui/material' @@ -208,39 +208,41 @@ export default function UserContactMethodList( }))} emptyMessage='No contact methods' /> - {showAddDialog && ( - { - setShowAddDialog(false) - setShowVerifyDialogByID(contactMethodID) - }} - /> - )} - {showVerifyDialogByID && ( - setShowVerifyDialogByID('')} - /> - )} - {showEditDialogByID && ( - setShowEditDialogByID('')} - /> - )} - {showDeleteDialogByID && ( - setShowDeleteDialogByID('')} - /> - )} - {showSendTestByID && ( - setShowSendTestByID('')} - /> - )} + + {showAddDialog && ( + { + setShowAddDialog(false) + setShowVerifyDialogByID(contactMethodID) + }} + /> + )} + {showVerifyDialogByID && ( + setShowVerifyDialogByID('')} + /> + )} + {showEditDialogByID && ( + setShowEditDialogByID('')} + /> + )} + {showDeleteDialogByID && ( + setShowDeleteDialogByID('')} + /> + )} + {showSendTestByID && ( + setShowSendTestByID('')} + /> + )} + ) diff --git a/web/src/app/users/UserContactMethodListDest.tsx b/web/src/app/users/UserContactMethodListDest.tsx index f2c14c0bbe..e589553c2a 100644 --- a/web/src/app/users/UserContactMethodListDest.tsx +++ b/web/src/app/users/UserContactMethodListDest.tsx @@ -1,4 +1,4 @@ -import React, { useState, ReactNode } from 'react' +import React, { useState, ReactNode, Suspense } from 'react' import { gql, useQuery } from 'urql' import FlatList from '../lists/FlatList' import { Button, Card, CardHeader, Grid, IconButton } from '@mui/material' @@ -229,39 +229,41 @@ export default function UserContactMethodListDest( })} emptyMessage='No contact methods' /> - {showAddDialog && ( - { - setShowAddDialog(false) - setShowVerifyDialogByID(contactMethodID) - }} - /> - )} - {showVerifyDialogByID && ( - setShowVerifyDialogByID('')} - /> - )} - {showEditDialogByID && ( - setShowEditDialogByID('')} - /> - )} - {showDeleteDialogByID && ( - setShowDeleteDialogByID('')} - /> - )} - {showSendTestByID && ( - setShowSendTestByID('')} - /> - )} + + {showAddDialog && ( + { + setShowAddDialog(false) + setShowVerifyDialogByID(contactMethodID) + }} + /> + )} + {showVerifyDialogByID && ( + setShowVerifyDialogByID('')} + /> + )} + {showEditDialogByID && ( + setShowEditDialogByID('')} + /> + )} + {showDeleteDialogByID && ( + setShowDeleteDialogByID('')} + /> + )} + {showSendTestByID && ( + setShowSendTestByID('')} + /> + )} + ) diff --git a/web/src/app/users/UserList.tsx b/web/src/app/users/UserList.tsx index 97b9a59a0d..e8863e06a6 100644 --- a/web/src/app/users/UserList.tsx +++ b/web/src/app/users/UserList.tsx @@ -1,14 +1,19 @@ -import React from 'react' -import { gql } from 'urql' +import React, { Suspense, useState } from 'react' +import { gql, useQuery } from 'urql' import { UserAvatar } from '../util/avatars' -import QueryList from '../lists/QueryList' import UserPhoneNumberFilterContainer from './UserPhoneNumberFilterContainer' import UserCreateDialog from './UserCreateDialog' import { useSessionInfo } from '../util/RequireConfig' +import ListPageControls from '../lists/ListPageControls' +import Search from '../util/Search' +import FlatList from '../lists/FlatList' +import { UserConnection } from '../../schema' +import { useURLParam } from '../actions' +import { FavoriteIcon } from '../util/SetFavoriteButton' const query = gql` query usersQuery($input: UserSearchOptions) { - data: users(input: $input) { + users(input: $input) { nodes { id name @@ -23,34 +28,69 @@ const query = gql` } ` +const context = { suspense: false } + function UserList(): JSX.Element { - const { isAdmin, ready } = useSessionInfo() + const { isAdmin } = useSessionInfo() + const [create, setCreate] = useState(false) + const [search] = useURLParam('search', '') + const [cursor, setCursor] = useState('') + + const inputVars = { + favoritesFirst: true, + search, + CMValue: '', + after: cursor, + } + if (search.startsWith('phone=')) { + inputVars.CMValue = search.replace(/^phone=/, '') + inputVars.search = '' + } + + const [q] = useQuery<{ users: UserConnection }>({ + query, + variables: { input: inputVars }, + context, + }) + const nextCursor = q.data?.users.pageInfo.hasNextPage + ? q.data?.users.pageInfo.endCursor + : '' + // cache the next page + useQuery({ + query, + variables: { input: { ...inputVars, after: nextCursor } }, + context, + pause: !nextCursor, + }) return ( - ({ - title: n.name, - subText: n.email, - url: n.id, - isFavorite: n.isFavorite, - icon: , - })} - mapVariables={(vars) => { - if (vars?.input?.search?.startsWith('phone=')) { - vars.input.CMValue = vars.input.search.replace(/^phone=/, '') - vars.input.search = '' - } - return vars - }} - searchAdornment={} - renderCreateDialog={(onClose) => { - return - }} + + {create && setCreate(false)} />} + + setCreate(true) : undefined} + slots={{ + search: } />, + list: ( + ({ + title: u.name, + subText: u.email, + url: u.id, + secondaryAction: u.isFavorite ? : undefined, + icon: , + })) || [] + } + /> + ), + }} /> ) diff --git a/web/src/app/util/AppLink.tsx b/web/src/app/util/AppLink.tsx index 40034be212..a35e47172c 100644 --- a/web/src/app/util/AppLink.tsx +++ b/web/src/app/util/AppLink.tsx @@ -1,4 +1,4 @@ -import React, { forwardRef, ForwardRefRenderFunction } from 'react' +import React, { forwardRef } from 'react' import { LinkProps } from '@mui/material' import MUILink from '@mui/material/Link' @@ -32,32 +32,43 @@ const WrapLink = forwardRef(function WrapLink( ) }) -const AppLink: ForwardRefRenderFunction = - function AppLink(props, ref): JSX.Element { - let { to, newTab, ...other } = props - const [location] = useLocation() - - if (newTab) { - other.target = '_blank' - other.rel = 'noopener noreferrer' - } - - const external = /^(tel:|mailto:|blob:|https?:\/\/)/.test(to) - - // handle relative URLs - if (!external && !to.startsWith('/')) { - to = joinURL(location, to) - } - - return ( - - ) +const AppLink = forwardRef((props, ref) => { + let { to, newTab, ...other } = props + const [location] = useLocation() + + if (newTab) { + other.target = '_blank' + other.rel = 'noopener noreferrer' } -export default forwardRef(AppLink) + const external = /^(tel:|mailto:|blob:|https?:\/\/)/.test(to) + + // handle relative URLs + if (!external && !to.startsWith('/')) { + to = joinURL(location, to) + } + + return ( + + ) +}) + +AppLink.displayName = 'AppLink' +export default AppLink + +// forwardRef required to shut console up +export const AppLinkListItem = forwardRef( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + (props, _) => ( +
  • + +
  • + ), +) +AppLinkListItem.displayName = 'AppLinkListItem' diff --git a/web/src/app/util/errtypes.ts b/web/src/app/util/errtypes.ts index f1c3eaf64f..44416c77d1 100644 --- a/web/src/app/util/errtypes.ts +++ b/web/src/app/util/errtypes.ts @@ -35,6 +35,8 @@ function isKnownErrorCode(code: ErrorCode): code is ErrorCode { return true case 'INVALID_DEST_FIELD_VALUE': return true + case 'EXPR_TOO_COMPLEX': + return true default: assertNever(code) // ensure we handle all error codes return false diff --git a/web/src/app/util/pagination.ts b/web/src/app/util/pagination.ts new file mode 100644 index 0000000000..c5f76ce706 --- /dev/null +++ b/web/src/app/util/pagination.ts @@ -0,0 +1,36 @@ +import { useState } from 'react' + +/** + * usePages is a custom hook that manages pagination state by tracking the current page cursor + * as well as previous page cursors. + * + * @returns {(() => string) | undefined} A function to go back to the previous page, or undefined if there is no previous page. + * @returns {(() => string) | undefined} A function to go to the next page, or undefined if there is no next page. + * @returns {() => string} A function to reset the page cursor to the first page. + */ +export function usePages( + nextCursor: string | null | undefined, +): [(() => string) | undefined, (() => string) | undefined, () => string] { + const [pageCursors, setPageCursors] = useState(['']) + + function goBack(): string { + const newCursors = pageCursors.slice(0, -1) + setPageCursors(newCursors) + return newCursors[newCursors.length - 1] + } + + function goNext(): string { + if (!nextCursor) return pageCursors[pageCursors.length - 1] + setPageCursors([...pageCursors, nextCursor]) + return nextCursor + } + + return [ + pageCursors.length > 1 ? goBack : undefined, + nextCursor ? goNext : undefined, + () => { + setPageCursors(['']) + return '' + }, + ] +} diff --git a/web/src/app/wizard/WizardForm.jsx b/web/src/app/wizard/WizardForm.jsx index dfc59cae78..f53b54a591 100644 --- a/web/src/app/wizard/WizardForm.jsx +++ b/web/src/app/wizard/WizardForm.jsx @@ -16,6 +16,7 @@ import makeStyles from '@mui/styles/makeStyles' import * as _ from 'lodash' import { useIsWidthDown } from '../util/useWidth' import MaterialSelect from '../selection/MaterialSelect' +import { useFeatures } from '../util/RequireConfig' const useStyles = makeStyles({ fieldItem: { @@ -32,6 +33,8 @@ export default function WizardForm(props) { const fullScreen = useIsWidthDown('md') const classes = useStyles() + const keyTypes = useFeatures().integrationKeyTypes + const handleSecondaryScheduleToggle = (e) => { const newVal = _.cloneDeep(value) newVal.secondarySchedule.enable = e.target.value @@ -167,28 +170,10 @@ export default function WizardForm(props) { formLabel fullWidth={fullScreen} required - options={[ - { - label: 'Generic API', - value: 'generic', - }, - { - label: 'Grafana Webhook URL', - value: 'grafana', - }, - { - label: 'Site24x7 Webhook URL', - value: 'site24x7', - }, - { - label: 'Prometheus Alertmanager Webhook URL', - value: 'prometheusAlertmanager', - }, - { - label: 'Email', - value: 'email', - }, - ]} + options={keyTypes.map((k) => ({ + label: k.name, + value: k.id, + }))} /> diff --git a/web/src/cypress/e2e/favorites.cy.ts b/web/src/cypress/e2e/favorites.cy.ts index ec9e0c7bcb..d6f4ad11d3 100644 --- a/web/src/cypress/e2e/favorites.cy.ts +++ b/web/src/cypress/e2e/favorites.cy.ts @@ -37,14 +37,14 @@ function check( createFunc(name2, true) cy.visit(`/${urlPrefix}?search=${encodeURIComponent(prefix)}`) - cy.get('ul[data-cy=paginated-list] li') + cy.get('main ul > li') .should('have.length', 2) .first() .should('contain', name2) .find('[data-cy=fav-icon]') .should('exist') - cy.get('ul[data-cy=paginated-list] li').last().should('contain', name1) + cy.get('main ul > li').last().should('contain', name1) }) if (getSearchSelectFunc) { it('should sort favorites-first in a search-select', () => { diff --git a/web/src/cypress/e2e/schedules.cy.ts b/web/src/cypress/e2e/schedules.cy.ts index 0e00cefad2..8ea400c5be 100644 --- a/web/src/cypress/e2e/schedules.cy.ts +++ b/web/src/cypress/e2e/schedules.cy.ts @@ -153,8 +153,8 @@ function testSchedules(screen: ScreenFormat): void { }, ], }).then(() => { + cy.engineTrigger() cy.get('[data-cy="route-links"] li').contains('Shifts').click() - cy.reload() cy.get('[data-cy=flat-list-item-subheader]').should('contain', 'Today') cy.get('[data-cy=flat-list-item-subheader]').should( 'contain', diff --git a/web/src/cypress/e2e/users.cy.ts b/web/src/cypress/e2e/users.cy.ts index d7aa7288a4..bcea590471 100644 --- a/web/src/cypress/e2e/users.cy.ts +++ b/web/src/cypress/e2e/users.cy.ts @@ -16,12 +16,12 @@ function testUsers(screen: ScreenFormat): void { }) it('should handle searching', () => { - cy.get('ul[data-cy=paginated-list]').should('exist') + cy.get('main ul').should('exist') // by name cy.pageSearch(prof.name) // cypress user and cypress admin - cy.get('[data-cy=paginated-list] > li').should('have.lengthOf', 2) - cy.get('ul').should('contain', prof.name) + cy.get('main ul > li').should('have.lengthOf', 2) + cy.get('main ul').should('contain', prof.name) }) it('should handle searching by phone number', () => { @@ -30,8 +30,8 @@ function testUsers(screen: ScreenFormat): void { } cy.get('button[data-cy="users-filter-button"]').click() cy.form({ 'user-phone-search': cm.value }) - cy.get('[data-cy=paginated-list] > li').should('have.lengthOf', 1) - cy.get('ul').should('contain', prof.name) + cy.get('main ul > li').should('have.lengthOf', 1) + cy.get('main ul').should('contain', prof.name) }) }) @@ -68,7 +68,7 @@ function testUsers(screen: ScreenFormat): void { .click() cy.dialogTitle('Are you sure?') cy.dialogFinish('Confirm') - cy.get('[data-cy=paginated-list]').should('not.contain', user.name) + cy.get('main ul').should('not.contain', user.name) }) describe('User Password', () => { diff --git a/web/src/expflag.d.ts b/web/src/expflag.d.ts index b00fa103c0..62176842bf 100644 --- a/web/src/expflag.d.ts +++ b/web/src/expflag.d.ts @@ -1,3 +1,3 @@ // Code generated by expflag/cmd/tsgen DO NOT EDIT. -type ExpFlag = 'dest-types' | 'example' +type ExpFlag = 'dest-types' | 'example' | 'univ-keys' diff --git a/web/src/schema.d.ts b/web/src/schema.d.ts index 44b6bd664f..cf7744269e 100644 --- a/web/src/schema.d.ts +++ b/web/src/schema.d.ts @@ -1,5 +1,15 @@ // Code generated by devtools/gqltsgen DO NOT EDIT. +export interface Action { + dest: Destination + params: DynamicParam[] +} + +export interface ActionInput { + dest: DestinationInput + params: DynamicParamInput[] +} + export interface Alert { alertID: number createdAt: ISOTimestamp @@ -128,6 +138,20 @@ export interface CalcRotationHandoffTimesInput { timeZone: string } +export interface Clause { + field: ExprIdentifier + negate: boolean + operator: ExprOperator + value: ExprValue +} + +export interface ClauseInput { + field: ExprIdentifier + negate: boolean + operator: ExprOperator + value: ExprValue +} + export interface ClearTemporarySchedulesInput { end: ISOTimestamp scheduleID: string @@ -143,6 +167,18 @@ export interface CloseMatchingAlertInput { summary?: null | string } +export interface Condition { + clauses: Clause[] +} + +export interface ConditionInput { + clauses: ClauseInput[] +} + +export interface ConditionToExprInput { + condition: ConditionInput +} + export interface ConfigHint { id: string value: string @@ -426,7 +462,20 @@ export interface DestinationTypeInfo { userDisclaimer: string } -export type ErrorCode = 'INVALID_DEST_FIELD_VALUE' | 'INVALID_INPUT_VALUE' +export interface DynamicParam { + expr: ExprStringExpression + paramID: string +} + +export interface DynamicParamInput { + expr: ExprStringExpression + paramID: string +} + +export type ErrorCode = + | 'EXPR_TOO_COMPLEX' + | 'INVALID_DEST_FIELD_VALUE' + | 'INVALID_INPUT_VALUE' export interface EscalationPolicy { assignedTo: Target[] @@ -463,6 +512,27 @@ export interface EscalationPolicyStep { targets: Target[] } +export interface Expr { + conditionToExpr: string + exprToCondition: Condition +} + +export type ExprBooleanExpression = string + +export type ExprExpression = string + +export type ExprIdentifier = string + +export type ExprOperator = string + +export type ExprStringExpression = string + +export interface ExprToConditionInput { + expr: ExprBooleanExpression +} + +export type ExprValue = string + export interface FieldSearchConnection { nodes: FieldSearchResult[] pageInfo: PageInfo @@ -535,6 +605,7 @@ export type InlineDisplayInfo = export type Int = string export interface IntegrationKey { + config: KeyConfig externalSystemName?: null | string href: string id: string @@ -561,6 +632,7 @@ export type IntegrationKeyType = | 'grafana' | 'prometheusAlertmanager' | 'site24x7' + | 'universal' export interface IntegrationKeyTypeInfo { enabled: boolean @@ -569,6 +641,28 @@ export interface IntegrationKeyTypeInfo { name: string } +export interface KeyConfig { + defaultActions: Action[] + rules: KeyRule[] + stopAtFirstRule: boolean +} + +export interface KeyRule { + actions: Action[] + conditionExpr: ExprBooleanExpression + description: string + id: string + name: string +} + +export interface KeyRuleInput { + actions: ActionInput[] + conditionExpr: ExprBooleanExpression + description: string + id?: null | string + name: string +} + export interface Label { key: string value: string @@ -671,6 +765,7 @@ export interface Mutation { updateEscalationPolicyStep: boolean updateGQLAPIKey: boolean updateHeartbeatMonitor: boolean + updateKeyConfig: boolean updateRotation: boolean updateSchedule: boolean updateScheduleTarget: boolean @@ -755,6 +850,7 @@ export interface Query { escalationPolicies: EscalationPolicyConnection escalationPolicy?: null | EscalationPolicy experimentalFlags: string[] + expr: Expr generateSlackAppManifest: string gqlAPIKeys: GQLAPIKey[] heartbeatMonitor?: null | HeartbeatMonitor @@ -1172,6 +1268,13 @@ export interface UpdateHeartbeatMonitorInput { timeoutMinutes?: null | number } +export interface UpdateKeyConfigInput { + defaultActions?: null | ActionInput[] + keyID: string + rules?: null | KeyRuleInput[] + stopAtFirstRule?: null | boolean +} + export interface UpdateRotationInput { activeUserIndex?: null | number description?: null | string diff --git a/yarn.lock b/yarn.lock index 5bcca3bf88..746fdcecf2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -41,9 +41,9 @@ __metadata: languageName: node linkType: hard -"@apollo/client@npm:3.9.5": - version: 3.9.5 - resolution: "@apollo/client@npm:3.9.5" +"@apollo/client@npm:3.10.1": + version: 3.10.1 + resolution: "@apollo/client@npm:3.10.1" dependencies: "@graphql-typed-document-node/core": ^3.1.1 "@wry/caches": ^1.0.0 @@ -53,7 +53,7 @@ __metadata: hoist-non-react-statics: ^3.3.2 optimism: ^0.18.0 prop-types: ^15.7.2 - rehackt: 0.0.5 + rehackt: ^0.1.0 response-iterator: ^0.2.6 symbol-observable: ^4.0.0 ts-invariant: ^0.10.3 @@ -74,7 +74,7 @@ __metadata: optional: true subscriptions-transport-ws: optional: true - checksum: 49ee8a0c61fb87fe295a2b0d1d279198a8a2bdf02e64291bf6c2d7c906131b3c90a08c3a9527c2f2cc6409ca67e549c761d883fc20d25091435d3097ab5b41ac + checksum: d54adac095ad182b863d3f899d68de13eb9b0da2c77cbfb3a8be8aad8aa2a1fe83ce69dfd036d015a2d68f8f8422d7dc1d90d78a4267377030207cbfe74e7781 languageName: node linkType: hard @@ -1621,15 +1621,6 @@ __metadata: languageName: node linkType: hard -"@bundled-es-modules/js-levenshtein@npm:^2.0.1": - version: 2.0.1 - resolution: "@bundled-es-modules/js-levenshtein@npm:2.0.1" - dependencies: - js-levenshtein: ^1.1.6 - checksum: 13d0cbd2b00e563e09a797559dcff8c7e208c1f71e1787535a3d248f7e3d33ef3f0809b9f498d41788ab5fd399882dcca79917d70d97921b7dde94a282c1b7d8 - languageName: node - linkType: hard - "@bundled-es-modules/statuses@npm:^1.0.1": version: 1.0.1 resolution: "@bundled-es-modules/statuses@npm:1.0.1" @@ -2777,6 +2768,51 @@ __metadata: languageName: node linkType: hard +"@inquirer/confirm@npm:^3.0.0": + version: 3.1.6 + resolution: "@inquirer/confirm@npm:3.1.6" + dependencies: + "@inquirer/core": ^8.1.0 + "@inquirer/type": ^1.3.1 + checksum: 471b9d3dc54575e00595d8f5b48e11948b1c2acddebd29dec00ab4c6809cb63f3409dc4372af076f223be0a64aa01b2f8270b69fc63c27614734efe873387206 + languageName: node + linkType: hard + +"@inquirer/core@npm:^8.1.0": + version: 8.1.0 + resolution: "@inquirer/core@npm:8.1.0" + dependencies: + "@inquirer/figures": ^1.0.1 + "@inquirer/type": ^1.3.1 + "@types/mute-stream": ^0.0.4 + "@types/node": ^20.12.7 + "@types/wrap-ansi": ^3.0.0 + ansi-escapes: ^4.3.2 + chalk: ^4.1.2 + cli-spinners: ^2.9.2 + cli-width: ^4.1.0 + mute-stream: ^1.0.0 + signal-exit: ^4.1.0 + strip-ansi: ^6.0.1 + wrap-ansi: ^6.2.0 + checksum: db959552bd31f4ff6d7e8ce1477041f85eb2e1bf2fc1bf3c94c157c066d334e6e70bb40b9a73944eb650f35b7dd7c6758e2572be43e178264e2983dd3b3ec501 + languageName: node + linkType: hard + +"@inquirer/figures@npm:^1.0.1": + version: 1.0.1 + resolution: "@inquirer/figures@npm:1.0.1" + checksum: e428dac4921c12fa65f1e2f2846f3fdb2c8ea98ef250e8758bc117d67625496bf1f844b67364e69815b6a8d9b2b0857c9864aec5aebb8a92fc3408d16ccdcc39 + languageName: node + linkType: hard + +"@inquirer/type@npm:^1.3.1": + version: 1.3.1 + resolution: "@inquirer/type@npm:1.3.1" + checksum: 171af2cabb1978b87138506b405ffb5a1112f09c04caa5bc32af16aafdb92db0711942f896d2670b27edf680aadc1816e46f42d95c998f5cd0f37bdc86272886 + languageName: node + linkType: hard + "@isaacs/cliui@npm:^8.0.2": version: 8.0.2 resolution: "@isaacs/cliui@npm:8.0.2" @@ -3257,9 +3293,9 @@ __metadata: languageName: node linkType: hard -"@mswjs/interceptors@npm:^0.25.13": - version: 0.25.15 - resolution: "@mswjs/interceptors@npm:0.25.15" +"@mswjs/interceptors@npm:^0.29.0": + version: 0.29.1 + resolution: "@mswjs/interceptors@npm:0.29.1" dependencies: "@open-draft/deferred-promise": ^2.2.0 "@open-draft/logger": ^0.3.0 @@ -3267,7 +3303,7 @@ __metadata: is-node-process: ^1.2.0 outvariant: ^1.2.1 strict-event-emitter: ^0.5.1 - checksum: dbe43f2df398bbe48ee5ea4ecf055144c9c5689218e5955b01378ea084044dab992d1b434d3533e75df044030a976402e53ec65d743c2619e024defd75ffc076 + checksum: c217f922c68024f6a8b526fb7df00bbfccb71e432bfb270322976dd40a9d312698e40bfd105b74df7aeb5a46276531a56ca5b8e3e9b0112f1577eb0d8d289e1f languageName: node linkType: hard @@ -4977,14 +5013,14 @@ __metadata: languageName: node linkType: hard -"@storybook/builder-manager@npm:8.0.0": - version: 8.0.0 - resolution: "@storybook/builder-manager@npm:8.0.0" +"@storybook/builder-manager@npm:8.0.9": + version: 8.0.9 + resolution: "@storybook/builder-manager@npm:8.0.9" dependencies: "@fal-works/esbuild-plugin-global-externals": ^2.1.2 - "@storybook/core-common": 8.0.0 - "@storybook/manager": 8.0.0 - "@storybook/node-logger": 8.0.0 + "@storybook/core-common": 8.0.9 + "@storybook/manager": 8.0.9 + "@storybook/node-logger": 8.0.9 "@types/ejs": ^3.1.1 "@yarnpkg/esbuild-plugin-pnp": ^3.0.0-rc.10 browser-assert: ^1.2.1 @@ -4995,7 +5031,7 @@ __metadata: fs-extra: ^11.1.0 process: ^0.11.10 util: ^0.12.4 - checksum: a23c79f5a167d9f855c7b10bba675fb7e133102c10978c8a9ad6cc332e93ddb79c8c0395b095434ddeb0c3d8ca543502f3171b0e8f65b10dff1dee78082bbd5b + checksum: 24aae69d41582f38d9fb25cce69ef1c752ae8adf2a779645ecff1e5f66676f15d1905cb5ee12300ec98889c4c992a6f74da858bb30019d48e72351c299a59910 languageName: node linkType: hard @@ -5089,6 +5125,19 @@ __metadata: languageName: node linkType: hard +"@storybook/channels@npm:8.0.9": + version: 8.0.9 + resolution: "@storybook/channels@npm:8.0.9" + dependencies: + "@storybook/client-logger": 8.0.9 + "@storybook/core-events": 8.0.9 + "@storybook/global": ^5.0.0 + telejson: ^7.2.0 + tiny-invariant: ^1.3.1 + checksum: 908bfcf8642696adcf450fd7106cc3fd7454cd0e5e22e2b506e26d78ef0ff180d0c6f637243ae96e4ddbfa26a65fff4ae401dea20ecf2d5ca3131f05edfd6c97 + languageName: node + linkType: hard + "@storybook/cli@npm:7.6.12": version: 7.6.12 resolution: "@storybook/cli@npm:7.6.12" @@ -5140,21 +5189,21 @@ __metadata: languageName: node linkType: hard -"@storybook/cli@npm:8.0.0": - version: 8.0.0 - resolution: "@storybook/cli@npm:8.0.0" +"@storybook/cli@npm:8.0.9": + version: 8.0.9 + resolution: "@storybook/cli@npm:8.0.9" dependencies: "@babel/core": ^7.23.0 "@babel/types": ^7.23.0 "@ndelangen/get-tarball": ^3.0.7 - "@storybook/codemod": 8.0.0 - "@storybook/core-common": 8.0.0 - "@storybook/core-events": 8.0.0 - "@storybook/core-server": 8.0.0 - "@storybook/csf-tools": 8.0.0 - "@storybook/node-logger": 8.0.0 - "@storybook/telemetry": 8.0.0 - "@storybook/types": 8.0.0 + "@storybook/codemod": 8.0.9 + "@storybook/core-common": 8.0.9 + "@storybook/core-events": 8.0.9 + "@storybook/core-server": 8.0.9 + "@storybook/csf-tools": 8.0.9 + "@storybook/node-logger": 8.0.9 + "@storybook/telemetry": 8.0.9 + "@storybook/types": 8.0.9 "@types/semver": ^7.3.4 "@yarnpkg/fslib": 2.10.3 "@yarnpkg/libzip": 2.3.0 @@ -5183,7 +5232,7 @@ __metadata: bin: getstorybook: ./bin/index.js sb: ./bin/index.js - checksum: bd00112242482d9594c1508bfa31a58bd90ca3b65ed66641e9d7b2a38d788d3b3d9807102057635dc0c4577cfd0a53a50fa9faec57d604c7a46d5cbcb6c5c910 + checksum: 40552e2da029e6b946ab88a2d15ebab7225ca06eca222fd3acf99aca1eb9d802f8b6867ce05876466d744552505dd3578b64d18411df07835d98ce864b500a93 languageName: node linkType: hard @@ -5223,6 +5272,15 @@ __metadata: languageName: node linkType: hard +"@storybook/client-logger@npm:8.0.9": + version: 8.0.9 + resolution: "@storybook/client-logger@npm:8.0.9" + dependencies: + "@storybook/global": ^5.0.0 + checksum: 71dc8037c807d0826a3a1ac99c59ff157ee066b0c7291728d0d41019bf794ce54aefed155c05a4090ebd3f8bfff074adad9b63bdac7a5ac923824645b5785020 + languageName: node + linkType: hard + "@storybook/codemod@npm:7.6.12": version: 7.6.12 resolution: "@storybook/codemod@npm:7.6.12" @@ -5245,17 +5303,17 @@ __metadata: languageName: node linkType: hard -"@storybook/codemod@npm:8.0.0": - version: 8.0.0 - resolution: "@storybook/codemod@npm:8.0.0" +"@storybook/codemod@npm:8.0.9": + version: 8.0.9 + resolution: "@storybook/codemod@npm:8.0.9" dependencies: "@babel/core": ^7.23.2 "@babel/preset-env": ^7.23.2 "@babel/types": ^7.23.0 - "@storybook/csf": ^0.1.2 - "@storybook/csf-tools": 8.0.0 - "@storybook/node-logger": 8.0.0 - "@storybook/types": 8.0.0 + "@storybook/csf": ^0.1.4 + "@storybook/csf-tools": 8.0.9 + "@storybook/node-logger": 8.0.9 + "@storybook/types": 8.0.9 "@types/cross-spawn": ^6.0.2 cross-spawn: ^7.0.3 globby: ^11.0.2 @@ -5264,7 +5322,7 @@ __metadata: prettier: ^3.1.1 recast: ^0.23.5 tiny-invariant: ^1.3.1 - checksum: 62ff67a657f23f85ab952cd95f5788fd9070d2e0f35dfafb510a693d8fa4304dc9b7f3481d1b724eb724e60bb95a2fe970954a4d691b277f8fc55a866674e3c4 + checksum: a746c71a11ad8d9902d5bf785c7b65e03d67793993ee61dfddb89be37a818e8e3439fdee82cf5a78063b0c7995002b8db53feb60fd45325b503c4bc570142c3d languageName: node linkType: hard @@ -5376,6 +5434,42 @@ __metadata: languageName: node linkType: hard +"@storybook/core-common@npm:8.0.9": + version: 8.0.9 + resolution: "@storybook/core-common@npm:8.0.9" + dependencies: + "@storybook/core-events": 8.0.9 + "@storybook/csf-tools": 8.0.9 + "@storybook/node-logger": 8.0.9 + "@storybook/types": 8.0.9 + "@yarnpkg/fslib": 2.10.3 + "@yarnpkg/libzip": 2.3.0 + chalk: ^4.1.0 + cross-spawn: ^7.0.3 + esbuild: ^0.18.0 || ^0.19.0 || ^0.20.0 + esbuild-register: ^3.5.0 + execa: ^5.0.0 + file-system-cache: 2.3.0 + find-cache-dir: ^3.0.0 + find-up: ^5.0.0 + fs-extra: ^11.1.0 + glob: ^10.0.0 + handlebars: ^4.7.7 + lazy-universal-dotenv: ^4.0.0 + node-fetch: ^2.0.0 + picomatch: ^2.3.0 + pkg-dir: ^5.0.0 + pretty-hrtime: ^1.0.3 + resolve-from: ^5.0.0 + semver: ^7.3.7 + tempy: ^1.0.1 + tiny-invariant: ^1.3.1 + ts-dedent: ^2.0.0 + util: ^0.12.4 + checksum: 14c30c0e8da3cf54f27390e87d37fabf34c31b198d2f4905dc88f306273c19d63f23d24b6cfa3b28de87479a9463151b2462c7c832b2020b6bc90072f572a585 + languageName: node + linkType: hard + "@storybook/core-events@npm:7.6.12, @storybook/core-events@npm:^7.4.2": version: 7.6.12 resolution: "@storybook/core-events@npm:7.6.12" @@ -5412,6 +5506,15 @@ __metadata: languageName: node linkType: hard +"@storybook/core-events@npm:8.0.9": + version: 8.0.9 + resolution: "@storybook/core-events@npm:8.0.9" + dependencies: + ts-dedent: ^2.0.0 + checksum: 1a6dc9defdef590e26234db0bcae06bc102b0f13a324fbf617629bb9560348e94ee62ffc03981a9300c182b79e93db38ffb271c12b1504d92ade8b99a196635e + languageName: node + linkType: hard + "@storybook/core-server@npm:7.6.12": version: 7.6.12 resolution: "@storybook/core-server@npm:7.6.12" @@ -5461,27 +5564,27 @@ __metadata: languageName: node linkType: hard -"@storybook/core-server@npm:8.0.0": - version: 8.0.0 - resolution: "@storybook/core-server@npm:8.0.0" +"@storybook/core-server@npm:8.0.9": + version: 8.0.9 + resolution: "@storybook/core-server@npm:8.0.9" dependencies: "@aw-web-design/x-default-browser": 1.4.126 "@babel/core": ^7.23.9 "@discoveryjs/json-ext": ^0.5.3 - "@storybook/builder-manager": 8.0.0 - "@storybook/channels": 8.0.0 - "@storybook/core-common": 8.0.0 - "@storybook/core-events": 8.0.0 - "@storybook/csf": ^0.1.2 - "@storybook/csf-tools": 8.0.0 + "@storybook/builder-manager": 8.0.9 + "@storybook/channels": 8.0.9 + "@storybook/core-common": 8.0.9 + "@storybook/core-events": 8.0.9 + "@storybook/csf": ^0.1.4 + "@storybook/csf-tools": 8.0.9 "@storybook/docs-mdx": 3.0.0 "@storybook/global": ^5.0.0 - "@storybook/manager": 8.0.0 - "@storybook/manager-api": 8.0.0 - "@storybook/node-logger": 8.0.0 - "@storybook/preview-api": 8.0.0 - "@storybook/telemetry": 8.0.0 - "@storybook/types": 8.0.0 + "@storybook/manager": 8.0.9 + "@storybook/manager-api": 8.0.9 + "@storybook/node-logger": 8.0.9 + "@storybook/preview-api": 8.0.9 + "@storybook/telemetry": 8.0.9 + "@storybook/types": 8.0.9 "@types/detect-port": ^1.3.0 "@types/node": ^18.0.0 "@types/pretty-hrtime": ^1.0.0 @@ -5508,7 +5611,7 @@ __metadata: util-deprecate: ^1.0.2 watchpack: ^2.2.0 ws: ^8.2.3 - checksum: 7df230bb43af2a6d6893fe458fab0b6aec6e380bb376242d538dd95baf8f96222df24b1cde8465cb5593f56c9d92ea32beed6f20581dee522cacc8e82b97fa45 + checksum: 5b5a6a3069253f0d76404e8bce70e1a0634515fcb6eb5122b5ee481bea0aa2fb155078ec7d3b5065001f49a6a3258de4d6be64ab4be9e691684670a3ec4e1543 languageName: node linkType: hard @@ -5556,6 +5659,23 @@ __metadata: languageName: node linkType: hard +"@storybook/csf-tools@npm:8.0.9": + version: 8.0.9 + resolution: "@storybook/csf-tools@npm:8.0.9" + dependencies: + "@babel/generator": ^7.23.0 + "@babel/parser": ^7.23.0 + "@babel/traverse": ^7.23.2 + "@babel/types": ^7.23.0 + "@storybook/csf": ^0.1.4 + "@storybook/types": 8.0.9 + fs-extra: ^11.1.0 + recast: ^0.23.5 + ts-dedent: ^2.0.0 + checksum: 6601dfd6ddc17b9fa365971d1296c990bbf3458e5d868d062f1cfde53047b2338266acd94ac808bb6707ba80c0c323a3b5189633ef09106e7a591a657512cdff + languageName: node + linkType: hard + "@storybook/csf@npm:^0.0.1": version: 0.0.1 resolution: "@storybook/csf@npm:0.0.1" @@ -5574,6 +5694,15 @@ __metadata: languageName: node linkType: hard +"@storybook/csf@npm:^0.1.4": + version: 0.1.5 + resolution: "@storybook/csf@npm:0.1.5" + dependencies: + type-fest: ^2.19.0 + checksum: 8504e8b89936a62f9b5710122070a9317d998a4dc06ad5e75bdc5e7d804cf2135e95e4660e3d15696637587f8094066cf6c82ce1e71e5ecda63eea7090ba9604 + languageName: node + linkType: hard + "@storybook/docs-mdx@npm:3.0.0": version: 3.0.0 resolution: "@storybook/docs-mdx@npm:3.0.0" @@ -5694,6 +5823,29 @@ __metadata: languageName: node linkType: hard +"@storybook/manager-api@npm:8.0.9": + version: 8.0.9 + resolution: "@storybook/manager-api@npm:8.0.9" + dependencies: + "@storybook/channels": 8.0.9 + "@storybook/client-logger": 8.0.9 + "@storybook/core-events": 8.0.9 + "@storybook/csf": ^0.1.4 + "@storybook/global": ^5.0.0 + "@storybook/icons": ^1.2.5 + "@storybook/router": 8.0.9 + "@storybook/theming": 8.0.9 + "@storybook/types": 8.0.9 + dequal: ^2.0.2 + lodash: ^4.17.21 + memoizerific: ^1.11.3 + store2: ^2.14.2 + telejson: ^7.2.0 + ts-dedent: ^2.0.0 + checksum: c36bc4ec171de94617f77b3f927c2db7c27fcfeb31b53b1037f5222a5b0677c3a6b6d31ae38930a37b66bf2851c684cce308d62167455d03790e3f4b0fc5327f + languageName: node + linkType: hard + "@storybook/manager@npm:7.6.12": version: 7.6.12 resolution: "@storybook/manager@npm:7.6.12" @@ -5701,10 +5853,10 @@ __metadata: languageName: node linkType: hard -"@storybook/manager@npm:8.0.0": - version: 8.0.0 - resolution: "@storybook/manager@npm:8.0.0" - checksum: 068c24ddf0237b7c8c9d1bba5b09cd1a28e46823d1ce6d58c8d5fa5bc0093554b97006877ac5b245f8032946c3a762d22850eeaba730e125a839b2fe6e5f8506 +"@storybook/manager@npm:8.0.9": + version: 8.0.9 + resolution: "@storybook/manager@npm:8.0.9" + checksum: 4ce922da824ae17fd74dab7c47f127a693c52eb88407317139ab2eba19608552165be59d7ebb6dc3b66d91b1e06ddbd229073c203b8f87219a22baa3796505d7 languageName: node linkType: hard @@ -5722,6 +5874,13 @@ __metadata: languageName: node linkType: hard +"@storybook/node-logger@npm:8.0.9": + version: 8.0.9 + resolution: "@storybook/node-logger@npm:8.0.9" + checksum: fe712d71fdc7bea8eaa46ccd8781dc7e3e39ddc1a314a7dcafcb7d3792a61a0deeeab8839c5bda4b2de7b76a2ee4ae8f54083f9f5f257f0d23ff836ffd09971d + languageName: node + linkType: hard + "@storybook/preview-api@npm:7.6.12": version: 7.6.12 resolution: "@storybook/preview-api@npm:7.6.12" @@ -5788,6 +5947,28 @@ __metadata: languageName: node linkType: hard +"@storybook/preview-api@npm:8.0.9": + version: 8.0.9 + resolution: "@storybook/preview-api@npm:8.0.9" + dependencies: + "@storybook/channels": 8.0.9 + "@storybook/client-logger": 8.0.9 + "@storybook/core-events": 8.0.9 + "@storybook/csf": ^0.1.4 + "@storybook/global": ^5.0.0 + "@storybook/types": 8.0.9 + "@types/qs": ^6.9.5 + dequal: ^2.0.2 + lodash: ^4.17.21 + memoizerific: ^1.11.3 + qs: ^6.10.0 + tiny-invariant: ^1.3.1 + ts-dedent: ^2.0.0 + util-deprecate: ^1.0.2 + checksum: c9bcca9ff5ab533bda2e2ebf81b8c55abde60cf0f699bb7834c4da5db3434c34dcbd43d95370e4ae1d5116cf1472fd41bf52f13723af433356cc23bfb36a6b96 + languageName: node + linkType: hard + "@storybook/preview@npm:8.0.0": version: 8.0.0 resolution: "@storybook/preview@npm:8.0.0" @@ -5885,6 +6066,17 @@ __metadata: languageName: node linkType: hard +"@storybook/router@npm:8.0.9": + version: 8.0.9 + resolution: "@storybook/router@npm:8.0.9" + dependencies: + "@storybook/client-logger": 8.0.9 + memoizerific: ^1.11.3 + qs: ^6.10.0 + checksum: 995fe1c871658f456c1706a4d0741d2611cda730ef7825c887e241d1546ed4ce79ec5eeadb047d8b68c3ca8338853e608914a9daff15e1a848aad9d4f66ad10f + languageName: node + linkType: hard + "@storybook/telemetry@npm:7.6.12": version: 7.6.12 resolution: "@storybook/telemetry@npm:7.6.12" @@ -5901,19 +6093,19 @@ __metadata: languageName: node linkType: hard -"@storybook/telemetry@npm:8.0.0": - version: 8.0.0 - resolution: "@storybook/telemetry@npm:8.0.0" +"@storybook/telemetry@npm:8.0.9": + version: 8.0.9 + resolution: "@storybook/telemetry@npm:8.0.9" dependencies: - "@storybook/client-logger": 8.0.0 - "@storybook/core-common": 8.0.0 - "@storybook/csf-tools": 8.0.0 + "@storybook/client-logger": 8.0.9 + "@storybook/core-common": 8.0.9 + "@storybook/csf-tools": 8.0.9 chalk: ^4.1.0 detect-package-manager: ^2.0.1 fetch-retry: ^5.0.2 fs-extra: ^11.1.0 read-pkg-up: ^7.0.1 - checksum: 028dca87d76c11c71fe1f29404fd0cd77ae2deae58a4c8db1e380e59ccb3dfc91833d4f08dc619291a4257eeb5a1d361cded6c91e5009dd416d5df267e979b78 + checksum: d38f33aca9049b11a5a8aad74281707229f40d31d3e64de763bcb7ea98eb94bfbc9ab6f7fc56882eef7d0f55aaf698d128627fc4549fbe0e3a197e38c026ebf5 languageName: node linkType: hard @@ -6002,6 +6194,26 @@ __metadata: languageName: node linkType: hard +"@storybook/theming@npm:8.0.9": + version: 8.0.9 + resolution: "@storybook/theming@npm:8.0.9" + dependencies: + "@emotion/use-insertion-effect-with-fallbacks": ^1.0.1 + "@storybook/client-logger": 8.0.9 + "@storybook/global": ^5.0.0 + memoizerific: ^1.11.3 + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + checksum: 038707b603e0b1d27d644c591d2a405e42e4097ee5af9181b567ab1e0023dc5b0a65633d15dea202d50295a582dbb97ee1bc9edb42ded4939b26eae25e610595 + languageName: node + linkType: hard + "@storybook/types@npm:7.6.12": version: 7.6.12 resolution: "@storybook/types@npm:7.6.12" @@ -6047,6 +6259,17 @@ __metadata: languageName: node linkType: hard +"@storybook/types@npm:8.0.9": + version: 8.0.9 + resolution: "@storybook/types@npm:8.0.9" + dependencies: + "@storybook/channels": 8.0.9 + "@types/express": ^4.7.0 + file-system-cache: 2.3.0 + checksum: 15510f627ee4e41e0e23973d475c033cd8933e828866d6085a9673c2e5dce48c4abaff5677cae64a7e996aec9199fa57470d8c20c1c018476b44cd89bbedb186 + languageName: node + linkType: hard + "@swc/core-darwin-arm64@npm:1.3.107": version: 1.3.107 resolution: "@swc/core-darwin-arm64@npm:1.3.107" @@ -6358,10 +6581,10 @@ __metadata: languageName: node linkType: hard -"@types/cookie@npm:^0.4.1": - version: 0.4.1 - resolution: "@types/cookie@npm:0.4.1" - checksum: 3275534ed69a76c68eb1a77d547d75f99fedc80befb75a3d1d03662fb08d697e6f8b1274e12af1a74c6896071b11510631ba891f64d30c78528d0ec45a9c1a18 +"@types/cookie@npm:^0.6.0": + version: 0.6.0 + resolution: "@types/cookie@npm:0.6.0" + checksum: 5edce7995775b0b196b142883e4d4f71fd93c294eaec973670f1fa2540b70ea7390408ed513ddefef5fcb12a578100c76596e8f2a714b0c2ae9f70ee773f4510 languageName: node linkType: hard @@ -6652,13 +6875,6 @@ __metadata: languageName: node linkType: hard -"@types/js-levenshtein@npm:^1.1.1": - version: 1.1.3 - resolution: "@types/js-levenshtein@npm:1.1.3" - checksum: eb338696da976925ea8448a42d775d7615a14323dceeb08909f187d0b3d3b4c1f67a1c36ef586b1c2318b70ab141bba8fc58311ba1c816711704605aec09db8b - languageName: node - linkType: hard - "@types/json-schema@npm:^7.0.15, @types/json-schema@npm:^7.0.9": version: 7.0.15 resolution: "@types/json-schema@npm:7.0.15" @@ -6673,7 +6889,14 @@ __metadata: languageName: node linkType: hard -"@types/lodash@npm:4.14.202, @types/lodash@npm:^4.14.167": +"@types/lodash@npm:4.17.1": + version: 4.17.1 + resolution: "@types/lodash@npm:4.17.1" + checksum: 01984d5b44c09ef45258f8ac6d0cf926900624064722d51a020ba179e5d4a293da0068fb278d87dc695586afe7ebd3362ec57f5c0e7c4f6c1fab9d04a80e77f5 + languageName: node + linkType: hard + +"@types/lodash@npm:^4.14.167": version: 4.14.202 resolution: "@types/lodash@npm:4.14.202" checksum: a91acf3564a568c6f199912f3eb2c76c99c5a0d7e219394294213b3f2d54f672619f0fde4da22b29dc5d4c31457cd799acc2e5cb6bd90f9af04a1578483b6ff7 @@ -6738,6 +6961,15 @@ __metadata: languageName: node linkType: hard +"@types/mute-stream@npm:^0.0.4": + version: 0.0.4 + resolution: "@types/mute-stream@npm:0.0.4" + dependencies: + "@types/node": "*" + checksum: af8d83ad7b68ea05d9357985daf81b6c9b73af4feacb2f5c2693c7fd3e13e5135ef1bd083ce8d5bdc8e97acd28563b61bb32dec4e4508a8067fcd31b8a098632 + languageName: node + linkType: hard + "@types/node-fetch@npm:^2.6.4": version: 2.6.11 resolution: "@types/node-fetch@npm:2.6.11" @@ -6775,6 +7007,15 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:^20.12.7": + version: 20.12.11 + resolution: "@types/node@npm:20.12.11" + dependencies: + undici-types: ~5.26.4 + checksum: 0cc06bb69cd8150e96fcf65fa3d7f2eeebedf110a99e1834a7fa55bd6c04e7b6d73f74321a2acfc569ca300c0b88d8e1b702ce245b3802f6e5f6a8987fef451a + languageName: node + linkType: hard + "@types/normalize-package-data@npm:^2.4.0": version: 2.4.4 resolution: "@types/normalize-package-data@npm:2.4.4" @@ -6958,10 +7199,10 @@ __metadata: languageName: node linkType: hard -"@types/statuses@npm:^2.0.1": - version: 2.0.4 - resolution: "@types/statuses@npm:2.0.4" - checksum: 3a806c3b96d1845e3e7441fbf0839037e95f717334760ddb7c29223c9a34a7206b68e2998631f89f1a1e3ef5b67b15652f6e8fa14987ebd7f6d38587c1bffd18 +"@types/statuses@npm:^2.0.4": + version: 2.0.5 + resolution: "@types/statuses@npm:2.0.5" + checksum: 3f2609f660b45a878c6782f2fb2cef9f08bbd4e89194bf7512e747b8a73b056839be1ad6f64b1353765528cd8a5e93adeffc471cde24d0d9f7b528264e7154e5 languageName: node linkType: hard @@ -7018,6 +7259,13 @@ __metadata: languageName: node linkType: hard +"@types/wrap-ansi@npm:^3.0.0": + version: 3.0.0 + resolution: "@types/wrap-ansi@npm:3.0.0" + checksum: 492f0610093b5802f45ca292777679bb9b381f1f32ae939956dd9e00bf81dba7cc99979687620a2817d9a7d8b59928207698166c47a0861c6a2e5c30d4aaf1e9 + languageName: node + linkType: hard + "@types/yargs-parser@npm:*": version: 21.0.3 resolution: "@types/yargs-parser@npm:21.0.3" @@ -7564,7 +7812,7 @@ __metadata: languageName: node linkType: hard -"ansi-escapes@npm:^4.2.1, ansi-escapes@npm:^4.3.0": +"ansi-escapes@npm:^4.2.1, ansi-escapes@npm:^4.3.0, ansi-escapes@npm:^4.3.2": version: 4.3.2 resolution: "ansi-escapes@npm:4.3.2" dependencies: @@ -8706,7 +8954,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^4.0.0, chalk@npm:^4.0.2, chalk@npm:^4.1.0, chalk@npm:^4.1.1, chalk@npm:^4.1.2": +"chalk@npm:^4.0.0, chalk@npm:^4.0.2, chalk@npm:^4.1.0, chalk@npm:^4.1.2": version: 4.1.2 resolution: "chalk@npm:4.1.2" dependencies: @@ -8772,13 +9020,6 @@ __metadata: languageName: node linkType: hard -"chardet@npm:^0.7.0": - version: 0.7.0 - resolution: "chardet@npm:0.7.0" - checksum: 6fd5da1f5d18ff5712c1e0aed41da200d7c51c28f11b36ee3c7b483f3696dabc08927fc6b227735eb8f0e1215c9a8abd8154637f3eff8cada5959df7f58b024d - languageName: node - linkType: hard - "check-error@npm:^1.0.3": version: 1.0.3 resolution: "check-error@npm:1.0.3" @@ -8795,7 +9036,7 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:^3.4.2, chokidar@npm:^3.5.3": +"chokidar@npm:^3.5.3": version: 3.5.3 resolution: "chokidar@npm:3.5.3" dependencies: @@ -8900,7 +9141,7 @@ __metadata: languageName: node linkType: hard -"cli-spinners@npm:^2.5.0": +"cli-spinners@npm:^2.5.0, cli-spinners@npm:^2.9.2": version: 2.9.2 resolution: "cli-spinners@npm:2.9.2" checksum: 1bd588289b28432e4676cb5d40505cfe3e53f2e4e10fbe05c8a710a154d6fe0ce7836844b00d6858f740f2ffe67cdc36e0fce9c7b6a8430e80e6388d5aa4956c @@ -8930,10 +9171,10 @@ __metadata: languageName: node linkType: hard -"cli-width@npm:^3.0.0": - version: 3.0.0 - resolution: "cli-width@npm:3.0.0" - checksum: 4c94af3769367a70e11ed69aa6095f1c600c0ff510f3921ab4045af961820d57c0233acfa8b6396037391f31b4c397e1f614d234294f979ff61430a6c166c3f6 +"cli-width@npm:^4.1.0": + version: 4.1.0 + resolution: "cli-width@npm:4.1.0" + checksum: 0a79cff2dbf89ef530bcd54c713703ba94461457b11e5634bd024c78796ed21401e32349c004995954e06f442d82609287e7aabf6a5f02c919a1cf3b9b6854ff languageName: node linkType: hard @@ -10176,13 +10417,13 @@ __metadata: linkType: hard "ejs@npm:^3.1.8": - version: 3.1.9 - resolution: "ejs@npm:3.1.9" + version: 3.1.10 + resolution: "ejs@npm:3.1.10" dependencies: jake: ^10.8.5 bin: ejs: bin/cli.js - checksum: af6f10eb815885ff8a8cfacc42c6b6cf87daf97a4884f87a30e0c3271fedd85d76a3a297d9c33a70e735b97ee632887f85e32854b9cdd3a2d97edf931519a35f + checksum: ce90637e9c7538663ae023b8a7a380b2ef7cc4096de70be85abf5a3b9641912dde65353211d05e24d56b1f242d71185c6d00e02cb8860701d571786d92c71f05 languageName: node linkType: hard @@ -11144,22 +11385,23 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-prettier@npm:5.0.0": - version: 5.0.0 - resolution: "eslint-plugin-prettier@npm:5.0.0" +"eslint-plugin-prettier@npm:5.1.3": + version: 5.1.3 + resolution: "eslint-plugin-prettier@npm:5.1.3" dependencies: prettier-linter-helpers: ^1.0.0 - synckit: ^0.8.5 + synckit: ^0.8.6 peerDependencies: "@types/eslint": ">=8.0.0" eslint: ">=8.0.0" + eslint-config-prettier: "*" prettier: ">=3.0.0" peerDependenciesMeta: "@types/eslint": optional: true eslint-config-prettier: optional: true - checksum: 84e88744b9050f2d5ef31b94e85294dda16f3a53c2449f9d33eac8ae6264889b459bf35a68e438fb6b329c2a1d6491aac4bfa00d86317e7009de3dad0311bec6 + checksum: eb2a7d46a1887e1b93788ee8f8eb81e0b6b2a6f5a66a62bc6f375b033fc4e7ca16448da99380be800042786e76cf5c0df9c87a51a2c9b960ed47acbd7c0b9381 languageName: node linkType: hard @@ -11172,12 +11414,12 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react-hooks@npm:4.6.0": - version: 4.6.0 - resolution: "eslint-plugin-react-hooks@npm:4.6.0" +"eslint-plugin-react-hooks@npm:4.6.2": + version: 4.6.2 + resolution: "eslint-plugin-react-hooks@npm:4.6.2" peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 - checksum: 23001801f14c1d16bf0a837ca7970d9dd94e7b560384b41db378b49b6e32dc43d6e2790de1bd737a652a86f81a08d6a91f402525061b47719328f586a57e86c3 + checksum: 395c433610f59577cfcf3f2e42bcb130436c8a0b3777ac64f441d88c5275f4fcfc89094cedab270f2822daf29af1079151a7a6579a8e9ea8cee66540ba0384c4 languageName: node linkType: hard @@ -11623,17 +11865,6 @@ __metadata: languageName: node linkType: hard -"external-editor@npm:^3.0.3": - version: 3.1.0 - resolution: "external-editor@npm:3.1.0" - dependencies: - chardet: ^0.7.0 - iconv-lite: ^0.4.24 - tmp: ^0.0.33 - checksum: 1c2a616a73f1b3435ce04030261bed0e22d4737e14b090bb48e58865da92529c9f2b05b893de650738d55e692d071819b45e1669259b2b354bc3154d27a698c7 - languageName: node - linkType: hard - "extglob@npm:^2.0.4": version: 2.0.4 resolution: "extglob@npm:2.0.4" @@ -11784,7 +12015,7 @@ __metadata: languageName: node linkType: hard -"figures@npm:^3.0.0, figures@npm:^3.2.0": +"figures@npm:^3.2.0": version: 3.2.0 resolution: "figures@npm:3.2.0" dependencies: @@ -12493,7 +12724,22 @@ __metadata: languageName: node linkType: hard -"glob@npm:10.3.10, glob@npm:^10.0.0, glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7": +"glob@npm:10.3.14": + version: 10.3.14 + resolution: "glob@npm:10.3.14" + dependencies: + foreground-child: ^3.1.0 + jackspeak: ^2.3.6 + minimatch: ^9.0.1 + minipass: ^7.0.4 + path-scurry: ^1.11.0 + bin: + glob: dist/esm/bin.mjs + checksum: 6fb26013e6ee1cc0fe099c746f5870783612082342eeeca80031446ca8839acc13243015056e4f3158d7c4260d32f37ff1c2aad9c273672ed0911c8262316041 + languageName: node + linkType: hard + +"glob@npm:^10.0.0, glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7": version: 10.3.10 resolution: "glob@npm:10.3.10" dependencies: @@ -12935,10 +13181,10 @@ __metadata: languageName: node linkType: hard -"headers-polyfill@npm:^4.0.1": - version: 4.0.2 - resolution: "headers-polyfill@npm:4.0.2" - checksum: a95280ed58df429fc86c4f49b21596be3ea3f5f3d790e7d75238668df9b90b292f15a968c7c19ae1db88c0ae036dd1bf363a71b8e771199d82848e2d8b3c6c2e +"headers-polyfill@npm:^4.0.2": + version: 4.0.3 + resolution: "headers-polyfill@npm:4.0.3" + checksum: 382efe88575362f9f343f813a9df5131cec23129121111c55fb1151fb6dc87d963a820412fc95ff9cbc3016149de0714211dfa5d5914020ed92a69f014f66600 languageName: node linkType: hard @@ -13141,7 +13387,7 @@ __metadata: languageName: node linkType: hard -"iconv-lite@npm:0.4.24, iconv-lite@npm:^0.4.24": +"iconv-lite@npm:0.4.24": version: 0.4.24 resolution: "iconv-lite@npm:0.4.24" dependencies: @@ -13247,29 +13493,6 @@ __metadata: languageName: node linkType: hard -"inquirer@npm:^8.2.0": - version: 8.2.6 - resolution: "inquirer@npm:8.2.6" - dependencies: - ansi-escapes: ^4.2.1 - chalk: ^4.1.1 - cli-cursor: ^3.1.0 - cli-width: ^3.0.0 - external-editor: ^3.0.3 - figures: ^3.0.0 - lodash: ^4.17.21 - mute-stream: 0.0.8 - ora: ^5.4.1 - run-async: ^2.4.0 - rxjs: ^7.5.5 - string-width: ^4.1.0 - strip-ansi: ^6.0.0 - through: ^2.3.6 - wrap-ansi: ^6.0.1 - checksum: 387ffb0a513559cc7414eb42c57556a60e302f820d6960e89d376d092e257a919961cd485a1b4de693dbb5c0de8bc58320bfd6247dfd827a873aa82a4215a240 - languageName: node - linkType: hard - "internal-slot@npm:^1.0.4, internal-slot@npm:^1.0.5": version: 1.0.6 resolution: "internal-slot@npm:1.0.6" @@ -14080,7 +14303,7 @@ __metadata: languageName: node linkType: hard -"jackspeak@npm:^2.3.5": +"jackspeak@npm:^2.3.5, jackspeak@npm:^2.3.6": version: 2.3.6 resolution: "jackspeak@npm:2.3.6" dependencies: @@ -14711,13 +14934,6 @@ __metadata: languageName: node linkType: hard -"js-levenshtein@npm:^1.1.6": - version: 1.1.6 - resolution: "js-levenshtein@npm:1.1.6" - checksum: 409f052a7f1141be4058d97da7860e08efd97fc588b7a4c5cfa0548bc04f6d576644dae65ab630266dff685d56fb90d494e03d4d79cb484c287746b4f1bf0694 - languageName: node - linkType: hard - "js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": version: 4.0.0 resolution: "js-tokens@npm:4.0.0" @@ -15276,6 +15492,13 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^10.2.0": + version: 10.2.2 + resolution: "lru-cache@npm:10.2.2" + checksum: 98e8fc93691c546f719a76103ef2bee5a3ac823955c755a47641ec41f8c7fafa1baeaba466937cc1cbfa9cfd47e03536d10e2db3158a64ad91ff3a58a32c893e + languageName: node + linkType: hard + "lru-cache@npm:^5.1.1": version: 5.1.1 resolution: "lru-cache@npm:5.1.1" @@ -16300,6 +16523,13 @@ __metadata: languageName: node linkType: hard +"minipass@npm:^7.0.4": + version: 7.1.1 + resolution: "minipass@npm:7.1.1" + checksum: d2c461947a7530f93de4162aa3ca0a1bed1f121626906f6ec63a5ba05fd7b1d9bee4fe89a37a43db7241c2416be98a799c1796abae583c7180be37be5c392ef6 + languageName: node + linkType: hard + "minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": version: 2.1.2 resolution: "minizlib@npm:2.1.2" @@ -16402,46 +16632,42 @@ __metadata: languageName: node linkType: hard -"msw@npm:2.0.11": - version: 2.0.11 - resolution: "msw@npm:2.0.11" +"msw@npm:2.3.0": + version: 2.3.0 + resolution: "msw@npm:2.3.0" dependencies: "@bundled-es-modules/cookie": ^2.0.0 - "@bundled-es-modules/js-levenshtein": ^2.0.1 "@bundled-es-modules/statuses": ^1.0.1 + "@inquirer/confirm": ^3.0.0 "@mswjs/cookies": ^1.1.0 - "@mswjs/interceptors": ^0.25.13 + "@mswjs/interceptors": ^0.29.0 "@open-draft/until": ^2.1.0 - "@types/cookie": ^0.4.1 - "@types/js-levenshtein": ^1.1.1 - "@types/statuses": ^2.0.1 + "@types/cookie": ^0.6.0 + "@types/statuses": ^2.0.4 chalk: ^4.1.2 - chokidar: ^3.4.2 graphql: ^16.8.1 - headers-polyfill: ^4.0.1 - inquirer: ^8.2.0 + headers-polyfill: ^4.0.2 is-node-process: ^1.2.0 - js-levenshtein: ^1.1.6 - outvariant: ^1.4.0 + outvariant: ^1.4.2 path-to-regexp: ^6.2.0 - strict-event-emitter: ^0.5.0 - type-fest: ^2.19.0 - yargs: ^17.3.1 + strict-event-emitter: ^0.5.1 + type-fest: ^4.9.0 + yargs: ^17.7.2 peerDependencies: - typescript: ">= 4.7.x <= 5.2.x" + typescript: ">= 4.7.x" peerDependenciesMeta: typescript: optional: true bin: msw: cli/index.js - checksum: a87175f53e3b510dfdfb16e11f2b0d399a9859ce1f249a70741045ce6325b3512075878921d4bd30ad6cb0789cd6fc4f9eac5db68ae425777e96ad208285242d + checksum: 1b6e9e94f3c3f32f1c5bbdb619dac1c46adc7012e1c3131ab3936817cc7734b6b3cae5cca8947422a84f7b9e6393b5fe44dd174fd2d52d1fc0a0e1fc616a356b languageName: node linkType: hard -"mute-stream@npm:0.0.8": - version: 0.0.8 - resolution: "mute-stream@npm:0.0.8" - checksum: ff48d251fc3f827e5b1206cda0ffdaec885e56057ee86a3155e1951bc940fd5f33531774b1cc8414d7668c10a8907f863f6561875ee6e8768931a62121a531a1 +"mute-stream@npm:^1.0.0": + version: 1.0.0 + resolution: "mute-stream@npm:1.0.0" + checksum: 36fc968b0e9c9c63029d4f9dc63911950a3bdf55c9a87f58d3a266289b67180201cade911e7699f8b2fa596b34c9db43dad37649e3f7fdd13c3bb9edb0017ee7 languageName: node linkType: hard @@ -16946,13 +17172,6 @@ __metadata: languageName: node linkType: hard -"os-tmpdir@npm:~1.0.2": - version: 1.0.2 - resolution: "os-tmpdir@npm:1.0.2" - checksum: 5666560f7b9f10182548bf7013883265be33620b1c1b4a4d405c25be2636f970c5488ff3e6c48de75b55d02bde037249fe5dbfbb4c0fb7714953d56aed062e6d - languageName: node - linkType: hard - "ospath@npm:^1.2.2": version: 1.2.2 resolution: "ospath@npm:1.2.2" @@ -16960,7 +17179,7 @@ __metadata: languageName: node linkType: hard -"outvariant@npm:^1.2.1, outvariant@npm:^1.4.0": +"outvariant@npm:^1.2.1, outvariant@npm:^1.4.0, outvariant@npm:^1.4.2": version: 1.4.2 resolution: "outvariant@npm:1.4.2" checksum: 5d9e2b3edb1cc8be9cbfc1c8c97e8b05137c4384bbfc56e0a465de26c5d2f023e65732ddcda9d46599b06d667fbc0de32c30d2ecd11f6f3f43bcf8ce0d320918 @@ -17180,6 +17399,16 @@ __metadata: languageName: node linkType: hard +"path-scurry@npm:^1.11.0": + version: 1.11.0 + resolution: "path-scurry@npm:1.11.0" + dependencies: + lru-cache: ^10.2.0 + minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 + checksum: 79732c6a4d989846632d3ff8a441fabb8ea197ecdc7f328ea0f1694d611ed9bd3f0c940582d91c7dd108a29898866212a359d1a9b92ca69c4dbb16ebeae86b73 + languageName: node + linkType: hard + "path-to-regexp@npm:0.1.7": version: 0.1.7 resolution: "path-to-regexp@npm:0.1.7" @@ -18086,13 +18315,13 @@ __metadata: languageName: node linkType: hard -"react-virtualized-auto-sizer@npm:1.0.20": - version: 1.0.20 - resolution: "react-virtualized-auto-sizer@npm:1.0.20" +"react-virtualized-auto-sizer@npm:1.0.24": + version: 1.0.24 + resolution: "react-virtualized-auto-sizer@npm:1.0.24" peerDependencies: - react: ^15.3.0 || ^16.0.0-alpha || ^17.0.0 || ^18.0.0-rc - react-dom: ^15.3.0 || ^16.0.0-alpha || ^17.0.0 || ^18.0.0-rc - checksum: 2c616ec7587de64a46aa8c6c301e75fee87eb7a39013f25d940b0fe95eee5e8a8a3c109923e241b427752d71fba80f44cd2c8557750967df0777d99ebd16ba24 + react: ^15.3.0 || ^16.0.0-alpha || ^17.0.0 || ^18.0.0 + react-dom: ^15.3.0 || ^16.0.0-alpha || ^17.0.0 || ^18.0.0 + checksum: e7d98563735dabbd1c58727c9d3e9f08f6a60a9964d25507cf4ef08f8964b6e421491c892ee0a99e47630118fdca42f1c60cef15ebda3659face58025dba3e98 languageName: node linkType: hard @@ -18367,9 +18596,9 @@ __metadata: languageName: node linkType: hard -"rehackt@npm:0.0.5": - version: 0.0.5 - resolution: "rehackt@npm:0.0.5" +"rehackt@npm:^0.1.0": + version: 0.1.0 + resolution: "rehackt@npm:0.1.0" peerDependencies: "@types/react": "*" react: "*" @@ -18378,7 +18607,7 @@ __metadata: optional: true react: optional: true - checksum: 0ece2c9d55541ba6fbafacd1dd9c7676df725a64f3f6ffdf64ce7ff765b0724b60cf27502c389bf09766ba0997c6f22ab1c2da82b96b9820e8d3c3159f3c2595 + checksum: 2c3bcd72524bf47672640265e79cba785e0e6837b9b385ccb0a3ea7d00f55a439d9aed3e0ae71e991d88e0d4b2b3158457c92e75fff5ebf99cd46e280068ddeb languageName: node linkType: hard @@ -18804,7 +19033,7 @@ __metadata: version: 0.0.0-use.local resolution: "root-workspace-0b6124@workspace:." dependencies: - "@apollo/client": 3.9.5 + "@apollo/client": 3.10.1 "@babel/core": 7.24.0 "@babel/plugin-transform-modules-commonjs": 7.23.3 "@dnd-kit/core": 6.0.8 @@ -18834,7 +19063,7 @@ __metadata: "@types/diff": 5.0.8 "@types/glob": 8.1.0 "@types/jest": 29.5.12 - "@types/lodash": 4.14.202 + "@types/lodash": 4.17.1 "@types/luxon": 3.4.2 "@types/node": 20.11.30 "@types/prop-types": 15.7.11 @@ -18864,13 +19093,13 @@ __metadata: eslint-plugin-jsx-a11y: 6.8.0 eslint-plugin-n: 16.6.2 eslint-plugin-node: 11.1.0 - eslint-plugin-prettier: 5.0.0 + eslint-plugin-prettier: 5.1.3 eslint-plugin-promise: 6.1.1 eslint-plugin-react: 7.34.1 - eslint-plugin-react-hooks: 4.6.0 + eslint-plugin-react-hooks: 4.6.2 eslint-plugin-storybook: 0.8.0 fuse.js: 7.0.0 - glob: 10.3.10 + glob: 10.3.14 graphiql: 3.0.10 graphql: 16.8.1 http-server: 14.1.1 @@ -18879,7 +19108,7 @@ __metadata: luxon: 3.4.4 mdast-util-find-and-replace: 3.0.1 mdi-material-ui: 7.8.0 - msw: 2.0.11 + msw: 2.3.0 msw-storybook-addon: 2.0.0--canary.122.06f0c92.0 prettier: 3.2.5 prettier-plugin-go-template: 0.0.15 @@ -18896,7 +19125,7 @@ __metadata: react-markdown: 9.0.1 react-redux: 8.1.3 react-transition-group: 4.4.5 - react-virtualized-auto-sizer: 1.0.20 + react-virtualized-auto-sizer: 1.0.24 recharts: 2.9.2 redux: 4.2.1 redux-devtools-extension: 2.13.9 @@ -18904,10 +19133,10 @@ __metadata: remark-breaks: 4.0.0 remark-gfm: 4.0.0 semver: 7.6.0 - storybook: 8.0.0 + storybook: 8.0.9 storybook-addon-mock: 4.3.0 stylelint: 16.2.1 - stylelint-config-standard: 34.0.0 + stylelint-config-standard: 36.0.0 typescript: 5.2.2 urql: 4.0.6 vite: 5.1.7 @@ -18928,13 +19157,6 @@ __metadata: languageName: node linkType: hard -"run-async@npm:^2.4.0": - version: 2.4.1 - resolution: "run-async@npm:2.4.1" - checksum: a2c88aa15df176f091a2878eb840e68d0bdee319d8d97bbb89112223259cebecb94bc0defd735662b83c2f7a30bed8cddb7d1674eb48ae7322dc602b22d03797 - languageName: node - linkType: hard - "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" @@ -18944,7 +19166,7 @@ __metadata: languageName: node linkType: hard -"rxjs@npm:^7.5.1, rxjs@npm:^7.5.5, rxjs@npm:^7.8.1": +"rxjs@npm:^7.5.1, rxjs@npm:^7.8.1": version: 7.8.1 resolution: "rxjs@npm:7.8.1" dependencies: @@ -19667,15 +19889,15 @@ __metadata: languageName: node linkType: hard -"storybook@npm:8.0.0": - version: 8.0.0 - resolution: "storybook@npm:8.0.0" +"storybook@npm:8.0.9": + version: 8.0.9 + resolution: "storybook@npm:8.0.9" dependencies: - "@storybook/cli": 8.0.0 + "@storybook/cli": 8.0.9 bin: sb: ./index.js storybook: ./index.js - checksum: 07bcb01e72ebb35276746326065045263fd958f94248c8c5fff6e6675147647eebeb89cffd5d42959ed88c970450f97f9d2ab05236a934848b71ab5021c6fe86 + checksum: 8d586b58c7ac69578320d50e853850797d1b50508f88b1a4350d30683bb1e0b97494cee5a253782bbe0fdf366ffac270c337b05abbaeed3adb4515a89ce8b127 languageName: node linkType: hard @@ -19698,7 +19920,7 @@ __metadata: languageName: node linkType: hard -"strict-event-emitter@npm:^0.5.0, strict-event-emitter@npm:^0.5.1": +"strict-event-emitter@npm:^0.5.1": version: 0.5.1 resolution: "strict-event-emitter@npm:0.5.1" checksum: 350480431bc1c28fdb601ef4976c2f8155fc364b4740f9692dd03e5bdd48aafc99a5e021fe655fbd986d0b803e9f3fc5c4b018b35cb838c4690d60f2a26f1cf3 @@ -19948,23 +20170,23 @@ __metadata: languageName: node linkType: hard -"stylelint-config-recommended@npm:^13.0.0": - version: 13.0.0 - resolution: "stylelint-config-recommended@npm:13.0.0" +"stylelint-config-recommended@npm:^14.0.0": + version: 14.0.0 + resolution: "stylelint-config-recommended@npm:14.0.0" peerDependencies: - stylelint: ^15.10.0 - checksum: a56eb6d1a7c7f3a7a172b54bc34218859ba22a5a06816fb4d0964f66cb83cf372062f2c97830e994ad68243548e15fc49abf28887c3261ab1b471b3aa69f8e82 + stylelint: ^16.0.0 + checksum: 36511115b06d9f51aa0edc05f6064a7aae98cc990da14dd03629951f63a029d9e66a4d5b1ca678cce699e24413a62c2cd608cc07413ca5026f9680ddb8993858 languageName: node linkType: hard -"stylelint-config-standard@npm:34.0.0": - version: 34.0.0 - resolution: "stylelint-config-standard@npm:34.0.0" +"stylelint-config-standard@npm:36.0.0": + version: 36.0.0 + resolution: "stylelint-config-standard@npm:36.0.0" dependencies: - stylelint-config-recommended: ^13.0.0 + stylelint-config-recommended: ^14.0.0 peerDependencies: - stylelint: ^15.10.0 - checksum: 536249800c04b48a9c354067765f042713982e8222be17bb897a27d26546e50adfb87e6f1e4541807d720de3554345da99ab470e13e8d7ab0ab326c73ae3df61 + stylelint: ^16.1.0 + checksum: 78b14cdfdd03be409687acc863ef88d0e79d9a7f7ab3a9158e7dcd74212893db24841d22f076f248f3b1b6419d778538a5c885dc42fc056eaeb240463edf2f8f languageName: node linkType: hard @@ -20088,7 +20310,7 @@ __metadata: languageName: node linkType: hard -"synckit@npm:^0.8.5": +"synckit@npm:^0.8.6": version: 0.8.8 resolution: "synckit@npm:0.8.8" dependencies: @@ -20230,7 +20452,7 @@ __metadata: languageName: node linkType: hard -"through@npm:^2.3.6, through@npm:^2.3.8": +"through@npm:^2.3.8": version: 2.3.8 resolution: "through@npm:2.3.8" checksum: a38c3e059853c494af95d50c072b83f8b676a9ba2818dcc5b108ef252230735c54e0185437618596c790bbba8fcdaef5b290405981ffa09dce67b1f1bf190cbd @@ -20265,15 +20487,6 @@ __metadata: languageName: node linkType: hard -"tmp@npm:^0.0.33": - version: 0.0.33 - resolution: "tmp@npm:0.0.33" - dependencies: - os-tmpdir: ~1.0.2 - checksum: 902d7aceb74453ea02abbf58c203f4a8fc1cead89b60b31e354f74ed5b3fb09ea817f94fb310f884a5d16987dd9fa5a735412a7c2dd088dd3d415aa819ae3a28 - languageName: node - linkType: hard - "tmp@npm:~0.2.1": version: 0.2.1 resolution: "tmp@npm:0.2.1" @@ -20563,6 +20776,13 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^4.9.0": + version: 4.18.2 + resolution: "type-fest@npm:4.18.2" + checksum: 2e9272b2b97b2f4ea2bbffda43cfce9ca89c474ad7c9565e39b80fee2ce609ea60385faffbbef98994b38feb3fa5fa38feb33acf175f4f85ee21d1773e87bf44 + languageName: node + linkType: hard + "type-is@npm:~1.6.18": version: 1.6.18 resolution: "type-is@npm:1.6.18" @@ -21526,7 +21746,7 @@ __metadata: languageName: node linkType: hard -"wrap-ansi@npm:^6.0.1, wrap-ansi@npm:^6.2.0": +"wrap-ansi@npm:^6.2.0": version: 6.2.0 resolution: "wrap-ansi@npm:6.2.0" dependencies: