From 26deeab8c4fda6f857c47e4c40542dc208b5c1a9 Mon Sep 17 00:00:00 2001 From: Kyle <kyle@opslevel.com> Date: Tue, 28 Jan 2025 15:21:35 -0600 Subject: [PATCH] Code Gen v2 (#509) * generate Go structs of graphql API objects (#499) * generate Go structs of graphql API objects * temp limit objects generated, add mapping for field types * generate first objects, update tests * generate most objects starting with A-C, update tests * generate unions (#505) * generate unions * drop unused TagOwner enums * union tpl clean up * First pass at having codegen come from the client-gen repo * Objects WIP * Objects WIP pt 2 * Objects WIP pt 3 * Objects WIP pt 4 * latest codegen * adjust for component types APIs * lint fix --------- Co-authored-by: David Bloss <david@opslevel.com> --- .../unreleased/Feature-20250127-091051.yaml | 3 + .../unreleased/Feature-20250127-091116.yaml | 3 + .../unreleased/Feature-20250127-100537.yaml | 4 + .../unreleased/Refactor-20250127-084043.yaml | 3 + .../unreleased/Refactor-20250127-084159.yaml | 4 + .../unreleased/Refactor-20250127-100442.yaml | 4 + .../unreleased/Refactor-20250127-102513.yaml | 3 + .../unreleased/Refactor-20250127-133514.yaml | 3 + actions.go | 36 +- actions_test.go | 19 +- alert_source.go | 21 +- alert_source_test.go | 6 +- aliases.go | 4 +- cache_test.go | 6 +- category.go | 11 +- category_test.go | 12 +- check.go | 9 +- check_manual.go | 8 - check_test.go | 12 +- common.go | 18 +- common_test.go | 4 +- component.go | 26 +- dependencies.go | 4 +- document.go | 7 +- document_test.go | 6 +- domain.go | 21 +- domain_test.go | 4 +- enum.go | 40 +- filters.go | 26 +- filters_test.go | 20 +- infra.go | 28 +- infra_test.go | 12 +- input.go | 1848 +++++++++-------- integration.go | 30 +- integration_test.go | 4 +- job.go | 10 +- level.go | 14 +- lifecycle.go | 8 - maturity_test.go | 4 +- object.go | 481 +++++ owner.go | 4 - predicate.go | 5 - property.go | 14 +- property_test.go | 6 +- repository.go | 26 +- scorecards.go | 30 +- scorecards_test.go | 6 +- secrets.go | 13 +- secrets_test.go | 4 +- service.go | 12 +- service_test.go | 58 +- system.go | 21 +- system_test.go | 22 +- tags.go | 21 +- team.go | 36 +- templates/objects.tpl | 9 + templates/unions.tpl | 40 + testdata/templates/custom_actions.tpl | 4 +- testdata/templates/query/service/get.tpl | 4 +- testdata/templates/query/system/get.tpl | 8 +- testdata/templates/scorecards.tpl | 8 +- tier.go | 8 - tools.go | 16 +- tools_test.go | 4 +- union.go | 56 + user.go | 20 +- 66 files changed, 1815 insertions(+), 1426 deletions(-) create mode 100644 .changes/unreleased/Feature-20250127-091051.yaml create mode 100644 .changes/unreleased/Feature-20250127-091116.yaml create mode 100644 .changes/unreleased/Feature-20250127-100537.yaml create mode 100644 .changes/unreleased/Refactor-20250127-084043.yaml create mode 100644 .changes/unreleased/Refactor-20250127-084159.yaml create mode 100644 .changes/unreleased/Refactor-20250127-100442.yaml create mode 100644 .changes/unreleased/Refactor-20250127-102513.yaml create mode 100644 .changes/unreleased/Refactor-20250127-133514.yaml create mode 100644 object.go create mode 100644 templates/objects.tpl create mode 100644 templates/unions.tpl create mode 100644 union.go diff --git a/.changes/unreleased/Feature-20250127-091051.yaml b/.changes/unreleased/Feature-20250127-091051.yaml new file mode 100644 index 00000000..3641ce48 --- /dev/null +++ b/.changes/unreleased/Feature-20250127-091051.yaml @@ -0,0 +1,3 @@ +kind: Feature +body: '''metadata'' field has been added to AlertSource struct' +time: 2025-01-27T09:10:51.188114-06:00 diff --git a/.changes/unreleased/Feature-20250127-091116.yaml b/.changes/unreleased/Feature-20250127-091116.yaml new file mode 100644 index 00000000..593d5917 --- /dev/null +++ b/.changes/unreleased/Feature-20250127-091116.yaml @@ -0,0 +1,3 @@ +kind: Feature +body: '''description'' field has been added to Category struct' +time: 2025-01-27T09:11:16.749514-06:00 diff --git a/.changes/unreleased/Feature-20250127-100537.yaml b/.changes/unreleased/Feature-20250127-100537.yaml new file mode 100644 index 00000000..f2336434 --- /dev/null +++ b/.changes/unreleased/Feature-20250127-100537.yaml @@ -0,0 +1,4 @@ +kind: Feature +body: Struct 'Scorecard' has been updated to match all the fields possible in the + API +time: 2025-01-27T10:05:37.765025-06:00 diff --git a/.changes/unreleased/Refactor-20250127-084043.yaml b/.changes/unreleased/Refactor-20250127-084043.yaml new file mode 100644 index 00000000..4735ed02 --- /dev/null +++ b/.changes/unreleased/Refactor-20250127-084043.yaml @@ -0,0 +1,3 @@ +kind: Refactor +body: 'BREAKING CHANGE: ''OpsLevelErrors'' has been renamed to ''Error''' +time: 2025-01-27T08:40:43.269477-06:00 diff --git a/.changes/unreleased/Refactor-20250127-084159.yaml b/.changes/unreleased/Refactor-20250127-084159.yaml new file mode 100644 index 00000000..64236464 --- /dev/null +++ b/.changes/unreleased/Refactor-20250127-084159.yaml @@ -0,0 +1,4 @@ +kind: Refactor +body: 'BREAKING CHANGE: Struct ''GoogleCloudProject'' fields `ID` and `URL` are now + `Id` and `Url` respectively' +time: 2025-01-27T08:41:59.292959-06:00 diff --git a/.changes/unreleased/Refactor-20250127-100442.yaml b/.changes/unreleased/Refactor-20250127-100442.yaml new file mode 100644 index 00000000..37eedb5d --- /dev/null +++ b/.changes/unreleased/Refactor-20250127-100442.yaml @@ -0,0 +1,4 @@ +kind: Refactor +body: Field 'ChecksCount' has been renamed to 'TotalChecks' on the struct 'Scorecard' + to match the API definition +time: 2025-01-27T10:04:42.935235-06:00 diff --git a/.changes/unreleased/Refactor-20250127-102513.yaml b/.changes/unreleased/Refactor-20250127-102513.yaml new file mode 100644 index 00000000..d1ac265b --- /dev/null +++ b/.changes/unreleased/Refactor-20250127-102513.yaml @@ -0,0 +1,3 @@ +kind: Refactor +body: Field 'ID' on struct 'Secret' has been renamed to 'Id' for consistency +time: 2025-01-27T10:25:13.727106-06:00 diff --git a/.changes/unreleased/Refactor-20250127-133514.yaml b/.changes/unreleased/Refactor-20250127-133514.yaml new file mode 100644 index 00000000..9142bcae --- /dev/null +++ b/.changes/unreleased/Refactor-20250127-133514.yaml @@ -0,0 +1,3 @@ +kind: Refactor +body: 'BREAKING CHANGE: struct ''OpsLevelWarnings'' was renamed to ''Warning''' +time: 2025-01-27T13:35:14.183763-06:00 diff --git a/actions.go b/actions.go index d6e2c679..91867c68 100644 --- a/actions.go +++ b/actions.go @@ -9,28 +9,6 @@ type CustomActionsId struct { Id ID `graphql:"id"` } -type CustomActionsWebhookAction struct { - Headers JSON `graphql:"headers" scalar:"true"` - HTTPMethod CustomActionsHttpMethodEnum `graphql:"httpMethod"` - WebhookURL string `graphql:"webhookUrl"` -} - -type CustomActionsTriggerDefinition struct { - Action CustomActionsId `graphql:"action"` - Aliases []string `graphql:"aliases"` - Description string `graphql:"description"` - Filter FilterId `graphql:"filter"` - Id ID `graphql:"id"` - ManualInputsDefinition string `graphql:"manualInputsDefinition"` - Name string `graphql:"name"` - Owner TeamId `graphql:"owner"` - Published bool `graphql:"published"` - Timestamps Timestamps `graphql:"timestamps"` - AccessControl CustomActionsTriggerDefinitionAccessControlEnum `graphql:"accessControl"` - ResponseTemplate string `graphql:"responseTemplate"` - EntityType CustomActionsEntityTypeEnum `graphql:"entityType"` -} - func (customActionsTriggerDefinition *CustomActionsTriggerDefinition) ExtendedTeamAccess(client *Client, variables *PayloadVariables) (*TeamConnection, error) { var q struct { Account struct { @@ -80,7 +58,7 @@ func (client *Client) CreateWebhookAction(input CustomActionsWebhookActionCreate var m struct { Payload struct { WebhookAction CustomActionsExternalAction - Errors []OpsLevelErrors + Errors []Error } `graphql:"customActionsWebhookActionCreate(input: $input)"` } v := PayloadVariables{ @@ -100,7 +78,7 @@ func (client *Client) GetCustomAction(input string) (*CustomActionsExternalActio "input": *NewIdentifier(input), } err := client.Query(&q, v, WithName("ExternalActionGet")) - if q.Account.Action.Id == "" { + if q.Account.Action.CustomActionsId.Id == "" { err = fmt.Errorf("CustomActionsExternalAction with ID or Alias matching '%s' not found", input) } return &q.Account.Action, HandleErrors(err, nil) @@ -134,7 +112,7 @@ func (client *Client) UpdateWebhookAction(input CustomActionsWebhookActionUpdate var m struct { Payload struct { WebhookAction CustomActionsExternalAction - Errors []OpsLevelErrors + Errors []Error } `graphql:"customActionsWebhookActionUpdate(input: $input)"` } v := PayloadVariables{ @@ -147,7 +125,7 @@ func (client *Client) UpdateWebhookAction(input CustomActionsWebhookActionUpdate func (client *Client) DeleteWebhookAction(input string) error { var m struct { Payload struct { - Errors []OpsLevelErrors `graphql:"errors"` + Errors []Error `graphql:"errors"` } `graphql:"customActionsWebhookActionDelete(resource: $input)"` } v := PayloadVariables{ @@ -161,7 +139,7 @@ func (client *Client) CreateTriggerDefinition(input CustomActionsTriggerDefiniti var m struct { Payload struct { TriggerDefinition CustomActionsTriggerDefinition - Errors []OpsLevelErrors + Errors []Error } `graphql:"customActionsTriggerDefinitionCreate(input: $input)"` } if input.AccessControl == nil { @@ -222,7 +200,7 @@ func (client *Client) UpdateTriggerDefinition(input CustomActionsTriggerDefiniti var m struct { Payload struct { TriggerDefinition CustomActionsTriggerDefinition - Errors []OpsLevelErrors + Errors []Error } `graphql:"customActionsTriggerDefinitionUpdate(input: $input)"` } v := PayloadVariables{ @@ -235,7 +213,7 @@ func (client *Client) UpdateTriggerDefinition(input CustomActionsTriggerDefiniti func (client *Client) DeleteTriggerDefinition(input string) error { var m struct { Payload struct { - Errors []OpsLevelErrors `graphql:"errors"` + Errors []Error `graphql:"errors"` } `graphql:"customActionsTriggerDefinitionDelete(resource: $input)"` } v := PayloadVariables{ diff --git a/actions_test.go b/actions_test.go index 9021bae7..4b7a35ac 100644 --- a/actions_test.go +++ b/actions_test.go @@ -38,12 +38,12 @@ func TestCreateWebhookAction(t *testing.T) { func TestListCustomActions(t *testing.T) { // Arrange testRequestOne := autopilot.NewTestRequest( - `query ExternalActionList($after:String!$first:Int!){account{customActionsExternalActions(after: $after, first: $first){nodes{aliases,id,description,liquidTemplate,name,... on CustomActionsWebhookAction{headers,httpMethod,webhookUrl}},{{ template "pagination_request" }},totalCount}}}`, + `query ExternalActionList($after:String!$first:Int!){account{customActionsExternalActions(after: $after, first: $first){nodes{{ template "custom_actions_request" }},{{ template "pagination_request" }},totalCount}}}`, `{{ template "pagination_initial_query_variables" }}`, `{ "data": { "account": { "customActionsExternalActions": { "nodes": [ { {{ template "custom_action1_response" }} }, { {{ template "custom_action2_response" }} } ], {{ template "pagination_initial_pageInfo_response" }}, "totalCount": 2 }}}}`, ) testRequestTwo := autopilot.NewTestRequest( - `query ExternalActionList($after:String!$first:Int!){account{customActionsExternalActions(after: $after, first: $first){nodes{aliases,id,description,liquidTemplate,name,... on CustomActionsWebhookAction{headers,httpMethod,webhookUrl}},{{ template "pagination_request" }},totalCount}}}`, + `query ExternalActionList($after:String!$first:Int!){account{customActionsExternalActions(after: $after, first: $first){nodes{{ template "custom_actions_request" }},{{ template "pagination_request" }},totalCount}}}`, `{{ template "pagination_second_query_variables" }}`, `{ "data": { "account": { "customActionsExternalActions": { "nodes": [ { {{ template "custom_action3_response" }} } ], {{ template "pagination_second_pageInfo_response" }}, "totalCount": 1 }}}}`, ) @@ -224,12 +224,12 @@ func TestGetTriggerDefinition(t *testing.T) { func TestListTriggerDefinitions(t *testing.T) { // Arrange testRequestOne := autopilot.NewTestRequest( - `query TriggerDefinitionList($after:String!$first:Int!){account{customActionsTriggerDefinitions(after: $after, first: $first){nodes{action{aliases,id},aliases,description,filter{id,name},id,manualInputsDefinition,name,owner{alias,id},published,timestamps{createdAt,updatedAt},accessControl,responseTemplate,entityType},{{ template "pagination_request" }},totalCount}}}`, + `query TriggerDefinitionList($after:String!$first:Int!){account{customActionsTriggerDefinitions(after: $after, first: $first){nodes{{ template "custom_actions_trigger_request" }},{{ template "pagination_request" }},totalCount}}}`, `{{ template "pagination_initial_query_variables" }}`, `{ "data": { "account": { "customActionsTriggerDefinitions": { "nodes": [ { {{ template "custom_action_trigger1_response" }} }, { {{ template "custom_action_trigger2_response" }} } ], {{ template "pagination_initial_pageInfo_response" }}, "totalCount": 2 }}}}`, ) testRequestTwo := autopilot.NewTestRequest( - `query TriggerDefinitionList($after:String!$first:Int!){account{customActionsTriggerDefinitions(after: $after, first: $first){nodes{action{aliases,id},aliases,description,filter{id,name},id,manualInputsDefinition,name,owner{alias,id},published,timestamps{createdAt,updatedAt},accessControl,responseTemplate,entityType},{{ template "pagination_request" }},totalCount}}}`, + `query TriggerDefinitionList($after:String!$first:Int!){account{customActionsTriggerDefinitions(after: $after, first: $first){nodes{{ template "custom_actions_trigger_request" }},{{ template "pagination_request" }},totalCount}}}`, `{{ template "pagination_second_query_variables" }}`, `{ "data": { "account": { "customActionsTriggerDefinitions": { "nodes": [ { {{ template "custom_action_trigger3_response" }} } ], {{ template "pagination_second_pageInfo_response" }}, "totalCount": 1 }}}}`, ) @@ -316,10 +316,11 @@ func TestUpdateTriggerDefinition3(t *testing.T) { func TestDeleteTriggerDefinition(t *testing.T) { // Arrange - request := `{"query": - "mutation TriggerDefinitionDelete($input:IdentifierInput!){customActionsTriggerDefinitionDelete(resource: $input){errors{message,path}}}", - {"input":{"alias":"123456789"}} - }` + request := autopilot.NewTestRequest( + `mutation TriggerDefinitionDelete($input:IdentifierInput!){customActionsTriggerDefinitionDelete(resource: $input){errors{message,path}}}`, + `{"input":{"alias":"123456789"}}`, + `{"data": {"customActionsTriggerDefinitionDelete": { "errors": [{{ template "error1" }}] }}}`, + ) testRequest := autopilot.NewTestRequest( `mutation TriggerDefinitionDelete($input:IdentifierInput!){customActionsTriggerDefinitionDelete(resource: $input){errors{message,path}}}`, @@ -334,7 +335,7 @@ func TestDeleteTriggerDefinition(t *testing.T) { client := BestTestClient(t, "custom_actions/delete_trigger", testRequest) clientErr := BestTestClient(t, "custom_actions/delete_trigger_err", testRequestError) - clientErr2 := ABetterTestClient(t, "custom_actions/delete_trigger_err2", request, "") + clientErr2 := BestTestClient(t, "custom_actions/delete_trigger_err2", request) // Act err := client.DeleteTriggerDefinition("123456789") err2 := clientErr.DeleteTriggerDefinition("123456789") diff --git a/alert_source.go b/alert_source.go index 19cabb17..601572d0 100644 --- a/alert_source.go +++ b/alert_source.go @@ -1,22 +1,5 @@ package opslevel -type AlertSource struct { - Description string `graphql:"description"` - ExternalId string `graphql:"externalId"` - Id ID `graphql:"id"` - Integration IntegrationId `graphql:"integration"` - Name string `graphql:"name"` - Type AlertSourceTypeEnum `graphql:"type"` - Url string `graphql:"url"` -} - -type AlertSourceService struct { - AlertSource AlertSource `graphql:"alertSource"` - Id ID `graphql:"id"` - Service ServiceId `graphql:"service"` - Status AlertSourceStatusTypeEnum `graphql:"status"` -} - type AlertSourceDeleteInput struct { Id ID `json:"id"` } @@ -33,7 +16,7 @@ func (client *Client) CreateAlertSourceService(input AlertSourceServiceCreateInp var m struct { Payload struct { AlertSourceService AlertSourceService - Errors []OpsLevelErrors + Errors []Error } `graphql:"alertSourceServiceCreate(input: $input)"` } v := PayloadVariables{ @@ -74,7 +57,7 @@ func (client *Client) GetAlertSource(id ID) (*AlertSource, error) { func (client *Client) DeleteAlertSourceService(id ID) error { var m struct { Payload struct { - Errors []OpsLevelErrors + Errors []Error } `graphql:"alertSourceServiceDelete(input: $input)"` } v := PayloadVariables{ diff --git a/alert_source_test.go b/alert_source_test.go index cbecccb2..14f5b77f 100644 --- a/alert_source_test.go +++ b/alert_source_test.go @@ -10,7 +10,7 @@ import ( func TestCreateAlertSourceService(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `mutation AlertSourceServiceCreate($input:AlertSourceServiceCreateInput!){alertSourceServiceCreate(input: $input){alertSourceService{alertSource{description,externalId,id,integration{id,name,type},name,type,url},id,service{id,aliases},status},errors{message,path}}}`, + `mutation AlertSourceServiceCreate($input:AlertSourceServiceCreateInput!){alertSourceServiceCreate(input: $input){alertSourceService{alertSource{description,externalId,id,integration{id,name,type},metadata,name,type,url},id,service{id,aliases},status},errors{message,path}}}`, `{"input": { "alertSourceExternalIdentifier": { "externalId": "QWERTY", "type": "datadog" }, "service": { "alias": "example" }}}`, `{"data": { "alertSourceServiceCreate": { "alertSourceService": { "service": { "aliases": ["example"] }}}}}`, ) @@ -28,7 +28,7 @@ func TestCreateAlertSourceService(t *testing.T) { func TestGetAlertSourceWithExternalIdentifier(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `query AlertSourceGet($externalIdentifier:AlertSourceExternalIdentifier!){account{alertSource(externalIdentifier: $externalIdentifier){description,externalId,id,integration{id,name,type},name,type,url}}}`, + `query AlertSourceGet($externalIdentifier:AlertSourceExternalIdentifier!){account{alertSource(externalIdentifier: $externalIdentifier){description,externalId,id,integration{id,name,type},metadata,name,type,url}}}`, `{"externalIdentifier": { "type": "datadog", "externalId": "12345678" }}`, `{"data": { "account": { @@ -64,7 +64,7 @@ func TestGetAlertSourceWithExternalIdentifier(t *testing.T) { func TestGetAlertSource(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `query AlertSourceGet($id:ID!){account{alertSource(id: $id){description,externalId,id,integration{id,name,type},name,type,url}}}`, + `query AlertSourceGet($id:ID!){account{alertSource(id: $id){description,externalId,id,integration{id,name,type},metadata,name,type,url}}}`, `{"id": "Z2lkOi8vb3BzbGV2ZWwvQWxlcnRTb3VyY2VzOjpQYWdlcmR1dHkvNjE" }`, `{"data": { "account": { diff --git a/aliases.go b/aliases.go index 029394b3..41f6d9bf 100644 --- a/aliases.go +++ b/aliases.go @@ -64,7 +64,7 @@ func (client *Client) CreateAlias(input AliasCreateInput) ([]string, error) { Payload struct { Aliases []string OwnerId string - Errors []OpsLevelErrors + Errors []Error } `graphql:"aliasCreate(input: $input)"` } v := PayloadVariables{ @@ -118,7 +118,7 @@ func (client *Client) DeleteAlias(input AliasDeleteInput) error { var m struct { Payload struct { Alias string `graphql:"deletedAlias"` - Errors []OpsLevelErrors + Errors []Error } `graphql:"aliasDelete(input: $input)"` } v := PayloadVariables{ diff --git a/cache_test.go b/cache_test.go index a71f284c..b9328bc7 100644 --- a/cache_test.go +++ b/cache_test.go @@ -20,7 +20,7 @@ func TestCache(t *testing.T) { `{"data":{"account":{ "lifecycles":[{{ template "lifecycle_1" }}] }}}`, ) testRequestThree := autopilot.NewTestRequest( - `query SystemsList($after:String!$first:Int!){account{systems(after: $after, first: $first){nodes{id,aliases,managedAliases,name,description,htmlUrl,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}},note},{{ template "pagination_request" }}}}}`, + `query SystemsList($after:String!$first:Int!){account{systems(after: $after, first: $first){nodes{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}}},{{ template "pagination_request" }}}}}`, `{ "after": "", "first": 100 }`, `{"data":{"account":{ "systems":{ "nodes":[{{ template "system1_response" }}] } }}}`, ) @@ -30,7 +30,7 @@ func TestCache(t *testing.T) { `{"data":{"account":{ "teams":{ "nodes":[{{ template "team_1" }}] } }}}`, ) testRequestFive := autopilot.NewTestRequest( - `query CategoryList($after:String!$first:Int!){account{rubric{categories(after: $after, first: $first){nodes{id,name},{{ template "pagination_request" }},totalCount}}}}`, + `query CategoryList($after:String!$first:Int!){account{rubric{categories(after: $after, first: $first){nodes{description,id,name},{{ template "pagination_request" }},totalCount}}}}`, `{ "after": "", "first": 100 }`, `{"data":{"account":{"rubric":{ "categories":{ "nodes":[{{ template "category_1" }}] } }}}}`, ) @@ -40,7 +40,7 @@ func TestCache(t *testing.T) { `{"data":{"account":{"rubric":{ "levels":{ "nodes":[{{ template "level_1" }}] } }}}}`, ) testRequestSeven := autopilot.NewTestRequest( - `query FilterList($after:String!$first:Int!){account{filters(after: $after, first: $first){nodes{id,name,connective,htmlUrl,predicates{key,keyData,type,value,caseSensitive}},{{ template "pagination_request" }},totalCount}}}`, + `query FilterList($after:String!$first:Int!){account{filters(after: $after, first: $first){nodes{id,name,connective,htmlUrl,predicates{caseSensitive,key,keyData,type,value}},{{ template "pagination_request" }},totalCount}}}`, `{ "after": "", "first": 100 }`, `{"data":{"account":{ "filters":{ "nodes":[{{ template "filter_1" }}] } }}}`, ) diff --git a/category.go b/category.go index c09aeb7d..53add733 100644 --- a/category.go +++ b/category.go @@ -7,11 +7,6 @@ import ( "github.com/hasura/go-graphql-client" ) -type Category struct { - Id ID `json:"id"` - Name string -} - type CategoryConnection struct { Nodes []Category PageInfo PageInfo @@ -26,7 +21,7 @@ func (client *Client) CreateCategory(input CategoryCreateInput) (*Category, erro var m struct { Payload struct { Category Category - Errors []OpsLevelErrors + Errors []Error } `graphql:"categoryCreate(input: $input)"` } v := PayloadVariables{ @@ -86,7 +81,7 @@ func (client *Client) UpdateCategory(input CategoryUpdateInput) (*Category, erro var m struct { Payload struct { Category Category - Errors []OpsLevelErrors + Errors []Error } `graphql:"categoryUpdate(input: $input)"` } v := PayloadVariables{ @@ -100,7 +95,7 @@ func (client *Client) DeleteCategory(id ID) error { var m struct { Payload struct { Id ID `graphql:"deletedCategoryId"` - Errors []OpsLevelErrors + Errors []Error } `graphql:"categoryDelete(input: $input)"` } v := PayloadVariables{ diff --git a/category_test.go b/category_test.go index 0b4e21bc..d54be9f4 100644 --- a/category_test.go +++ b/category_test.go @@ -10,7 +10,7 @@ import ( func TestCreateRubricCategory(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `mutation CategoryCreate($input:CategoryCreateInput!){categoryCreate(input: $input){category{id,name},errors{message,path}}}`, + `mutation CategoryCreate($input:CategoryCreateInput!){categoryCreate(input: $input){category{description,id,name},errors{message,path}}}`, `{ "input": { "name": "Kyle" }}`, `{"data": { "categoryCreate": { "category": { {{ template "id1" }}, "name": "Kyle" }, "errors": [] } }}`, ) @@ -27,7 +27,7 @@ func TestCreateRubricCategory(t *testing.T) { func TestGetRubricCategory(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `query CategoryGet($id:ID!){account{category(id: $id){id,name}}}`, + `query CategoryGet($id:ID!){account{category(id: $id){description,id,name}}}`, `{ {{ template "id2" }} }`, `{"data": { "account": { "category": { {{ template "id3" }}, "name": "Reliability" } }}}`, ) @@ -43,7 +43,7 @@ func TestGetRubricCategory(t *testing.T) { func TestGetMissingRubricCategory(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `query CategoryGet($id:ID!){account{category(id: $id){id,name}}}`, + `query CategoryGet($id:ID!){account{category(id: $id){description,id,name}}}`, `{ {{ template "id1" }} }`, `{"data": { "account": { "category": null }}}`, ) @@ -57,12 +57,12 @@ func TestGetMissingRubricCategory(t *testing.T) { func TestListRubricCategories(t *testing.T) { // Arrange testRequestOne := autopilot.NewTestRequest( - `query CategoryList($after:String!$first:Int!){account{rubric{categories(after: $after, first: $first){nodes{id,name},{{ template "pagination_request" }},totalCount}}}}`, + `query CategoryList($after:String!$first:Int!){account{rubric{categories(after: $after, first: $first){nodes{description,id,name},{{ template "pagination_request" }},totalCount}}}}`, `{{ template "pagination_initial_query_variables" }}`, `{ "data": { "account": { "rubric": { "categories": { "nodes": [ { {{ template "rubric_categories_response1" }} }, { {{ template "rubric_categories_response2" }} } ], {{ template "pagination_initial_pageInfo_response" }}, "totalCount": 2 }}}}}`, ) testRequestTwo := autopilot.NewTestRequest( - `query CategoryList($after:String!$first:Int!){account{rubric{categories(after: $after, first: $first){nodes{id,name},{{ template "pagination_request" }},totalCount}}}}`, + `query CategoryList($after:String!$first:Int!){account{rubric{categories(after: $after, first: $first){nodes{description,id,name},{{ template "pagination_request" }},totalCount}}}}`, `{{ template "pagination_second_query_variables" }}`, `{ "data": { "account": { "rubric": { "categories": { "nodes": [ { {{ template "rubric_categories_response3" }} } ], {{ template "pagination_second_pageInfo_response" }}, "totalCount": 1 }}}}}`, ) @@ -85,7 +85,7 @@ func TestListRubricCategories(t *testing.T) { func TestUpdateRubricCategory(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `mutation CategoryUpdate($input:CategoryUpdateInput!){categoryUpdate(input: $input){category{id,name},errors{message,path}}}`, + `mutation CategoryUpdate($input:CategoryUpdateInput!){categoryUpdate(input: $input){category{description,id,name},errors{message,path}}}`, `{ "input": { {{ template "id4" }}, "name": "Emily" }}`, `{"data": { "categoryUpdate": { "category": { {{ template "id4" }}, "name": "Emily" }, "errors": [] }}}`, ) diff --git a/check.go b/check.go index f3a78845..3be7594a 100644 --- a/check.go +++ b/check.go @@ -10,11 +10,6 @@ import ( "github.com/relvacode/iso8601" ) -type CheckOwner struct { - Team TeamId `graphql:"... on Team"` - // User User `graphql:"... on User"` // TODO: will this be public? -} - type CheckInputConstructor func() any var CheckCreateConstructors = map[CheckType]CheckInputConstructor{ @@ -135,7 +130,7 @@ func NewCheckUpdateInputTypeOf[T any](checkUpdateInput CheckUpdateInput) *T { // CheckResponsePayload encompasses CheckCreatePayload and CheckUpdatePayload into 1 struct type CheckResponsePayload struct { Check Check - Errors []OpsLevelErrors + Errors []Error } func (client *Client) CreateCheck(input any) (*Check, error) { @@ -271,7 +266,7 @@ func (client *Client) UpdateCheck(input any) (*Check, error) { func (client *Client) DeleteCheck(id ID) error { var m struct { Payload struct { - Errors []OpsLevelErrors + Errors []Error } `graphql:"checkDelete(input: $input)"` } v := PayloadVariables{ diff --git a/check_manual.go b/check_manual.go index fa4284e8..a29ee290 100644 --- a/check_manual.go +++ b/check_manual.go @@ -1,18 +1,10 @@ package opslevel -import "github.com/relvacode/iso8601" - type ManualCheckFragment struct { UpdateFrequency *ManualCheckFrequency `graphql:"updateFrequency"` // The minimum frequency of the updates. UpdateRequiresComment bool `graphql:"updateRequiresComment"` // Whether the check requires a comment or not. } -type ManualCheckFrequency struct { - FrequencyTimeScale FrequencyTimeScale `graphql:"frequencyTimeScale"` - FrequencyValue int `graphql:"frequencyValue"` - StartingDate iso8601.Time `graphql:"startingDate"` -} - func NewManualCheckFrequencyInput(startingDate string, timeScale FrequencyTimeScale, value int) *ManualCheckFrequencyInput { return &ManualCheckFrequencyInput{ StartingDate: NewISO8601Date(startingDate), diff --git a/check_test.go b/check_test.go index 067c991d..19fc6534 100644 --- a/check_test.go +++ b/check_test.go @@ -94,11 +94,11 @@ func BuildCheckMutation(name string, style RequestStyle) string { text := TrimGraphQLString(`mutation Check[% .Name %][% .Style %]($input:Check[% .Name %][% .Style %]Input!){ check[% .Name %][% .Style %](input: $input){ check{ - category{id,name}, + category{description,id,name}, description, enableOn, enabled, - filter{id,name,connective,htmlUrl,predicates{key,keyData,type,value,caseSensitive}}, + filter{id,name,connective,htmlUrl,predicates{caseSensitive,key,keyData,type,value}}, id, level{alias,description,id,index,name}, name, @@ -1033,7 +1033,7 @@ func getCheckTestCases() map[string]TmpCheckTestCase { }, "GetCheck": { fixture: autopilot.NewTestRequest( - `query CheckGet($id:ID!){account{check(id: $id){category{id,name},description,enableOn,enabled,filter{id,name,connective,htmlUrl,predicates{key,keyData,type,value,caseSensitive}},id,level{alias,description,id,index,name},name,notes: rawNotes,owner{... on Team{alias,id}},type,... on AlertSourceUsageCheck{alertSourceNamePredicate{type,value},alertSourceType},... on CodeIssueCheck{constraint,issueName,issueType,maxAllowed,resolutionTime{unit,value},severity},... on CustomEventCheck{integration{id,name,type},passPending,resultMessage,serviceSelector,successCondition},... on HasRecentDeployCheck{days},... on ManualCheck{updateFrequency{frequencyTimeScale,frequencyValue,startingDate},updateRequiresComment},... on RepositoryFileCheck{directorySearch,fileContentsPredicate{type,value},filePaths,useAbsoluteRoot},... on RepositoryGrepCheck{directorySearch,fileContentsPredicate{type,value},filePaths},... on RepositorySearchCheck{fileContentsPredicate{type,value},fileExtensions},... on ServiceOwnershipCheck{contactMethod,requireContactMethod,tagKey,tagPredicate{type,value}},... on ServicePropertyCheck{serviceProperty,propertyDefinition{aliases,allowedInConfigFiles,id,name,description,displaySubtype,displayType,propertyDisplayStatus,schema},propertyValuePredicate{type,value}},... on TagDefinedCheck{tagKey,tagPredicate{type,value}},... on ToolUsageCheck{environmentPredicate{type,value},toolCategory,toolNamePredicate{type,value},toolUrlPredicate{type,value}},... on HasDocumentationCheck{documentSubtype,documentType},... on PackageVersionCheck{missingPackageResult,packageConstraint,packageManager,packageName,packageNameIsRegex,versionConstraintPredicate{type,value}}}}}`, + `query CheckGet($id:ID!){account{check(id: $id){category{description,id,name},description,enableOn,enabled,filter{id,name,connective,htmlUrl,predicates{caseSensitive,key,keyData,type,value}},id,level{alias,description,id,index,name},name,notes: rawNotes,owner{... on Team{alias,id}},type,... on AlertSourceUsageCheck{alertSourceNamePredicate{type,value},alertSourceType},... on CodeIssueCheck{constraint,issueName,issueType,maxAllowed,resolutionTime{unit,value},severity},... on CustomEventCheck{integration{id,name,type},passPending,resultMessage,serviceSelector,successCondition},... on HasRecentDeployCheck{days},... on ManualCheck{updateFrequency{frequencyTimeScale,frequencyValue,startingDate},updateRequiresComment},... on RepositoryFileCheck{directorySearch,fileContentsPredicate{type,value},filePaths,useAbsoluteRoot},... on RepositoryGrepCheck{directorySearch,fileContentsPredicate{type,value},filePaths},... on RepositorySearchCheck{fileContentsPredicate{type,value},fileExtensions},... on ServiceOwnershipCheck{contactMethod,requireContactMethod,tagKey,tagPredicate{type,value}},... on ServicePropertyCheck{serviceProperty,propertyDefinition{aliases,allowedInConfigFiles,id,name,description,displaySubtype,displayType,propertyDisplayStatus,schema},propertyValuePredicate{type,value}},... on TagDefinedCheck{tagKey,tagPredicate{type,value}},... on ToolUsageCheck{environmentPredicate{type,value},toolCategory,toolNamePredicate{type,value},toolUrlPredicate{type,value}},... on HasDocumentationCheck{documentSubtype,documentType},... on PackageVersionCheck{missingPackageResult,packageConstraint,packageManager,packageName,packageNameIsRegex,versionConstraintPredicate{type,value}}}}}`, `{ "id": "Z2lkOi8vb3BzbGV2ZWwvMTIzNDU2" }`, `{ "data": { "account": { "check": { "category": { "id": "Z2lkOi8vb3BzbGV2ZWwvMTIzNDU2", "name": "Performance" }, "description": "Requires a JSON payload to be sent to the integration endpoint to complete a check for the service.", "enabled": true, "filter": null, "id": "Z2lkOi8vb3BzbGV2ZWwvMTIzNDU2", "level": { "alias": "bronze", "description": "Services in this level satisfy critical checks. This is the minimum standard to ship to production.", "id": "Z2lkOi8vb3BzbGV2ZWwvMTIzNDU2", "index": 1, "name": "Bronze" }, "name": "Hello World", "notes": null } } } }`, ), @@ -1105,12 +1105,12 @@ func TestCanUpdateNotesToNull(t *testing.T) { func TestListChecks(t *testing.T) { // Arrange testRequestOne := autopilot.NewTestRequest( - `query CheckList($after:String!$first:Int!){account{rubric{checks(after: $after, first: $first){nodes{category{id,name},description,enableOn,enabled,filter{id,name,connective,htmlUrl,predicates{key,keyData,type,value,caseSensitive}},id,level{alias,description,id,index,name},name,notes: rawNotes,owner{... on Team{alias,id}},type,... on AlertSourceUsageCheck{alertSourceNamePredicate{type,value},alertSourceType},... on CodeIssueCheck{constraint,issueName,issueType,maxAllowed,resolutionTime{unit,value},severity},... on CustomEventCheck{integration{id,name,type},passPending,resultMessage,serviceSelector,successCondition},... on HasRecentDeployCheck{days},... on ManualCheck{updateFrequency{frequencyTimeScale,frequencyValue,startingDate},updateRequiresComment},... on RepositoryFileCheck{directorySearch,fileContentsPredicate{type,value},filePaths,useAbsoluteRoot},... on RepositoryGrepCheck{directorySearch,fileContentsPredicate{type,value},filePaths},... on RepositorySearchCheck{fileContentsPredicate{type,value},fileExtensions},... on ServiceOwnershipCheck{contactMethod,requireContactMethod,tagKey,tagPredicate{type,value}},... on ServicePropertyCheck{serviceProperty,propertyDefinition{aliases,allowedInConfigFiles,id,name,description,displaySubtype,displayType,propertyDisplayStatus,schema},propertyValuePredicate{type,value}},... on TagDefinedCheck{tagKey,tagPredicate{type,value}},... on ToolUsageCheck{environmentPredicate{type,value},toolCategory,toolNamePredicate{type,value},toolUrlPredicate{type,value}},... on HasDocumentationCheck{documentSubtype,documentType},... on PackageVersionCheck{missingPackageResult,packageConstraint,packageManager,packageName,packageNameIsRegex,versionConstraintPredicate{type,value}}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}`, + `query CheckList($after:String!$first:Int!){account{rubric{checks(after: $after, first: $first){nodes{category{description,id,name},description,enableOn,enabled,filter{id,name,connective,htmlUrl,predicates{caseSensitive,key,keyData,type,value}},id,level{alias,description,id,index,name},name,notes: rawNotes,owner{... on Team{alias,id}},type,... on AlertSourceUsageCheck{alertSourceNamePredicate{type,value},alertSourceType},... on CodeIssueCheck{constraint,issueName,issueType,maxAllowed,resolutionTime{unit,value},severity},... on CustomEventCheck{integration{id,name,type},passPending,resultMessage,serviceSelector,successCondition},... on HasRecentDeployCheck{days},... on ManualCheck{updateFrequency{frequencyTimeScale,frequencyValue,startingDate},updateRequiresComment},... on RepositoryFileCheck{directorySearch,fileContentsPredicate{type,value},filePaths,useAbsoluteRoot},... on RepositoryGrepCheck{directorySearch,fileContentsPredicate{type,value},filePaths},... on RepositorySearchCheck{fileContentsPredicate{type,value},fileExtensions},... on ServiceOwnershipCheck{contactMethod,requireContactMethod,tagKey,tagPredicate{type,value}},... on ServicePropertyCheck{serviceProperty,propertyDefinition{aliases,allowedInConfigFiles,id,name,description,displaySubtype,displayType,propertyDisplayStatus,schema},propertyValuePredicate{type,value}},... on TagDefinedCheck{tagKey,tagPredicate{type,value}},... on ToolUsageCheck{environmentPredicate{type,value},toolCategory,toolNamePredicate{type,value},toolUrlPredicate{type,value}},... on HasDocumentationCheck{documentSubtype,documentType},... on PackageVersionCheck{missingPackageResult,packageConstraint,packageManager,packageName,packageNameIsRegex,versionConstraintPredicate{type,value}}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}`, `{{ template "pagination_initial_query_variables" }}`, `{ "data": { "account": { "rubric": { "checks": { "nodes": [ { {{ template "common_check_response" }} }, { {{ template "metrics_tool_check" }} } ], {{ template "pagination_initial_pageInfo_response" }}, "totalCount": 2 }}}}}`, ) testRequestTwo := autopilot.NewTestRequest( - `query CheckList($after:String!$first:Int!){account{rubric{checks(after: $after, first: $first){nodes{category{id,name},description,enableOn,enabled,filter{id,name,connective,htmlUrl,predicates{key,keyData,type,value,caseSensitive}},id,level{alias,description,id,index,name},name,notes: rawNotes,owner{... on Team{alias,id}},type,... on AlertSourceUsageCheck{alertSourceNamePredicate{type,value},alertSourceType},... on CodeIssueCheck{constraint,issueName,issueType,maxAllowed,resolutionTime{unit,value},severity},... on CustomEventCheck{integration{id,name,type},passPending,resultMessage,serviceSelector,successCondition},... on HasRecentDeployCheck{days},... on ManualCheck{updateFrequency{frequencyTimeScale,frequencyValue,startingDate},updateRequiresComment},... on RepositoryFileCheck{directorySearch,fileContentsPredicate{type,value},filePaths,useAbsoluteRoot},... on RepositoryGrepCheck{directorySearch,fileContentsPredicate{type,value},filePaths},... on RepositorySearchCheck{fileContentsPredicate{type,value},fileExtensions},... on ServiceOwnershipCheck{contactMethod,requireContactMethod,tagKey,tagPredicate{type,value}},... on ServicePropertyCheck{serviceProperty,propertyDefinition{aliases,allowedInConfigFiles,id,name,description,displaySubtype,displayType,propertyDisplayStatus,schema},propertyValuePredicate{type,value}},... on TagDefinedCheck{tagKey,tagPredicate{type,value}},... on ToolUsageCheck{environmentPredicate{type,value},toolCategory,toolNamePredicate{type,value},toolUrlPredicate{type,value}},... on HasDocumentationCheck{documentSubtype,documentType},... on PackageVersionCheck{missingPackageResult,packageConstraint,packageManager,packageName,packageNameIsRegex,versionConstraintPredicate{type,value}}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}`, + `query CheckList($after:String!$first:Int!){account{rubric{checks(after: $after, first: $first){nodes{category{description,id,name},description,enableOn,enabled,filter{id,name,connective,htmlUrl,predicates{caseSensitive,key,keyData,type,value}},id,level{alias,description,id,index,name},name,notes: rawNotes,owner{... on Team{alias,id}},type,... on AlertSourceUsageCheck{alertSourceNamePredicate{type,value},alertSourceType},... on CodeIssueCheck{constraint,issueName,issueType,maxAllowed,resolutionTime{unit,value},severity},... on CustomEventCheck{integration{id,name,type},passPending,resultMessage,serviceSelector,successCondition},... on HasRecentDeployCheck{days},... on ManualCheck{updateFrequency{frequencyTimeScale,frequencyValue,startingDate},updateRequiresComment},... on RepositoryFileCheck{directorySearch,fileContentsPredicate{type,value},filePaths,useAbsoluteRoot},... on RepositoryGrepCheck{directorySearch,fileContentsPredicate{type,value},filePaths},... on RepositorySearchCheck{fileContentsPredicate{type,value},fileExtensions},... on ServiceOwnershipCheck{contactMethod,requireContactMethod,tagKey,tagPredicate{type,value}},... on ServicePropertyCheck{serviceProperty,propertyDefinition{aliases,allowedInConfigFiles,id,name,description,displaySubtype,displayType,propertyDisplayStatus,schema},propertyValuePredicate{type,value}},... on TagDefinedCheck{tagKey,tagPredicate{type,value}},... on ToolUsageCheck{environmentPredicate{type,value},toolCategory,toolNamePredicate{type,value},toolUrlPredicate{type,value}},... on HasDocumentationCheck{documentSubtype,documentType},... on PackageVersionCheck{missingPackageResult,packageConstraint,packageManager,packageName,packageNameIsRegex,versionConstraintPredicate{type,value}}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}`, `{{ template "pagination_second_query_variables" }}`, `{ "data": { "account": { "rubric": { "checks": { "nodes": [ { {{ template "owner_defined_check" }} } ], {{ template "pagination_second_pageInfo_response" }}, "totalCount": 1 }}}}}`, ) @@ -1132,7 +1132,7 @@ func TestListChecks(t *testing.T) { func TestGetMissingCheck(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `query CheckGet($id:ID!){account{check(id: $id){category{id,name},description,enableOn,enabled,filter{id,name,connective,htmlUrl,predicates{key,keyData,type,value,caseSensitive}},id,level{alias,description,id,index,name},name,notes: rawNotes,owner{... on Team{alias,id}},type,... on AlertSourceUsageCheck{alertSourceNamePredicate{type,value},alertSourceType},... on CodeIssueCheck{constraint,issueName,issueType,maxAllowed,resolutionTime{unit,value},severity},... on CustomEventCheck{integration{id,name,type},passPending,resultMessage,serviceSelector,successCondition},... on HasRecentDeployCheck{days},... on ManualCheck{updateFrequency{frequencyTimeScale,frequencyValue,startingDate},updateRequiresComment},... on RepositoryFileCheck{directorySearch,fileContentsPredicate{type,value},filePaths,useAbsoluteRoot},... on RepositoryGrepCheck{directorySearch,fileContentsPredicate{type,value},filePaths},... on RepositorySearchCheck{fileContentsPredicate{type,value},fileExtensions},... on ServiceOwnershipCheck{contactMethod,requireContactMethod,tagKey,tagPredicate{type,value}},... on ServicePropertyCheck{serviceProperty,propertyDefinition{aliases,allowedInConfigFiles,id,name,description,displaySubtype,displayType,propertyDisplayStatus,schema},propertyValuePredicate{type,value}},... on TagDefinedCheck{tagKey,tagPredicate{type,value}},... on ToolUsageCheck{environmentPredicate{type,value},toolCategory,toolNamePredicate{type,value},toolUrlPredicate{type,value}},... on HasDocumentationCheck{documentSubtype,documentType},... on PackageVersionCheck{missingPackageResult,packageConstraint,packageManager,packageName,packageNameIsRegex,versionConstraintPredicate{type,value}}}}}`, + `query CheckGet($id:ID!){account{check(id: $id){category{description,id,name},description,enableOn,enabled,filter{id,name,connective,htmlUrl,predicates{caseSensitive,key,keyData,type,value}},id,level{alias,description,id,index,name},name,notes: rawNotes,owner{... on Team{alias,id}},type,... on AlertSourceUsageCheck{alertSourceNamePredicate{type,value},alertSourceType},... on CodeIssueCheck{constraint,issueName,issueType,maxAllowed,resolutionTime{unit,value},severity},... on CustomEventCheck{integration{id,name,type},passPending,resultMessage,serviceSelector,successCondition},... on HasRecentDeployCheck{days},... on ManualCheck{updateFrequency{frequencyTimeScale,frequencyValue,startingDate},updateRequiresComment},... on RepositoryFileCheck{directorySearch,fileContentsPredicate{type,value},filePaths,useAbsoluteRoot},... on RepositoryGrepCheck{directorySearch,fileContentsPredicate{type,value},filePaths},... on RepositorySearchCheck{fileContentsPredicate{type,value},fileExtensions},... on ServiceOwnershipCheck{contactMethod,requireContactMethod,tagKey,tagPredicate{type,value}},... on ServicePropertyCheck{serviceProperty,propertyDefinition{aliases,allowedInConfigFiles,id,name,description,displaySubtype,displayType,propertyDisplayStatus,schema},propertyValuePredicate{type,value}},... on TagDefinedCheck{tagKey,tagPredicate{type,value}},... on ToolUsageCheck{environmentPredicate{type,value},toolCategory,toolNamePredicate{type,value},toolUrlPredicate{type,value}},... on HasDocumentationCheck{documentSubtype,documentType},... on PackageVersionCheck{missingPackageResult,packageConstraint,packageManager,packageName,packageNameIsRegex,versionConstraintPredicate{type,value}}}}}`, `{ "id": "Z2lkOi8vb3BzbGV2ZWwvQ2hlY2tzOjpIYXNPd25lci8yNDEf" }`, `{ "data": { "account": { "check": null } } }`, ) diff --git a/common.go b/common.go index aa2b8c36..72d563b1 100644 --- a/common.go +++ b/common.go @@ -30,20 +30,6 @@ func (pv *PayloadVariables) WithoutDeactivedUsers() *PayloadVariables { return pv } -type OpsLevelWarnings struct { - Message string -} - -type OpsLevelErrors struct { - Message string - Path []string -} - -type Timestamps struct { - CreatedAt iso8601.Time `json:"createdAt"` - UpdatedAt iso8601.Time `json:"updatedAt"` -} - func NullString() *string { var output *string return output @@ -57,14 +43,14 @@ func RefTo[T NullableConstraint](value T) *Nullable[T] { return NewNullableFrom(value) } -func HandleErrors(err error, errs []OpsLevelErrors) error { +func HandleErrors(err error, errs []Error) error { if err != nil { return err } return FormatErrors(errs) } -func FormatErrors(errs []OpsLevelErrors) error { +func FormatErrors(errs []Error) error { if len(errs) == 0 { return nil } diff --git a/common_test.go b/common_test.go index 9eb65eac..f0052764 100644 --- a/common_test.go +++ b/common_test.go @@ -9,7 +9,7 @@ import ( func TestFormatErrorsWorks(t *testing.T) { // Arrange - errs := []ol.OpsLevelErrors{ + errs := []ol.Error{ {Message: "can't be blank", Path: []string{"resource", "id"}}, {Message: "is not a valid input", Path: []string{"id"}}, } @@ -24,7 +24,7 @@ func TestFormatErrorsWorks(t *testing.T) { func TestFormatErrorsNoPath(t *testing.T) { // Arrange - errs := []ol.OpsLevelErrors{ + errs := []ol.Error{ {Message: "can't be blank", Path: []string{"base"}}, {Message: "is not a valid input", Path: []string{""}}, } diff --git a/component.go b/component.go index 0914b5fe..c30d5553 100644 --- a/component.go +++ b/component.go @@ -1,25 +1,5 @@ package opslevel -// ComponentTypeId Information about a particular component type -type ComponentTypeId Identifier - -// ComponentType Information about a particular component type -type ComponentType struct { - ComponentTypeId - Description string // The description of the component type (Optional) - Href string // The relative path to link to the component type (Required) - Icon ComponentTypeIcon // The icon associated with the component type (Required) - IsDefault bool // Whether or not the component type is the default (Required) - Name string // The name of the component type (Required) - Timestamps Timestamps // When the component type was created and updated (Required) -} - -// ComponentTypeIcon The icon for a component type -type ComponentTypeIcon struct { - Color string // The color, represented as a hexcode, for the icon (Optional) - Name string // The name of the icon in Phosphor icons for Vue, e.g. `PhBird`. See https://phosphoricons.com/ for a full list (Optional) -} - type ComponentTypeConnection struct { Nodes []ComponentType `json:"nodes"` PageInfo PageInfo `json:"pageInfo"` @@ -30,7 +10,7 @@ func (client *Client) CreateComponentType(input ComponentTypeInput) (*ComponentT var m struct { Payload struct { ComponentType ComponentType - Errors []OpsLevelErrors + Errors []Error } `graphql:"componentTypeCreate(input:$input)"` } v := PayloadVariables{ @@ -82,7 +62,7 @@ func (client *Client) UpdateComponentType(identifier string, input ComponentType var m struct { Payload struct { ComponentType ComponentType - Errors []OpsLevelErrors + Errors []Error } `graphql:"componentTypeUpdate(componentType:$target,input:$input)"` } v := PayloadVariables{ @@ -96,7 +76,7 @@ func (client *Client) UpdateComponentType(identifier string, input ComponentType func (client *Client) DeleteComponentType(identifier string) error { var d struct { Payload struct { - Errors []OpsLevelErrors `graphql:"errors"` + Errors []Error `graphql:"errors"` } `graphql:"componentTypeDelete(resource:$target)"` } v := PayloadVariables{ diff --git a/dependencies.go b/dependencies.go index deca4c91..2c95dde5 100644 --- a/dependencies.go +++ b/dependencies.go @@ -37,7 +37,7 @@ func (client *Client) CreateServiceDependency(input ServiceDependencyCreateInput var m struct { Payload struct { ServiceDependency *ServiceDependency - Errors []OpsLevelErrors + Errors []Error } `graphql:"serviceDependencyCreate(inputV2: $input)"` } v := PayloadVariables{ @@ -116,7 +116,7 @@ func (service *Service) GetDependents(client *Client, variables *PayloadVariable func (client *Client) DeleteServiceDependency(id ID) error { var m struct { Payload struct { - Errors []OpsLevelErrors + Errors []Error } `graphql:"serviceDependencyDelete(input: $input)"` } v := PayloadVariables{ diff --git a/document.go b/document.go index 80316aab..14302c12 100644 --- a/document.go +++ b/document.go @@ -1,10 +1,5 @@ package opslevel -type ServiceDocumentSource struct { - IntegrationId `graphql:"... on ApiDocIntegration"` - ServiceRepository `graphql:"... on ServiceRepository"` -} - type ServiceDocument struct { Id ID `graphql:"id" json:"id"` HtmlURL string `graphql:"htmlUrl" json:"htmUrl,omitempty"` @@ -21,7 +16,7 @@ func (client *Client) ServiceApiDocSettingsUpdate(service string, docPath string var m struct { Payload struct { Service Service - Errors []OpsLevelErrors + Errors []Error } `graphql:"serviceApiDocSettingsUpdate(service: $service, apiDocumentPath: $docPath, preferredApiDocumentSource: $docSource)"` } v := PayloadVariables{ diff --git a/document_test.go b/document_test.go index ff080af8..0328f1cb 100644 --- a/document_test.go +++ b/document_test.go @@ -11,7 +11,7 @@ import ( func TestServiceApiDocSettingsUpdate(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `mutation ServiceApiDocSettingsUpdate($docPath:String$docSource:ApiDocumentSourceEnum$service:IdentifierInput!){serviceApiDocSettingsUpdate(service: $service, apiDocumentPath: $docPath, preferredApiDocumentSource: $docSource){service{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},errors{message,path}}}`, + `mutation ServiceApiDocSettingsUpdate($docPath:String$docSource:ApiDocumentSourceEnum$service:IdentifierInput!){serviceApiDocSettingsUpdate(service: $service, apiDocumentPath: $docPath, preferredApiDocumentSource: $docSource){service{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},errors{message,path}}}`, `{"docPath":"/src/swagger.json", "docSource":"PULL", "service": {"alias":"service_alias" }}`, `{"data": {"serviceApiDocSettingsUpdate": {"service": {{ template "service_1" }}, "errors": [] }}}`, ) @@ -30,7 +30,7 @@ func TestServiceApiDocSettingsUpdate(t *testing.T) { func TestServiceApiDocSettingsUpdateDocSourceNull(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `mutation ServiceApiDocSettingsUpdate($docPath:String$docSource:ApiDocumentSourceEnum$service:IdentifierInput!){serviceApiDocSettingsUpdate(service: $service, apiDocumentPath: $docPath, preferredApiDocumentSource: $docSource){service{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},errors{message,path}}}`, + `mutation ServiceApiDocSettingsUpdate($docPath:String$docSource:ApiDocumentSourceEnum$service:IdentifierInput!){serviceApiDocSettingsUpdate(service: $service, apiDocumentPath: $docPath, preferredApiDocumentSource: $docSource){service{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},errors{message,path}}}`, `{"docPath":"/src/swagger.json", "docSource": null, "service": {"alias":"service_alias" }}`, `{"data": { "serviceApiDocSettingsUpdate": { "service": {{ template "service_1" }}, "errors": [] }}}`, ) @@ -48,7 +48,7 @@ func TestServiceApiDocSettingsUpdateDocSourceNull(t *testing.T) { func TestServiceApiDocSettingsUpdateDocPathNull(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `mutation ServiceApiDocSettingsUpdate($docPath:String$docSource:ApiDocumentSourceEnum$service:IdentifierInput!){serviceApiDocSettingsUpdate(service: $service, apiDocumentPath: $docPath, preferredApiDocumentSource: $docSource){service{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},errors{message,path}}}`, + `mutation ServiceApiDocSettingsUpdate($docPath:String$docSource:ApiDocumentSourceEnum$service:IdentifierInput!){serviceApiDocSettingsUpdate(service: $service, apiDocumentPath: $docPath, preferredApiDocumentSource: $docSource){service{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},errors{message,path}}}`, `{"docPath":null, "docSource":"PULL", "service": {"alias":"service_alias" }}`, `{"data": { "serviceApiDocSettingsUpdate": { "service": {{ template "service_1" }}, "errors": [] }}}`, ) diff --git a/domain.go b/domain.go index 73868091..8fe90a5e 100644 --- a/domain.go +++ b/domain.go @@ -6,19 +6,6 @@ import ( "slices" ) -type DomainId Identifier - -type Domain struct { - DomainId - - Description string `graphql:"description"` - HTMLUrl string `graphql:"htmlUrl"` - ManagedAliases []string `graphql:"managedAliases"` // A list of aliases that can be set by users. The unique identifier for the resource is omitted. - Name string `graphql:"name"` - Note string `graphql:"note"` - Owner EntityOwner `graphql:"owner"` -} - type DomainConnection struct { Nodes []Domain `json:"nodes"` PageInfo PageInfo `json:"pageInfo"` @@ -144,7 +131,7 @@ func (domainId *DomainId) AssignSystem(client *Client, systems ...string) error var m struct { Payload struct { Domain Domain - Errors []OpsLevelErrors + Errors []Error } `graphql:"domainChildAssign(domain:$domain, childSystems:$childSystems)"` } v := PayloadVariables{ @@ -159,7 +146,7 @@ func (client *Client) CreateDomain(input DomainInput) (*Domain, error) { var m struct { Payload struct { Domain Domain - Errors []OpsLevelErrors + Errors []Error } `graphql:"domainCreate(input:$input)"` } v := PayloadVariables{ @@ -211,7 +198,7 @@ func (client *Client) UpdateDomain(identifier string, input DomainInput) (*Domai var m struct { Payload struct { Domain Domain - Errors []OpsLevelErrors + Errors []Error } `graphql:"domainUpdate(domain:$domain,input:$input)"` } v := PayloadVariables{ @@ -225,7 +212,7 @@ func (client *Client) UpdateDomain(identifier string, input DomainInput) (*Domai func (client *Client) DeleteDomain(identifier string) error { var d struct { Payload struct { - Errors []OpsLevelErrors `graphql:"errors"` + Errors []Error `graphql:"errors"` } `graphql:"domainDelete(resource: $input)"` } v := PayloadVariables{ diff --git a/domain_test.go b/domain_test.go index 7ebfee2b..c11df435 100644 --- a/domain_test.go +++ b/domain_test.go @@ -35,12 +35,12 @@ func TestDomainCreate(t *testing.T) { func TestDomainGetSystems(t *testing.T) { // Arrange testRequestOne := autopilot.NewTestRequest( - `query DomainChildSystemsList($after:String!$domain:IdentifierInput!$first:Int!){account{domain(input: $domain){childSystems(after: $after, first: $first){nodes{id,aliases,managedAliases,name,description,htmlUrl,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}},note},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor}}}}}`, + `query DomainChildSystemsList($after:String!$domain:IdentifierInput!$first:Int!){account{domain(input: $domain){childSystems(after: $after, first: $first){nodes{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor}}}}}`, `{ {{ template "first_page_variables" }}, "domain": { {{ template "id2" }} } }`, `{ "data": { "account": { "domain": { "childSystems": { "nodes": [ {{ template "system1_response" }}, {{ template "system2_response" }} ], {{ template "pagination_initial_pageInfo_response" }} }}}}}`, ) testRequestTwo := autopilot.NewTestRequest( - `query DomainChildSystemsList($after:String!$domain:IdentifierInput!$first:Int!){account{domain(input: $domain){childSystems(after: $after, first: $first){nodes{id,aliases,managedAliases,name,description,htmlUrl,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}},note},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor}}}}}`, + `query DomainChildSystemsList($after:String!$domain:IdentifierInput!$first:Int!){account{domain(input: $domain){childSystems(after: $after, first: $first){nodes{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor}}}}}`, `{ {{ template "second_page_variables" }}, "domain": { {{ template "id2" }} } }`, `{ "data": { "account": { "domain": { "childSystems": { "nodes": [ {{ template "system3_response" }} ], {{ template "pagination_second_pageInfo_response" }} }}}}}`, ) diff --git a/enum.go b/enum.go index fc3f3ab5..2995ce86 100644 --- a/enum.go +++ b/enum.go @@ -25,16 +25,18 @@ var AllAlertSourceStatusTypeEnum = []string{ type AlertSourceTypeEnum string var ( - AlertSourceTypeEnumDatadog AlertSourceTypeEnum = "datadog" // A Datadog alert source (aka monitor) - AlertSourceTypeEnumIncidentIo AlertSourceTypeEnum = "incident_io" // An incident.io alert source (aka service) - AlertSourceTypeEnumNewRelic AlertSourceTypeEnum = "new_relic" // A New Relic alert source (aka service) - AlertSourceTypeEnumOpsgenie AlertSourceTypeEnum = "opsgenie" // An Opsgenie alert source (aka service) - AlertSourceTypeEnumPagerduty AlertSourceTypeEnum = "pagerduty" // A PagerDuty alert source (aka service) + AlertSourceTypeEnumDatadog AlertSourceTypeEnum = "datadog" // A Datadog alert source (aka monitor) + AlertSourceTypeEnumFireHydrant AlertSourceTypeEnum = "fire_hydrant" // An FireHydrant alert source (aka service) + AlertSourceTypeEnumIncidentIo AlertSourceTypeEnum = "incident_io" // An incident.io alert source (aka service) + AlertSourceTypeEnumNewRelic AlertSourceTypeEnum = "new_relic" // A New Relic alert source (aka service) + AlertSourceTypeEnumOpsgenie AlertSourceTypeEnum = "opsgenie" // An Opsgenie alert source (aka service) + AlertSourceTypeEnumPagerduty AlertSourceTypeEnum = "pagerduty" // A PagerDuty alert source (aka service) ) // All AlertSourceTypeEnum as []string var AllAlertSourceTypeEnum = []string{ string(AlertSourceTypeEnumDatadog), + string(AlertSourceTypeEnumFireHydrant), string(AlertSourceTypeEnumIncidentIo), string(AlertSourceTypeEnumNewRelic), string(AlertSourceTypeEnumOpsgenie), @@ -831,6 +833,34 @@ var AllPropertyDisplayStatusEnum = []string{ string(PropertyDisplayStatusEnumVisible), } +// PropertyLockedStatusEnum Values for which lock is assigned to a property definition to restrict what sources can assign values to it +type PropertyLockedStatusEnum string + +var ( + PropertyLockedStatusEnumUILocked PropertyLockedStatusEnum = "ui_locked" // Value assignments on the property cannot be changed through the UI + PropertyLockedStatusEnumUnlocked PropertyLockedStatusEnum = "unlocked" // There are no restrictions on what sources can assign values to the property +) + +// All PropertyLockedStatusEnum as []string +var AllPropertyLockedStatusEnum = []string{ + string(PropertyLockedStatusEnumUILocked), + string(PropertyLockedStatusEnumUnlocked), +} + +// PropertyOwnerTypeEnum The possible entity types that a property can be assigned to +type PropertyOwnerTypeEnum string + +var ( + PropertyOwnerTypeEnumComponent PropertyOwnerTypeEnum = "COMPONENT" // A component + PropertyOwnerTypeEnumTeam PropertyOwnerTypeEnum = "TEAM" // A team +) + +// All PropertyOwnerTypeEnum as []string +var AllPropertyOwnerTypeEnum = []string{ + string(PropertyOwnerTypeEnumComponent), + string(PropertyOwnerTypeEnumTeam), +} + // RelatedResourceRelationshipTypeEnum The type of the relationship between two resources type RelatedResourceRelationshipTypeEnum string diff --git a/filters.go b/filters.go index 49936d31..6e15f39a 100644 --- a/filters.go +++ b/filters.go @@ -7,26 +7,6 @@ import ( "github.com/gosimple/slug" ) -type FilterId struct { - Id ID - Name string -} - -type Filter struct { - FilterId - Connective ConnectiveEnum - HtmlUrl string - Predicates []FilterPredicate -} - -type FilterPredicate struct { - Key PredicateKeyEnum `json:"key" yaml:"key" default:"repository_ids"` - KeyData string `json:"keyData,omitempty" yaml:"keyData,omitempty" default:"null"` - Type PredicateTypeEnum `json:"type" yaml:"type" default:"equals"` - Value string `json:"value,omitempty" yaml:"value,omitempty" default:"1"` - CaseSensitive *bool `json:"caseSensitive,omitempty" yaml:"caseSensitive,omitempty" default:"false"` -} - // Validate the FilterPredicate based on known expectations before sending to API func (filterPredicate *FilterPredicate) Validate() error { // validation common to Predicate and FilterPredicate types @@ -213,7 +193,7 @@ func (client *Client) CreateFilter(input FilterCreateInput) (*Filter, error) { var m struct { Payload struct { Filter Filter - Errors []OpsLevelErrors + Errors []Error } `graphql:"filterCreate(input: $input)"` } v := PayloadVariables{ @@ -268,7 +248,7 @@ func (client *Client) UpdateFilter(input FilterUpdateInput) (*Filter, error) { var m struct { Payload struct { Filter Filter - Errors []OpsLevelErrors + Errors []Error } `graphql:"filterUpdate(input: $input)"` } v := PayloadVariables{ @@ -282,7 +262,7 @@ func (client *Client) DeleteFilter(id ID) error { var m struct { Payload struct { Id ID `graphql:"deletedId"` - Errors []OpsLevelErrors + Errors []Error } `graphql:"filterDelete(input: $input)"` } v := PayloadVariables{ diff --git a/filters_test.go b/filters_test.go index 99ab99ba..2480c9fa 100644 --- a/filters_test.go +++ b/filters_test.go @@ -11,7 +11,7 @@ import ( func TestCreateFilter(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `mutation FilterCreate($input:FilterCreateInput!){filterCreate(input: $input){filter{id,name,connective,htmlUrl,predicates{key,keyData,type,value,caseSensitive}},errors{message,path}}}`, + `mutation FilterCreate($input:FilterCreateInput!){filterCreate(input: $input){filter{id,name,connective,htmlUrl,predicates{caseSensitive,key,keyData,type,value}},errors{message,path}}}`, `{"input": {"name": "Kubernetes", "predicates": [ { "key": "tier_index", "type": "equals", "value": "1" } ], "connective": "and" }}`, `{"data": {"filterCreate": {"filter": { {{ template "filter_tier1service_response" }} }, "errors": [] }}}`, ) @@ -37,7 +37,7 @@ func TestCreateFilter(t *testing.T) { func TestCreateFilterNested(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `mutation FilterCreate($input:FilterCreateInput!){filterCreate(input: $input){filter{id,name,connective,htmlUrl,predicates{key,keyData,type,value,caseSensitive}},errors{message,path}}}`, + `mutation FilterCreate($input:FilterCreateInput!){filterCreate(input: $input){filter{id,name,connective,htmlUrl,predicates{caseSensitive,key,keyData,type,value}},errors{message,path}}}`, `{"input": { {{ template "create_filter_nested_input" }} }}`, `{"data": {"filterCreate": {"filter": { {{ template "create_filter_nested_response" }} }, "errors": [] }}}`, ) @@ -75,7 +75,7 @@ func TestCreateFilterNested(t *testing.T) { func TestGetFilter(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `query FilterGet($id:ID!){account{filter(id: $id){id,name,connective,htmlUrl,predicates{key,keyData,type,value,caseSensitive}}}}`, + `query FilterGet($id:ID!){account{filter(id: $id){id,name,connective,htmlUrl,predicates{caseSensitive,key,keyData,type,value}}}}`, `{"id": "Z2lkOi8vb3BzbGV2ZWwvQ2hlY2tsaXN0LzYyMg"}`, `{"data": {"account": {"filter": { {{ template "filter_tier1service_response" }} }}}}`, ) @@ -92,7 +92,7 @@ func TestGetFilter(t *testing.T) { func TestGetMissingFilter(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `query FilterGet($id:ID!){account{filter(id: $id){id,name,connective,htmlUrl,predicates{key,keyData,type,value,caseSensitive}}}}`, + `query FilterGet($id:ID!){account{filter(id: $id){id,name,connective,htmlUrl,predicates{caseSensitive,key,keyData,type,value}}}}`, `{"id": "Z2lkOi8vb3BzbGV2ZWwvQ2hlY2tsaXN0LzYyMf"}`, `{"data": {"account": {"filter": null }}}`, ) @@ -107,12 +107,12 @@ func TestGetMissingFilter(t *testing.T) { func TestListFilters(t *testing.T) { // Arrange testRequestOne := autopilot.NewTestRequest( - `query FilterList($after:String!$first:Int!){account{filters(after: $after, first: $first){nodes{id,name,connective,htmlUrl,predicates{key,keyData,type,value,caseSensitive}},{{ template "pagination_request" }},totalCount}}}`, + `query FilterList($after:String!$first:Int!){account{filters(after: $after, first: $first){nodes{id,name,connective,htmlUrl,predicates{caseSensitive,key,keyData,type,value}},{{ template "pagination_request" }},totalCount}}}`, `{{ template "pagination_initial_query_variables" }}`, `{"data": { "account": { "filters": { "nodes": [ { {{ template "filter_kubernetes_response" }} }, { {{ template "filter_tier1service_response" }} } ], {{ template "pagination_initial_pageInfo_response" }}, "totalCount": 2 }}}}`, ) testRequestTwo := autopilot.NewTestRequest( - `query FilterList($after:String!$first:Int!){account{filters(after: $after, first: $first){nodes{id,name,connective,htmlUrl,predicates{key,keyData,type,value,caseSensitive}},{{ template "pagination_request" }},totalCount}}}`, + `query FilterList($after:String!$first:Int!){account{filters(after: $after, first: $first){nodes{id,name,connective,htmlUrl,predicates{caseSensitive,key,keyData,type,value}},{{ template "pagination_request" }},totalCount}}}`, `{{ template "pagination_second_query_variables" }}`, `{"data": { "account": { "filters": { "nodes": [ { {{ template "filter_complex_kubernetes_response" }} } ], {{ template "pagination_second_pageInfo_response" }}, "totalCount": 1 }}}}`, ) @@ -134,7 +134,7 @@ func TestListFilters(t *testing.T) { func TestUpdateFilter(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `mutation FilterUpdate($input:FilterUpdateInput!){filterUpdate(input: $input){filter{id,name,connective,htmlUrl,predicates{key,keyData,type,value,caseSensitive}},errors{message,path}}}`, + `mutation FilterUpdate($input:FilterUpdateInput!){filterUpdate(input: $input){filter{id,name,connective,htmlUrl,predicates{caseSensitive,key,keyData,type,value}},errors{message,path}}}`, `{"input": {"id": "Z2lkOi8vb3BzbGV2ZWwvQ2hlY2tsaXN0LzYyMg", "name": "Test Updated", "predicates": [ { "key": "tier_index", "type": "equals", "value": "1" } ] }}`, `{"data": {"filterUpdate": {"filter": { {{ template "filter_tier1service_response" }} }, "errors": [] }}}`, ) @@ -159,7 +159,7 @@ func TestUpdateFilter(t *testing.T) { func TestUpdateFilterNested(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `mutation FilterUpdate($input:FilterUpdateInput!){filterUpdate(input: $input){filter{id,name,connective,htmlUrl,predicates{key,keyData,type,value,caseSensitive}},errors{message,path}}}`, + `mutation FilterUpdate($input:FilterUpdateInput!){filterUpdate(input: $input){filter{id,name,connective,htmlUrl,predicates{caseSensitive,key,keyData,type,value}},errors{message,path}}}`, `{"input": { {{ template "update_filter_nested_input" }} }}`, `{"data": {"filterUpdate": {"filter": { {{ template "update_filter_nested_response" }} }, "errors": [] }}}`, ) @@ -198,7 +198,7 @@ func TestUpdateFilterNested(t *testing.T) { func TestUpdateFilterCaseSensitiveTrue(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `mutation FilterUpdate($input:FilterUpdateInput!){filterUpdate(input: $input){filter{id,name,connective,htmlUrl,predicates{key,keyData,type,value,caseSensitive}},errors{message,path}}}`, + `mutation FilterUpdate($input:FilterUpdateInput!){filterUpdate(input: $input){filter{id,name,connective,htmlUrl,predicates{caseSensitive,key,keyData,type,value}},errors{message,path}}}`, `{"input": {"id": "Z2lkOi8vb3BzbGV2ZWwvQ2hlY2tsaXN0LzYyMg", "name": "Test Updated", "predicates": [ { "key": "tier_index", "type": "equals", "value": "1", "caseSensitive": true } ] }}`, `{"data": { "filterUpdate": { @@ -244,7 +244,7 @@ func TestUpdateFilterCaseSensitiveTrue(t *testing.T) { func TestUpdateFilterCaseSensitiveFalse(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `mutation FilterUpdate($input:FilterUpdateInput!){filterUpdate(input: $input){filter{id,name,connective,htmlUrl,predicates{key,keyData,type,value,caseSensitive}},errors{message,path}}}`, + `mutation FilterUpdate($input:FilterUpdateInput!){filterUpdate(input: $input){filter{id,name,connective,htmlUrl,predicates{caseSensitive,key,keyData,type,value}},errors{message,path}}}`, `{"input": {"id": "Z2lkOi8vb3BzbGV2ZWwvQ2hlY2tsaXN0LzYyMg", "name": "Test Updated", "predicates": [ { "key": "tier_index", "type": "equals", "value": "1", "caseSensitive": false } ] }}`, `{"data": { "filterUpdate": { diff --git a/infra.go b/infra.go index 0ee32ef5..abc184e5 100644 --- a/infra.go +++ b/infra.go @@ -17,14 +17,14 @@ type InfrastructureResourceSchemaConnection struct { TotalCount int `graphql:"-"` } -type InfrastructureResourceProviderData struct { - AccountName string `json:"accountName" graphql:"accountName"` - ExternalURL string `json:"externalUrl" graphql:"externalUrl"` - ProviderName string `json:"providerName" graphql:"providerName"` -} +//type InfrastructureResourceProviderData struct { +// AccountName string `json:"accountName" graphql:"accountName"` +// ExternalURL string `json:"externalUrl" graphql:"externalUrl"` +// ProviderName string `json:"providerName" graphql:"providerName"` +//} type InfrastructureResource struct { - Id string `json:"id"` + Id ID `json:"id"` Aliases []string `json:"aliases"` Name string `json:"name"` Schema string `json:"type" graphql:"type @include(if: $all)"` @@ -64,7 +64,7 @@ func (infrastructureResource *InfrastructureResource) ReconcileAliases(client *C _, createErr := client.CreateAliases(ID(infrastructureResource.Id), aliasesToCreate) // update infrastructureResource to reflect API updates - updatedInfra, getErr := client.GetInfrastructure(infrastructureResource.Id) + updatedInfra, getErr := client.GetInfrastructure(string(infrastructureResource.Id)) if updatedInfra != nil { infrastructureResource.Aliases = updatedInfra.Aliases } @@ -86,7 +86,7 @@ func (infrastructureResource *InfrastructureResource) GetTags(client *Client, va if variables == nil { variables = client.InitialPageVariablesPointer() } - (*variables)["infrastructureResource"] = *NewIdentifier(infrastructureResource.Id) + (*variables)["infrastructureResource"] = *NewIdentifier(string(infrastructureResource.Id)) if err := client.Query(&q, *variables, WithName("InfrastructureResourceTags")); err != nil { return nil, err @@ -114,7 +114,7 @@ func (infrastructureResource *InfrastructureResource) GetAliases() []string { } func (infrastructureResource *InfrastructureResource) ResourceId() ID { - return *NewID(infrastructureResource.Id) + return *NewID(string(infrastructureResource.Id)) } func (infrastructureResource *InfrastructureResource) ResourceType() TaggableResource { @@ -144,8 +144,8 @@ func (client *Client) CreateInfrastructure(input InfraInput) (*InfrastructureRes var m struct { Payload struct { InfrastructureResource InfrastructureResource - Warnings []OpsLevelWarnings // TODO: handle warnings somehow - Errors []OpsLevelErrors + Warnings []Warning // TODO: handle warnings somehow + Errors []Error } `graphql:"infrastructureResourceCreate(input: $input)"` } v := PayloadVariables{ @@ -243,8 +243,8 @@ func (client *Client) UpdateInfrastructure(identifier string, input InfraInput) var m struct { Payload struct { InfrastructureResource InfrastructureResource - Warnings []OpsLevelWarnings // TODO: handle warnings somehow - Errors []OpsLevelErrors + Warnings []Warning // TODO: handle warnings somehow + Errors []Error } `graphql:"infrastructureResourceUpdate(infrastructureResource: $identifier, input: $input)"` } v := PayloadVariables{ @@ -259,7 +259,7 @@ func (client *Client) UpdateInfrastructure(identifier string, input InfraInput) func (client *Client) DeleteInfrastructure(identifier string) error { var m struct { Payload struct { - Errors []OpsLevelErrors `graphql:"errors"` + Errors []Error `graphql:"errors"` } `graphql:"infrastructureResourceDelete(resource: $input)"` } v := PayloadVariables{ diff --git a/infra_test.go b/infra_test.go index 46275b39..4591d3ef 100644 --- a/infra_test.go +++ b/infra_test.go @@ -52,7 +52,7 @@ func TestCreateInfra(t *testing.T) { }) // Assert autopilot.Equals(t, nil, err) - autopilot.Equals(t, string(id1), result.Id) + autopilot.Equals(t, id1, result.Id) autopilot.Equals(t, "my-big-query", result.Name) } @@ -68,7 +68,7 @@ func TestGetInfra(t *testing.T) { result, err := client.GetInfrastructure(string(id1)) // Assert autopilot.Equals(t, nil, err) - autopilot.Equals(t, string(id1), result.Id) + autopilot.Equals(t, id1, result.Id) autopilot.Equals(t, "my-big-query", result.Name) } @@ -145,7 +145,7 @@ func TestUpdateInfra(t *testing.T) { }) // Assert autopilot.Equals(t, nil, err) - autopilot.Equals(t, string(id1), result.Id) + autopilot.Equals(t, id1, result.Id) autopilot.Equals(t, "my-big-query", result.Name) autopilot.Equals(t, "Database", result.Schema) } @@ -225,7 +225,7 @@ func TestGetInfrastructureResourceTags(t *testing.T) { requests := []autopilot.TestRequest{testRequestOne, testRequestTwo} client := BestTestClient(t, "infrastructureResource/tags", requests...) // Act - infra := opslevel.InfrastructureResource{Id: string(id1)} + infra := opslevel.InfrastructureResource{Id: id1} resp, err := infra.GetTags(client, nil) autopilot.Ok(t, err) result := resp.Nodes @@ -244,7 +244,7 @@ func TestInfraReconcileAliasesDeleteAll(t *testing.T) { // Arrange aliasesWanted := []string{} infra := opslevel.InfrastructureResource{ - Id: string(id1), + Id: id1, Aliases: []string{"one", "two"}, } @@ -281,7 +281,7 @@ func TestInfraReconcileAliases(t *testing.T) { // Arrange aliasesWanted := []string{"one", "two", "three"} infra := opslevel.InfrastructureResource{ - Id: string(id1), + Id: id1, Aliases: []string{"one", "alpha", "beta"}, } diff --git a/input.go b/input.go index 935d0451..5583ac49 100644 --- a/input.go +++ b/input.go @@ -1,1220 +1,1242 @@ -// Code generated by gen.go; DO NOT EDIT. - +// Code generated; DO NOT EDIT. package opslevel import "github.com/relvacode/iso8601" -// AlertSourceExternalIdentifier specifies the input needed to find an alert source with external information. +// AlertSourceExternalIdentifier Specifies the input needed to find an alert source with external information type AlertSourceExternalIdentifier struct { - ExternalId string `json:"externalId" yaml:"externalId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The external id of the alert. (Required.) - Type AlertSourceTypeEnum `json:"type" yaml:"type" example:"datadog"` // The type of the alert. (Required.) + ExternalId string `json:"externalId" yaml:"externalId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The external id of the alert (Required) + Type AlertSourceTypeEnum `json:"type" yaml:"type" example:"datadog"` // The type of the alert (Required) } -// AlertSourceServiceCreateInput specifies the input used for attaching an alert source to a service. +// AlertSourceServiceCreateInput Specifies the input used for attaching an alert source to a service type AlertSourceServiceCreateInput struct { - AlertSourceExternalIdentifier *AlertSourceExternalIdentifier `json:"alertSourceExternalIdentifier,omitempty" yaml:"alertSourceExternalIdentifier,omitempty"` // Specifies the input needed to find an alert source with external information. (Optional.) - AlertSourceId *Nullable[ID] `json:"alertSourceId,omitempty" yaml:"alertSourceId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // Specifies the input needed to find an alert source with external information. (Optional.) - Service IdentifierInput `json:"service" yaml:"service"` // The service that the alert source will be attached to. (Required.) + AlertSourceExternalIdentifier *AlertSourceExternalIdentifier `json:"alertSourceExternalIdentifier,omitempty" yaml:"alertSourceExternalIdentifier,omitempty"` // Specifies the input needed to find an alert source with external information (Optional) + AlertSourceId *Nullable[ID] `json:"alertSourceId,omitempty" yaml:"alertSourceId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // Specifies the input needed to find an alert source with external information (Optional) + Service IdentifierInput `json:"service" yaml:"service"` // The service that the alert source will be attached to (Required) } -// AlertSourceServiceDeleteInput specifies the input fields used in the `alertSourceServiceDelete` mutation. +// AlertSourceServiceDeleteInput Specifies the input fields used in the `alertSourceServiceDelete` mutation type AlertSourceServiceDeleteInput struct { - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the alert source service to be deleted. (Required.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the alert source service to be deleted (Required) } -// AliasCreateInput represents the input for the `aliasCreate` mutation. +// AliasCreateInput The input for the `aliasCreate` mutation type AliasCreateInput struct { - Alias string `json:"alias" yaml:"alias" example:"example_value"` // The alias you wish to create. (Required.) - OwnerId ID `json:"ownerId" yaml:"ownerId" example:"example_value"` // The ID of the resource you want to create the alias on. Services, teams, groups, systems, and domains are supported. (Required.) + Alias string `json:"alias" yaml:"alias" example:"example_value"` // The alias you wish to create (Required) + OwnerId ID `json:"ownerId" yaml:"ownerId" example:"example_value"` // The ID of the resource you want to create the alias on. Services, teams, groups, systems, and domains are supported (Required) } -// AliasDeleteInput represents the input for the `aliasDelete` mutation. +// AliasDeleteInput The input for the `aliasDelete` mutation type AliasDeleteInput struct { - Alias string `json:"alias" yaml:"alias" example:"example_value"` // The alias you wish to delete. (Required.) - OwnerType AliasOwnerTypeEnum `json:"ownerType" yaml:"ownerType" example:"domain"` // The resource the alias you wish to delete belongs to. (Required.) + Alias string `json:"alias" yaml:"alias" example:"example_value"` // The alias you wish to delete (Required) + OwnerType AliasOwnerTypeEnum `json:"ownerType" yaml:"ownerType" example:"domain"` // The resource the alias you wish to delete belongs to (Required) } -// AwsIntegrationInput specifies the input fields used to create and update an AWS integration. +// AwsIntegrationInput Specifies the input fields used to create and update an AWS integration type AwsIntegrationInput struct { - AwsTagsOverrideOwnership *Nullable[bool] `json:"awsTagsOverrideOwnership,omitempty" yaml:"awsTagsOverrideOwnership,omitempty" example:"false"` // Allow tags imported from AWS to override ownership set in OpsLevel directly. (Optional.) - ExternalId *Nullable[string] `json:"externalId,omitempty" yaml:"externalId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The External ID defined in the trust relationship to ensure OpsLevel is the only third party assuming this role (See https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html for more details). (Optional.) - IamRole *Nullable[string] `json:"iamRole,omitempty" yaml:"iamRole,omitempty" example:"example_value"` // The IAM role OpsLevel uses in order to access the AWS account. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the integration. (Optional.) - OwnershipTagKeys *Nullable[[]string] `json:"ownershipTagKeys,omitempty" yaml:"ownershipTagKeys,omitempty" example:"['tag_key1', 'tag_key2']"` // An array of tag keys used to associate ownership from an integration. Max 5. (Optional.) - RegionOverride *Nullable[[]string] `json:"regionOverride,omitempty" yaml:"regionOverride,omitempty" example:"['us-east-1', 'eu-west-1']"` // Overrides the AWS region(s) that will be synchronized by this integration. (Optional.) + AwsTagsOverrideOwnership *Nullable[bool] `json:"awsTagsOverrideOwnership,omitempty" yaml:"awsTagsOverrideOwnership,omitempty" example:"false"` // Allow tags imported from AWS to override ownership set in OpsLevel directly (Optional) + ExternalId *Nullable[string] `json:"externalId,omitempty" yaml:"externalId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The External ID defined in the trust relationship to ensure OpsLevel is the only third party assuming this role (See https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html for more details) (Optional) + IamRole *Nullable[string] `json:"iamRole,omitempty" yaml:"iamRole,omitempty" example:"example_value"` // The IAM role OpsLevel uses in order to access the AWS account (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the integration (Optional) + OwnershipTagKeys *Nullable[[]string] `json:"ownershipTagKeys,omitempty" yaml:"ownershipTagKeys,omitempty" example:"['tag_key1', 'tag_key2']"` // An array of tag keys used to associate ownership from an integration. Max 5 (Optional) + RegionOverride *Nullable[[]string] `json:"regionOverride,omitempty" yaml:"regionOverride,omitempty" example:"['us-east-1', 'eu-west-1']"` // Overrides the AWS region(s) that will be synchronized by this integration (Optional) } -// AzureResourcesIntegrationInput specifies the input fields used to create and update an Azure resources integration. +// AzureResourcesIntegrationInput Specifies the input fields used to create and update an Azure resources integration type AzureResourcesIntegrationInput struct { - ClientId *Nullable[string] `json:"clientId,omitempty" yaml:"clientId,omitempty" example:"example_value"` // The client OpsLevel uses to access the Azure account. (Optional.) - ClientSecret *Nullable[string] `json:"clientSecret,omitempty" yaml:"clientSecret,omitempty" example:"example_value"` // The client secret OpsLevel uses to access the Azure account. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the integration. (Optional.) - OwnershipTagKeys *Nullable[[]string] `json:"ownershipTagKeys,omitempty" yaml:"ownershipTagKeys,omitempty" example:"['tag_key1', 'tag_key2']"` // An array of tag keys used to associate ownership from an integration. Max 5. (Optional.) - SubscriptionId *Nullable[string] `json:"subscriptionId,omitempty" yaml:"subscriptionId,omitempty" example:"example_value"` // The subscription OpsLevel uses to access the Azure account. (Optional.) - TagsOverrideOwnership *Nullable[bool] `json:"tagsOverrideOwnership,omitempty" yaml:"tagsOverrideOwnership,omitempty" example:"false"` // Allow tags imported from Azure to override ownership set in OpsLevel directly. (Optional.) - TenantId *Nullable[string] `json:"tenantId,omitempty" yaml:"tenantId,omitempty" example:"example_value"` // The tenant OpsLevel uses to access the Azure account. (Optional.) + ClientId *Nullable[string] `json:"clientId,omitempty" yaml:"clientId,omitempty" example:"example_value"` // The client OpsLevel uses to access the Azure account (Optional) + ClientSecret *Nullable[string] `json:"clientSecret,omitempty" yaml:"clientSecret,omitempty" example:"example_value"` // The client secret OpsLevel uses to access the Azure account (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the integration (Optional) + OwnershipTagKeys *Nullable[[]string] `json:"ownershipTagKeys,omitempty" yaml:"ownershipTagKeys,omitempty" example:"['tag_key1', 'tag_key2']"` // An array of tag keys used to associate ownership from an integration. Max 5 (Optional) + SubscriptionId *Nullable[string] `json:"subscriptionId,omitempty" yaml:"subscriptionId,omitempty" example:"example_value"` // The subscription OpsLevel uses to access the Azure account (Optional) + TagsOverrideOwnership *Nullable[bool] `json:"tagsOverrideOwnership,omitempty" yaml:"tagsOverrideOwnership,omitempty" example:"false"` // Allow tags imported from Azure to override ownership set in OpsLevel directly (Optional) + TenantId *Nullable[string] `json:"tenantId,omitempty" yaml:"tenantId,omitempty" example:"example_value"` // The tenant OpsLevel uses to access the Azure account (Optional) } -// CategoryCreateInput specifies the input fields used to create a category. +// CategoryCreateInput Specifies the input fields used to create a category type CategoryCreateInput struct { - Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of the category. (Optional.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the category. (Required.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of the category (Optional) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the category (Required) } -// CategoryDeleteInput specifies the input fields used to delete a category. +// CategoryDeleteInput Specifies the input fields used to delete a category type CategoryDeleteInput struct { - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category to be deleted. (Required.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category to be deleted (Required) } -// CategoryUpdateInput specifies the input fields used to update a category. +// CategoryUpdateInput Specifies the input fields used to update a category type CategoryUpdateInput struct { - Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of the category. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category to be updated. (Required.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the category. (Optional.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of the category (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category to be updated (Required) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the category (Optional) } -// CheckAlertSourceUsageCreateInput specifies the input fields used to create an alert source usage check. +// CheckAlertSourceUsageCreateInput Specifies the input fields used to create an alert source usage check type CheckAlertSourceUsageCreateInput struct { - AlertSourceNamePredicate *PredicateInput `json:"alertSourceNamePredicate,omitempty" yaml:"alertSourceNamePredicate,omitempty"` // The condition that the alert source name should satisfy to be evaluated. (Optional.) - AlertSourceType *AlertSourceTypeEnum `json:"alertSourceType,omitempty" yaml:"alertSourceType,omitempty" example:"datadog"` // The type of the alert source. (Optional.) - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) -} - -// CheckAlertSourceUsageUpdateInput specifies the input fields used to update an alert source usage check. + AlertSourceNamePredicate *PredicateInput `json:"alertSourceNamePredicate,omitempty" yaml:"alertSourceNamePredicate,omitempty"` // The condition that the alert source name should satisfy to be evaluated (Optional) + AlertSourceType *AlertSourceTypeEnum `json:"alertSourceType,omitempty" yaml:"alertSourceType,omitempty" example:"datadog"` // The type of the alert source (Optional) + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Required) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check (Optional) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Required) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check (Required) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check (Optional) +} + +// CheckAlertSourceUsageUpdateInput Specifies the input fields used to update an alert source usage check type CheckAlertSourceUsageUpdateInput struct { - AlertSourceNamePredicate *PredicateUpdateInput `json:"alertSourceNamePredicate,omitempty" yaml:"alertSourceNamePredicate,omitempty"` // The condition that the alert source name should satisfy to be evaluated. (Optional.) - AlertSourceType *AlertSourceTypeEnum `json:"alertSourceType,omitempty" yaml:"alertSourceType,omitempty" example:"datadog"` // The type of the alert source. (Optional.) - CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) -} - -// CheckCodeIssueCreateInput specifies the input fields used to create a code issue check. + AlertSourceNamePredicate *PredicateUpdateInput `json:"alertSourceNamePredicate,omitempty" yaml:"alertSourceNamePredicate,omitempty"` // The condition that the alert source name should satisfy to be evaluated (Optional) + AlertSourceType *AlertSourceTypeEnum `json:"alertSourceType,omitempty" yaml:"alertSourceType,omitempty" example:"datadog"` // The type of the alert source (Optional) + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Optional) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated (Required) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check (Optional) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check (Optional) +} + +// CheckCodeIssueCreateInput Specifies the input fields used to create a code issue check type CheckCodeIssueCreateInput struct { - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - Constraint CheckCodeIssueConstraintEnum `json:"constraint" yaml:"constraint" example:"any"` // The type of constraint used in evaluation the code issues check. (Required.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - IssueName *Nullable[string] `json:"issueName,omitempty" yaml:"issueName,omitempty" example:"example_value"` // The issue name used for code issue lookup. (Optional.) - IssueType *Nullable[[]string] `json:"issueType,omitempty" yaml:"issueType,omitempty" example:"['bug', 'error']"` // The type of code issue to consider. (Optional.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - MaxAllowed *int `json:"maxAllowed,omitempty" yaml:"maxAllowed,omitempty" example:"3"` // The threshold count of code issues beyond which the check starts failing. (Optional.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - ResolutionTime *CodeIssueResolutionTimeInput `json:"resolutionTime,omitempty" yaml:"resolutionTime,omitempty"` // The resolution time recommended by the reporting source of the code issue. (Optional.) - Severity *Nullable[[]string] `json:"severity,omitempty" yaml:"severity,omitempty" example:"['sev1', 'sev2']"` // The severity levels of the issue. (Optional.) -} - -// CheckCodeIssueUpdateInput specifies the input fields used to update an exasting code issue check. + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Required) + Constraint CheckCodeIssueConstraintEnum `json:"constraint" yaml:"constraint" example:"any"` // The type of constraint used in evaluation the code issues check (Required) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check (Optional) + IssueName *Nullable[string] `json:"issueName,omitempty" yaml:"issueName,omitempty" example:"example_value"` // The issue name used for code issue lookup (Optional) + IssueType *Nullable[[]string] `json:"issueType,omitempty" yaml:"issueType,omitempty" example:"['bug', 'error']"` // The type of code issue to consider (Optional) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Required) + MaxAllowed *int `json:"maxAllowed,omitempty" yaml:"maxAllowed,omitempty" example:"3"` // The threshold count of code issues beyond which the check starts failing (Optional) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check (Required) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check (Optional) + ResolutionTime *CodeIssueResolutionTimeInput `json:"resolutionTime,omitempty" yaml:"resolutionTime,omitempty"` // The resolution time recommended by the reporting source of the code issue (Optional) + Severity *Nullable[[]string] `json:"severity,omitempty" yaml:"severity,omitempty" example:"['sev1', 'sev2']"` // The severity levels of the issue (Optional) +} + +// CheckCodeIssueUpdateInput Specifies the input fields used to update an exasting code issue check type CheckCodeIssueUpdateInput struct { - CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - Constraint CheckCodeIssueConstraintEnum `json:"constraint" yaml:"constraint" example:"any"` // The type of constraint used in evaluation the code issues check. (Required.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - IssueName *Nullable[string] `json:"issueName,omitempty" yaml:"issueName,omitempty" example:"example_value"` // The issue name used for code issue lookup. (Optional.) - IssueType *Nullable[[]string] `json:"issueType,omitempty" yaml:"issueType,omitempty" example:"['bug', 'error']"` // The type of code issue to consider. (Optional.) - LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - MaxAllowed *int `json:"maxAllowed,omitempty" yaml:"maxAllowed,omitempty" example:"3"` // The threshold count of code issues beyond which the check starts failing. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - ResolutionTime *CodeIssueResolutionTimeInput `json:"resolutionTime,omitempty" yaml:"resolutionTime,omitempty"` // The resolution time recommended by the reporting source of the code issue. (Optional.) - Severity *Nullable[[]string] `json:"severity,omitempty" yaml:"severity,omitempty" example:"['sev1', 'sev2']"` // The severity levels of the issue. (Optional.) -} - -// CheckCopyInput represents information about the check(s) that are to be copied. + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Optional) + Constraint CheckCodeIssueConstraintEnum `json:"constraint" yaml:"constraint" example:"any"` // The type of constraint used in evaluation the code issues check (Required) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated (Required) + IssueName *Nullable[string] `json:"issueName,omitempty" yaml:"issueName,omitempty" example:"example_value"` // The issue name used for code issue lookup (Optional) + IssueType *Nullable[[]string] `json:"issueType,omitempty" yaml:"issueType,omitempty" example:"['bug', 'error']"` // The type of code issue to consider (Optional) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Optional) + MaxAllowed *int `json:"maxAllowed,omitempty" yaml:"maxAllowed,omitempty" example:"3"` // The threshold count of code issues beyond which the check starts failing (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check (Optional) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check (Optional) + ResolutionTime *CodeIssueResolutionTimeInput `json:"resolutionTime,omitempty" yaml:"resolutionTime,omitempty"` // The resolution time recommended by the reporting source of the code issue (Optional) + Severity *Nullable[[]string] `json:"severity,omitempty" yaml:"severity,omitempty" example:"['sev1', 'sev2']"` // The severity levels of the issue (Optional) +} + +// CheckCopyInput Information about the check(s) that are to be copied type CheckCopyInput struct { - CheckIds []ID `json:"checkIds" yaml:"checkIds" example:"['Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk', 'Z2lkOi8vc2VydmljZS85ODc2NTQzMjE']"` // The IDs of the checks to be copied. (Required.) - Move *Nullable[bool] `json:"move,omitempty" yaml:"move,omitempty" example:"false"` // If set to true, the original checks will be deleted after being successfully copied. (Optional.) - TargetCategoryId ID `json:"targetCategoryId" yaml:"targetCategoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the category to which the checks are copied. Belongs to either the rubric or a scorecard. (Required.) - TargetLevelId *Nullable[ID] `json:"targetLevelId,omitempty" yaml:"targetLevelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the level which the copied checks are associated with. (Optional.) + CheckIds []ID `json:"checkIds" yaml:"checkIds" example:"['Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk', 'Z2lkOi8vc2VydmljZS85ODc2NTQzMjE']"` // The IDs of the checks to be copied (Required) + Move *Nullable[bool] `json:"move,omitempty" yaml:"move,omitempty" example:"false"` // If set to true, the original checks will be deleted after being successfully copied (Optional) + TargetCategoryId ID `json:"targetCategoryId" yaml:"targetCategoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the category to which the checks are copied. Belongs to either the rubric or a scorecard (Required) + TargetLevelId *Nullable[ID] `json:"targetLevelId,omitempty" yaml:"targetLevelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the level which the copied checks are associated with (Optional) } -// CheckCustomEventCreateInput represents creates a custom event check. +// CheckCustomEventCreateInput Creates a custom event check type CheckCustomEventCreateInput struct { - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - IntegrationId ID `json:"integrationId" yaml:"integrationId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The integration id this check will use. (Required.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - PassPending *Nullable[bool] `json:"passPending,omitempty" yaml:"passPending,omitempty" example:"false"` // True if this check should pass by default. Otherwise the default 'pending' state counts as a failure. (Optional.) - ResultMessage *Nullable[string] `json:"resultMessage,omitempty" yaml:"resultMessage,omitempty" example:"example_value"` // The check result message template. It is compiled with Liquid and formatted in Markdown. [More info about liquid templates](https://docs.opslevel.com/docs/checks/payload-checks/#liquid-templating). (Optional.) - ServiceSelector string `json:"serviceSelector" yaml:"serviceSelector" example:"example_value"` // A jq expression that will be ran against your payload. This will parse out the service identifier. [More info about jq](https://jqplay.org/). (Required.) - SuccessCondition string `json:"successCondition" yaml:"successCondition" example:"example_value"` // A jq expression that will be ran against your payload. A truthy value will result in the check passing. [More info about jq](https://jqplay.org/). (Required.) -} - -// CheckCustomEventUpdateInput specifies the input fields used to update a custom event check. + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Required) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check (Optional) + IntegrationId ID `json:"integrationId" yaml:"integrationId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The integration id this check will use (Required) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Required) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check (Required) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check (Optional) + PassPending *Nullable[bool] `json:"passPending,omitempty" yaml:"passPending,omitempty" example:"false"` // True if this check should pass by default. Otherwise the default 'pending' state counts as a failure (Optional) + ResultMessage *Nullable[string] `json:"resultMessage,omitempty" yaml:"resultMessage,omitempty" example:"example_value"` // The check result message template. It is compiled with Liquid and formatted in Markdown. [More info about liquid templates](https://docs.opslevel.com/docs/checks/payload-checks/#liquid-templating) (Optional) + ServiceSelector string `json:"serviceSelector" yaml:"serviceSelector" example:"example_value"` // A jq expression that will be ran against your payload. This will parse out the service identifier. [More info about jq](https://jqplay.org/) (Required) + SuccessCondition string `json:"successCondition" yaml:"successCondition" example:"example_value"` // A jq expression that will be ran against your payload. A truthy value will result in the check passing. [More info about jq](https://jqplay.org/) (Required) +} + +// CheckCustomEventUpdateInput Specifies the input fields used to update a custom event check type CheckCustomEventUpdateInput struct { - CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - IntegrationId *Nullable[ID] `json:"integrationId,omitempty" yaml:"integrationId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The integration id this check will use. (Optional.) - LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - PassPending *Nullable[bool] `json:"passPending,omitempty" yaml:"passPending,omitempty" example:"false"` // True if this check should pass by default. Otherwise the default 'pending' state counts as a failure. (Optional.) - ResultMessage *Nullable[string] `json:"resultMessage,omitempty" yaml:"resultMessage,omitempty" example:"example_value"` // The check result message template. It is compiled with Liquid and formatted in Markdown. [More info about liquid templates](https://docs.opslevel.com/docs/checks/payload-checks/#liquid-templating). (Optional.) - ServiceSelector *Nullable[string] `json:"serviceSelector,omitempty" yaml:"serviceSelector,omitempty" example:"example_value"` // A jq expression that will be ran against your payload. This will parse out the service identifier. [More info about jq](https://jqplay.org/). (Optional.) - SuccessCondition *Nullable[string] `json:"successCondition,omitempty" yaml:"successCondition,omitempty" example:"example_value"` // A jq expression that will be ran against your payload. A truthy value will result in the check passing. [More info about jq](https://jqplay.org/). (Optional.) -} - -// CheckDeleteInput specifies the input fields used to delete a check. + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Optional) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated (Required) + IntegrationId *Nullable[ID] `json:"integrationId,omitempty" yaml:"integrationId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The integration id this check will use (Optional) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check (Optional) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check (Optional) + PassPending *Nullable[bool] `json:"passPending,omitempty" yaml:"passPending,omitempty" example:"false"` // True if this check should pass by default. Otherwise the default 'pending' state counts as a failure (Optional) + ResultMessage *Nullable[string] `json:"resultMessage,omitempty" yaml:"resultMessage,omitempty" example:"example_value"` // The check result message template. It is compiled with Liquid and formatted in Markdown. [More info about liquid templates](https://docs.opslevel.com/docs/checks/payload-checks/#liquid-templating) (Optional) + ServiceSelector *Nullable[string] `json:"serviceSelector,omitempty" yaml:"serviceSelector,omitempty" example:"example_value"` // A jq expression that will be ran against your payload. This will parse out the service identifier. [More info about jq](https://jqplay.org/) (Optional) + SuccessCondition *Nullable[string] `json:"successCondition,omitempty" yaml:"successCondition,omitempty" example:"example_value"` // A jq expression that will be ran against your payload. A truthy value will result in the check passing. [More info about jq](https://jqplay.org/) (Optional) +} + +// CheckDeleteInput Specifies the input fields used to delete a check type CheckDeleteInput struct { - Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be deleted. (Optional.) + Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be deleted (Optional) } -// CheckGitBranchProtectionCreateInput specifies the input fields used to create a branch protection check. +// CheckGitBranchProtectionCreateInput Specifies the input fields used to create a branch protection check type CheckGitBranchProtectionCreateInput struct { - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Required) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check (Optional) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Required) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check (Required) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check (Optional) } -// CheckGitBranchProtectionUpdateInput specifies the input fields used to update a branch protection check. +// CheckGitBranchProtectionUpdateInput Specifies the input fields used to update a branch protection check type CheckGitBranchProtectionUpdateInput struct { - CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) -} - -// CheckHasDocumentationCreateInput specifies the input fields used to create a documentation check. + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Optional) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated (Required) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check (Optional) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check (Optional) +} + +// CheckHasDocumentationCreateInput Specifies the input fields used to create a documentation check type CheckHasDocumentationCreateInput struct { - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - DocumentSubtype HasDocumentationSubtypeEnum `json:"documentSubtype" yaml:"documentSubtype" example:"openapi"` // The subtype of the document. (Required.) - DocumentType HasDocumentationTypeEnum `json:"documentType" yaml:"documentType" example:"api"` // The type of the document. (Required.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) -} - -// CheckHasDocumentationUpdateInput specifies the input fields used to update a documentation check. + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Required) + DocumentSubtype HasDocumentationSubtypeEnum `json:"documentSubtype" yaml:"documentSubtype" example:"openapi"` // The subtype of the document (Required) + DocumentType HasDocumentationTypeEnum `json:"documentType" yaml:"documentType" example:"api"` // The type of the document (Required) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check (Optional) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Required) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check (Required) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check (Optional) +} + +// CheckHasDocumentationUpdateInput Specifies the input fields used to update a documentation check type CheckHasDocumentationUpdateInput struct { - CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - DocumentSubtype *HasDocumentationSubtypeEnum `json:"documentSubtype,omitempty" yaml:"documentSubtype,omitempty" example:"openapi"` // The subtype of the document. (Optional.) - DocumentType *HasDocumentationTypeEnum `json:"documentType,omitempty" yaml:"documentType,omitempty" example:"api"` // The type of the document. (Optional.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) -} - -// CheckHasRecentDeployCreateInput specifies the input fields used to create a recent deploys check. + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Optional) + DocumentSubtype *HasDocumentationSubtypeEnum `json:"documentSubtype,omitempty" yaml:"documentSubtype,omitempty" example:"openapi"` // The subtype of the document (Optional) + DocumentType *HasDocumentationTypeEnum `json:"documentType,omitempty" yaml:"documentType,omitempty" example:"api"` // The type of the document (Optional) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated (Required) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check (Optional) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check (Optional) +} + +// CheckHasRecentDeployCreateInput Specifies the input fields used to create a recent deploys check type CheckHasRecentDeployCreateInput struct { - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - Days int `json:"days" yaml:"days" example:"3"` // The number of days to check since the last deploy. (Required.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) -} - -// CheckHasRecentDeployUpdateInput specifies the input fields used to update a has recent deploy check. + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Required) + Days int `json:"days" yaml:"days" example:"3"` // The number of days to check since the last deploy (Required) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check (Optional) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Required) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check (Required) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check (Optional) +} + +// CheckHasRecentDeployUpdateInput Specifies the input fields used to update a has recent deploy check type CheckHasRecentDeployUpdateInput struct { - CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - Days *int `json:"days,omitempty" yaml:"days,omitempty" example:"3"` // The number of days to check since the last deploy. (Optional.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) -} - -// CheckManualCreateInput specifies the input fields used to create a manual check. + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Optional) + Days *int `json:"days,omitempty" yaml:"days,omitempty" example:"3"` // The number of days to check since the last deploy (Optional) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated (Required) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check (Optional) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check (Optional) +} + +// CheckManualCreateInput Specifies the input fields used to create a manual check type CheckManualCreateInput struct { - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - UpdateFrequency *ManualCheckFrequencyInput `json:"updateFrequency,omitempty" yaml:"updateFrequency,omitempty"` // Defines the minimum frequency of the updates. (Optional.) - UpdateRequiresComment bool `json:"updateRequiresComment" yaml:"updateRequiresComment" example:"false"` // Whether the check requires a comment or not. (Required.) -} - -// CheckManualUpdateInput specifies the input fields used to update a manual check. + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Required) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check (Optional) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Required) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check (Required) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check (Optional) + UpdateFrequency *ManualCheckFrequencyInput `json:"updateFrequency,omitempty" yaml:"updateFrequency,omitempty"` // Defines the minimum frequency of the updates (Optional) + UpdateRequiresComment bool `json:"updateRequiresComment" yaml:"updateRequiresComment" example:"false"` // Whether the check requires a comment or not (Required) +} + +// CheckManualUpdateInput Specifies the input fields used to update a manual check type CheckManualUpdateInput struct { - CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - UpdateFrequency *ManualCheckFrequencyUpdateInput `json:"updateFrequency,omitempty" yaml:"updateFrequency,omitempty"` // Defines the minimum frequency of the updates. (Optional.) - UpdateRequiresComment *Nullable[bool] `json:"updateRequiresComment,omitempty" yaml:"updateRequiresComment,omitempty" example:"false"` // Whether the check requires a comment or not. (Optional.) -} - -// CheckPackageVersionCreateInput represents information about the package version check to be created. + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Optional) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated (Required) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check (Optional) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check (Optional) + UpdateFrequency *ManualCheckFrequencyUpdateInput `json:"updateFrequency,omitempty" yaml:"updateFrequency,omitempty"` // Defines the minimum frequency of the updates (Optional) + UpdateRequiresComment *Nullable[bool] `json:"updateRequiresComment,omitempty" yaml:"updateRequiresComment,omitempty" example:"false"` // Whether the check requires a comment or not (Optional) +} + +// CheckPackageVersionCreateInput Information about the package version check to be created type CheckPackageVersionCreateInput struct { - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - MissingPackageResult *CheckResultStatusEnum `json:"missingPackageResult,omitempty" yaml:"missingPackageResult,omitempty" example:"failed"` // The check result if the package isn't being used by a service. (Optional.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - PackageConstraint PackageConstraintEnum `json:"packageConstraint" yaml:"packageConstraint" example:"does_not_exist"` // The package constraint the service is to be checked for. (Required.) - PackageManager PackageManagerEnum `json:"packageManager" yaml:"packageManager" example:"alpm"` // The package manager (ecosystem) this package relates to. (Required.) - PackageName string `json:"packageName" yaml:"packageName" example:"example_value"` // The name of the package to be checked. (Required.) - PackageNameIsRegex *Nullable[bool] `json:"packageNameIsRegex,omitempty" yaml:"packageNameIsRegex,omitempty" example:"false"` // Whether or not the value in the package name field is a regular expression. (Optional.) - VersionConstraintPredicate *PredicateInput `json:"versionConstraintPredicate,omitempty" yaml:"versionConstraintPredicate,omitempty"` // The predicate that describes the version constraint the package must satisfy. (Optional.) -} - -// CheckPackageVersionUpdateInput represents information about the package version check to be updated. + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Required) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check (Optional) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Required) + MissingPackageResult *CheckResultStatusEnum `json:"missingPackageResult,omitempty" yaml:"missingPackageResult,omitempty" example:"failed"` // The check result if the package isn't being used by a service (Optional) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check (Required) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check (Optional) + PackageConstraint PackageConstraintEnum `json:"packageConstraint" yaml:"packageConstraint" example:"does_not_exist"` // The package constraint the service is to be checked for (Required) + PackageManager PackageManagerEnum `json:"packageManager" yaml:"packageManager" example:"alpm"` // The package manager (ecosystem) this package relates to (Required) + PackageName string `json:"packageName" yaml:"packageName" example:"example_value"` // The name of the package to be checked (Required) + PackageNameIsRegex *Nullable[bool] `json:"packageNameIsRegex,omitempty" yaml:"packageNameIsRegex,omitempty" example:"false"` // Whether or not the value in the package name field is a regular expression (Optional) + VersionConstraintPredicate *PredicateInput `json:"versionConstraintPredicate,omitempty" yaml:"versionConstraintPredicate,omitempty"` // The predicate that describes the version constraint the package must satisfy (Optional) +} + +// CheckPackageVersionUpdateInput Information about the package version check to be updated type CheckPackageVersionUpdateInput struct { - CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - MissingPackageResult *CheckResultStatusEnum `json:"missingPackageResult,omitempty" yaml:"missingPackageResult,omitempty" example:"failed"` // The check result if the package isn't being used by a service. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - PackageConstraint *PackageConstraintEnum `json:"packageConstraint,omitempty" yaml:"packageConstraint,omitempty" example:"does_not_exist"` // The package constraint the service is to be checked for. (Optional.) - PackageManager *PackageManagerEnum `json:"packageManager,omitempty" yaml:"packageManager,omitempty" example:"alpm"` // The package manager (ecosystem) this package relates to. (Optional.) - PackageName *Nullable[string] `json:"packageName,omitempty" yaml:"packageName,omitempty" example:"example_value"` // The name of the package to be checked. (Optional.) - PackageNameIsRegex *Nullable[bool] `json:"packageNameIsRegex,omitempty" yaml:"packageNameIsRegex,omitempty" example:"false"` // Whether or not the value in the package name field is a regular expression. (Optional.) - VersionConstraintPredicate *PredicateUpdateInput `json:"versionConstraintPredicate,omitempty" yaml:"versionConstraintPredicate,omitempty"` // The predicate that describes the version constraint the package must satisfy. (Optional.) -} - -// CheckRepositoryFileCreateInput specifies the input fields used to create a repo file check. + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Optional) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated (Required) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Optional) + MissingPackageResult *CheckResultStatusEnum `json:"missingPackageResult,omitempty" yaml:"missingPackageResult,omitempty" example:"failed"` // The check result if the package isn't being used by a service (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check (Optional) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check (Optional) + PackageConstraint *PackageConstraintEnum `json:"packageConstraint,omitempty" yaml:"packageConstraint,omitempty" example:"does_not_exist"` // The package constraint the service is to be checked for (Optional) + PackageManager *PackageManagerEnum `json:"packageManager,omitempty" yaml:"packageManager,omitempty" example:"alpm"` // The package manager (ecosystem) this package relates to (Optional) + PackageName *Nullable[string] `json:"packageName,omitempty" yaml:"packageName,omitempty" example:"example_value"` // The name of the package to be checked (Optional) + PackageNameIsRegex *Nullable[bool] `json:"packageNameIsRegex,omitempty" yaml:"packageNameIsRegex,omitempty" example:"false"` // Whether or not the value in the package name field is a regular expression (Optional) + VersionConstraintPredicate *PredicateUpdateInput `json:"versionConstraintPredicate,omitempty" yaml:"versionConstraintPredicate,omitempty"` // The predicate that describes the version constraint the package must satisfy (Optional) +} + +// CheckRepositoryFileCreateInput Specifies the input fields used to create a repo file check type CheckRepositoryFileCreateInput struct { - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - DirectorySearch *Nullable[bool] `json:"directorySearch,omitempty" yaml:"directorySearch,omitempty" example:"false"` // Whether the check looks for the existence of a directory instead of a file. (Optional.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FileContentsPredicate *PredicateInput `json:"fileContentsPredicate,omitempty" yaml:"fileContentsPredicate,omitempty"` // Condition to match the file content. (Optional.) - FilePaths []string `json:"filePaths" yaml:"filePaths" example:"['/usr/local/bin', '/home/opslevel']"` // Restrict the search to certain file paths. (Required.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - UseAbsoluteRoot *Nullable[bool] `json:"useAbsoluteRoot,omitempty" yaml:"useAbsoluteRoot,omitempty" example:"false"` // Whether the checks looks at the absolute root of a repo or the relative root (the directory specified when attached a repo to a service). (Optional.) -} - -// CheckRepositoryFileUpdateInput specifies the input fields used to update a repo file check. + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Required) + DirectorySearch *Nullable[bool] `json:"directorySearch,omitempty" yaml:"directorySearch,omitempty" example:"false"` // Whether the check looks for the existence of a directory instead of a file (Optional) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FileContentsPredicate *PredicateInput `json:"fileContentsPredicate,omitempty" yaml:"fileContentsPredicate,omitempty"` // Condition to match the file content (Optional) + FilePaths []string `json:"filePaths" yaml:"filePaths" example:"['/usr/local/bin', '/home/opslevel']"` // Restrict the search to certain file paths (Required) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check (Optional) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Required) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check (Required) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check (Optional) + UseAbsoluteRoot *Nullable[bool] `json:"useAbsoluteRoot,omitempty" yaml:"useAbsoluteRoot,omitempty" example:"false"` // Whether the checks looks at the absolute root of a repo or the relative root (the directory specified when attached a repo to a service) (Optional) +} + +// CheckRepositoryFileUpdateInput Specifies the input fields used to update a repo file check type CheckRepositoryFileUpdateInput struct { - CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - DirectorySearch *Nullable[bool] `json:"directorySearch,omitempty" yaml:"directorySearch,omitempty" example:"false"` // Whether the check looks for the existence of a directory instead of a file. (Optional.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FileContentsPredicate *PredicateUpdateInput `json:"fileContentsPredicate,omitempty" yaml:"fileContentsPredicate,omitempty"` // Condition to match the file content. (Optional.) - FilePaths *Nullable[[]string] `json:"filePaths,omitempty" yaml:"filePaths,omitempty" example:"['/usr/local/bin', '/home/opslevel']"` // Restrict the search to certain file paths. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - UseAbsoluteRoot *Nullable[bool] `json:"useAbsoluteRoot,omitempty" yaml:"useAbsoluteRoot,omitempty" example:"false"` // Whether the checks looks at the absolute root of a repo or the relative root (the directory specified when attached a repo to a service). (Optional.) -} - -// CheckRepositoryGrepCreateInput specifies the input fields used to create a repo grep check. + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Optional) + DirectorySearch *Nullable[bool] `json:"directorySearch,omitempty" yaml:"directorySearch,omitempty" example:"false"` // Whether the check looks for the existence of a directory instead of a file (Optional) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FileContentsPredicate *PredicateUpdateInput `json:"fileContentsPredicate,omitempty" yaml:"fileContentsPredicate,omitempty"` // Condition to match the file content (Optional) + FilePaths *Nullable[[]string] `json:"filePaths,omitempty" yaml:"filePaths,omitempty" example:"['/usr/local/bin', '/home/opslevel']"` // Restrict the search to certain file paths (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated (Required) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check (Optional) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check (Optional) + UseAbsoluteRoot *Nullable[bool] `json:"useAbsoluteRoot,omitempty" yaml:"useAbsoluteRoot,omitempty" example:"false"` // Whether the checks looks at the absolute root of a repo or the relative root (the directory specified when attached a repo to a service) (Optional) +} + +// CheckRepositoryGrepCreateInput Specifies the input fields used to create a repo grep check type CheckRepositoryGrepCreateInput struct { - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - DirectorySearch *Nullable[bool] `json:"directorySearch,omitempty" yaml:"directorySearch,omitempty" example:"false"` // Whether the check looks for the existence of a directory instead of a file. (Optional.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FileContentsPredicate PredicateInput `json:"fileContentsPredicate" yaml:"fileContentsPredicate"` // Condition to match the file content. (Required.) - FilePaths []string `json:"filePaths" yaml:"filePaths" example:"['/usr/local/bin', '/home/opslevel']"` // Restrict the search to certain file paths. (Required.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) -} - -// CheckRepositoryGrepUpdateInput specifies the input fields used to update a repo file check. + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Required) + DirectorySearch *Nullable[bool] `json:"directorySearch,omitempty" yaml:"directorySearch,omitempty" example:"false"` // Whether the check looks for the existence of a directory instead of a file (Optional) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FileContentsPredicate PredicateInput `json:"fileContentsPredicate" yaml:"fileContentsPredicate"` // Condition to match the file content (Required) + FilePaths []string `json:"filePaths" yaml:"filePaths" example:"['/usr/local/bin', '/home/opslevel']"` // Restrict the search to certain file paths (Required) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check (Optional) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Required) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check (Required) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check (Optional) +} + +// CheckRepositoryGrepUpdateInput Specifies the input fields used to update a repo file check type CheckRepositoryGrepUpdateInput struct { - CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - DirectorySearch *Nullable[bool] `json:"directorySearch,omitempty" yaml:"directorySearch,omitempty" example:"false"` // Whether the check looks for the existence of a directory instead of a file. (Optional.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FileContentsPredicate *PredicateUpdateInput `json:"fileContentsPredicate,omitempty" yaml:"fileContentsPredicate,omitempty"` // Condition to match the file content. (Optional.) - FilePaths *Nullable[[]string] `json:"filePaths,omitempty" yaml:"filePaths,omitempty" example:"['/usr/local/bin', '/home/opslevel']"` // Restrict the search to certain file paths. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) -} - -// CheckRepositoryIntegratedCreateInput specifies the input fields used to create a repository integrated check. + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Optional) + DirectorySearch *Nullable[bool] `json:"directorySearch,omitempty" yaml:"directorySearch,omitempty" example:"false"` // Whether the check looks for the existence of a directory instead of a file (Optional) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FileContentsPredicate *PredicateUpdateInput `json:"fileContentsPredicate,omitempty" yaml:"fileContentsPredicate,omitempty"` // Condition to match the file content (Optional) + FilePaths *Nullable[[]string] `json:"filePaths,omitempty" yaml:"filePaths,omitempty" example:"['/usr/local/bin', '/home/opslevel']"` // Restrict the search to certain file paths (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated (Required) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check (Optional) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check (Optional) +} + +// CheckRepositoryIntegratedCreateInput Specifies the input fields used to create a repository integrated check type CheckRepositoryIntegratedCreateInput struct { - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Required) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check (Optional) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Required) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check (Required) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check (Optional) } -// CheckRepositoryIntegratedUpdateInput specifies the input fields used to update a repository integrated check. +// CheckRepositoryIntegratedUpdateInput Specifies the input fields used to update a repository integrated check type CheckRepositoryIntegratedUpdateInput struct { - CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) -} - -// CheckRepositorySearchCreateInput specifies the input fields used to create a repo search check. + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Optional) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated (Required) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check (Optional) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check (Optional) +} + +// CheckRepositorySearchCreateInput Specifies the input fields used to create a repo search check type CheckRepositorySearchCreateInput struct { - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FileContentsPredicate PredicateInput `json:"fileContentsPredicate" yaml:"fileContentsPredicate"` // Condition to match the text content. (Required.) - FileExtensions *Nullable[[]string] `json:"fileExtensions,omitempty" yaml:"fileExtensions,omitempty" example:"['go', 'py', 'rb']"` // Restrict the search to files of given extensions. Extensions should contain only letters and numbers. For example: `['py', 'rb']`. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) -} - -// CheckRepositorySearchUpdateInput specifies the input fields used to update a repo search check. + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Required) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FileContentsPredicate PredicateInput `json:"fileContentsPredicate" yaml:"fileContentsPredicate"` // Condition to match the text content (Required) + FileExtensions *Nullable[[]string] `json:"fileExtensions,omitempty" yaml:"fileExtensions,omitempty" example:"['go', 'py', 'rb']"` // Restrict the search to files of given extensions. Extensions should contain only letters and numbers. For example: `['py', 'rb']` (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check (Optional) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Required) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check (Required) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check (Optional) +} + +// CheckRepositorySearchUpdateInput Specifies the input fields used to update a repo search check type CheckRepositorySearchUpdateInput struct { - CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FileContentsPredicate *PredicateUpdateInput `json:"fileContentsPredicate,omitempty" yaml:"fileContentsPredicate,omitempty"` // Condition to match the text content. (Optional.) - FileExtensions *Nullable[[]string] `json:"fileExtensions,omitempty" yaml:"fileExtensions,omitempty" example:"['go', 'py', 'rb']"` // Restrict the search to files of given extensions. Extensions should contain only letters and numbers. For example: `['py', 'rb']`. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) -} - -// CheckServiceConfigurationCreateInput specifies the input fields used to create a configuration check. + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Optional) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FileContentsPredicate *PredicateUpdateInput `json:"fileContentsPredicate,omitempty" yaml:"fileContentsPredicate,omitempty"` // Condition to match the text content (Optional) + FileExtensions *Nullable[[]string] `json:"fileExtensions,omitempty" yaml:"fileExtensions,omitempty" example:"['go', 'py', 'rb']"` // Restrict the search to files of given extensions. Extensions should contain only letters and numbers. For example: `['py', 'rb']` (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated (Required) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check (Optional) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check (Optional) +} + +// CheckServiceConfigurationCreateInput Specifies the input fields used to create a configuration check type CheckServiceConfigurationCreateInput struct { - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Required) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check (Optional) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Required) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check (Required) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check (Optional) } -// CheckServiceConfigurationUpdateInput specifies the input fields used to update a configuration check. +// CheckServiceConfigurationUpdateInput Specifies the input fields used to update a configuration check type CheckServiceConfigurationUpdateInput struct { - CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) -} - -// CheckServiceDependencyCreateInput specifies the input fields used to create a service dependency check. + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Optional) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated (Required) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check (Optional) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check (Optional) +} + +// CheckServiceDependencyCreateInput Specifies the input fields used to create a service dependency check type CheckServiceDependencyCreateInput struct { - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Required) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check (Optional) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Required) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check (Required) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check (Optional) } -// CheckServiceDependencyUpdateInput specifies the input fields used to update a service dependency check. +// CheckServiceDependencyUpdateInput Specifies the input fields used to update a service dependency check type CheckServiceDependencyUpdateInput struct { - CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) -} - -// CheckServiceOwnershipCreateInput specifies the input fields used to create an ownership check. + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Optional) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated (Required) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check (Optional) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check (Optional) +} + +// CheckServiceOwnershipCreateInput Specifies the input fields used to create an ownership check type CheckServiceOwnershipCreateInput struct { - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - ContactMethod *Nullable[string] `json:"contactMethod,omitempty" yaml:"contactMethod,omitempty" example:"example_value"` // The type of contact method that an owner should provide (Optional.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - RequireContactMethod *Nullable[bool] `json:"requireContactMethod,omitempty" yaml:"requireContactMethod,omitempty" example:"false"` // Whether to require a contact method for a service owner or not (Optional.) - TagKey *Nullable[string] `json:"tagKey,omitempty" yaml:"tagKey,omitempty" example:"example_value"` // The tag key that should exist for a service owner. (Optional.) - TagPredicate *PredicateInput `json:"tagPredicate,omitempty" yaml:"tagPredicate,omitempty"` // The condition that should be satisfied by the tag value. (Optional.) -} - -// CheckServiceOwnershipUpdateInput specifies the input fields used to update an ownership check. + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Required) + ContactMethod *Nullable[string] `json:"contactMethod,omitempty" yaml:"contactMethod,omitempty" example:"example_value"` // The type of contact method that an owner should provide (Optional) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check (Optional) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Required) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check (Required) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check (Optional) + RequireContactMethod *Nullable[bool] `json:"requireContactMethod,omitempty" yaml:"requireContactMethod,omitempty" example:"false"` // Whether to require a contact method for a service owner or not (Optional) + TagKey *Nullable[string] `json:"tagKey,omitempty" yaml:"tagKey,omitempty" example:"example_value"` // The tag key that should exist for a service owner (Optional) + TagPredicate *PredicateInput `json:"tagPredicate,omitempty" yaml:"tagPredicate,omitempty"` // The condition that should be satisfied by the tag value (Optional) +} + +// CheckServiceOwnershipUpdateInput Specifies the input fields used to update an ownership check type CheckServiceOwnershipUpdateInput struct { - CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - ContactMethod *Nullable[string] `json:"contactMethod,omitempty" yaml:"contactMethod,omitempty" example:"example_value"` // The type of contact method that an owner should provide (Optional.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - RequireContactMethod *Nullable[bool] `json:"requireContactMethod,omitempty" yaml:"requireContactMethod,omitempty" example:"false"` // Whether to require a contact method for a service owner or not (Optional.) - TagKey *Nullable[string] `json:"tagKey,omitempty" yaml:"tagKey,omitempty" example:"example_value"` // The tag key that should exist for a service owner. (Optional.) - TagPredicate *PredicateUpdateInput `json:"tagPredicate,omitempty" yaml:"tagPredicate,omitempty"` // The condition that should be satisfied by the tag value. (Optional.) -} - -// CheckServicePropertyCreateInput specifies the input fields used to create a service property check. + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Optional) + ContactMethod *Nullable[string] `json:"contactMethod,omitempty" yaml:"contactMethod,omitempty" example:"example_value"` // The type of contact method that an owner should provide (Optional) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated (Required) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check (Optional) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check (Optional) + RequireContactMethod *Nullable[bool] `json:"requireContactMethod,omitempty" yaml:"requireContactMethod,omitempty" example:"false"` // Whether to require a contact method for a service owner or not (Optional) + TagKey *Nullable[string] `json:"tagKey,omitempty" yaml:"tagKey,omitempty" example:"example_value"` // The tag key that should exist for a service owner (Optional) + TagPredicate *PredicateUpdateInput `json:"tagPredicate,omitempty" yaml:"tagPredicate,omitempty"` // The condition that should be satisfied by the tag value (Optional) +} + +// CheckServicePropertyCreateInput Specifies the input fields used to create a service property check type CheckServicePropertyCreateInput struct { - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - ComponentType *IdentifierInput `json:"componentType,omitempty" yaml:"componentType,omitempty"` // The Component Type that a custom property belongs to. Defaults to Service properties if not provided. (Optional.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - PropertyDefinition *IdentifierInput `json:"propertyDefinition,omitempty" yaml:"propertyDefinition,omitempty"` // The secondary key of the property that the check will verify (e.g. the specific custom property). (Optional.) - PropertyValuePredicate *PredicateInput `json:"propertyValuePredicate,omitempty" yaml:"propertyValuePredicate,omitempty"` // The condition that should be satisfied by the service property value. (Optional.) - ServiceProperty ServicePropertyTypeEnum `json:"serviceProperty" yaml:"serviceProperty" example:"custom_property"` // The property of the service that the check will verify. (Required.) -} - -// CheckServicePropertyUpdateInput specifies the input fields used to update a service property check. + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Required) + ComponentType *IdentifierInput `json:"componentType,omitempty" yaml:"componentType,omitempty"` // The Component Type that a custom property belongs to. Defaults to Service properties if not provided (Optional) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check (Optional) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Required) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check (Required) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check (Optional) + PropertyDefinition *IdentifierInput `json:"propertyDefinition,omitempty" yaml:"propertyDefinition,omitempty"` // The secondary key of the property that the check will verify (e.g. the specific custom property) (Optional) + PropertyValuePredicate *PredicateInput `json:"propertyValuePredicate,omitempty" yaml:"propertyValuePredicate,omitempty"` // The condition that should be satisfied by the service property value (Optional) + ServiceProperty ServicePropertyTypeEnum `json:"serviceProperty" yaml:"serviceProperty" example:"custom_property"` // The property of the service that the check will verify (Required) +} + +// CheckServicePropertyUpdateInput Specifies the input fields used to update a service property check type CheckServicePropertyUpdateInput struct { - CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - ComponentType *IdentifierInput `json:"componentType,omitempty" yaml:"componentType,omitempty"` // The Component Type that a custom property belongs to. Defaults to Service properties if not provided. (Optional.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - PropertyDefinition *IdentifierInput `json:"propertyDefinition,omitempty" yaml:"propertyDefinition,omitempty"` // The secondary key of the property that the check will verify (e.g. the specific custom property). (Optional.) - PropertyValuePredicate *PredicateUpdateInput `json:"propertyValuePredicate,omitempty" yaml:"propertyValuePredicate,omitempty"` // The condition that should be satisfied by the service property value. (Optional.) - ServiceProperty *ServicePropertyTypeEnum `json:"serviceProperty,omitempty" yaml:"serviceProperty,omitempty" example:"custom_property"` // The property of the service that the check will verify. (Optional.) -} - -// CheckTagDefinedCreateInput specifies the input fields used to create a tag check. + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Optional) + ComponentType *IdentifierInput `json:"componentType,omitempty" yaml:"componentType,omitempty"` // The Component Type that a custom property belongs to. Defaults to Service properties if not provided (Optional) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated (Required) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check (Optional) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check (Optional) + PropertyDefinition *IdentifierInput `json:"propertyDefinition,omitempty" yaml:"propertyDefinition,omitempty"` // The secondary key of the property that the check will verify (e.g. the specific custom property) (Optional) + PropertyValuePredicate *PredicateUpdateInput `json:"propertyValuePredicate,omitempty" yaml:"propertyValuePredicate,omitempty"` // The condition that should be satisfied by the service property value (Optional) + ServiceProperty *ServicePropertyTypeEnum `json:"serviceProperty,omitempty" yaml:"serviceProperty,omitempty" example:"custom_property"` // The property of the service that the check will verify (Optional) +} + +// CheckTagDefinedCreateInput Specifies the input fields used to create a tag check type CheckTagDefinedCreateInput struct { - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - TagKey string `json:"tagKey" yaml:"tagKey" example:"example_value"` // The tag key where the tag predicate should be applied. (Required.) - TagPredicate *PredicateInput `json:"tagPredicate,omitempty" yaml:"tagPredicate,omitempty"` // The condition that should be satisfied by the tag value. (Optional.) -} - -// CheckTagDefinedUpdateInput specifies the input fields used to update a tag defined check. + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Required) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check (Optional) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Required) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check (Required) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check (Optional) + TagKey string `json:"tagKey" yaml:"tagKey" example:"example_value"` // The tag key where the tag predicate should be applied (Required) + TagPredicate *PredicateInput `json:"tagPredicate,omitempty" yaml:"tagPredicate,omitempty"` // The condition that should be satisfied by the tag value (Optional) +} + +// CheckTagDefinedUpdateInput Specifies the input fields used to update a tag defined check type CheckTagDefinedUpdateInput struct { - CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - TagKey *Nullable[string] `json:"tagKey,omitempty" yaml:"tagKey,omitempty" example:"example_value"` // The tag key where the tag predicate should be applied. (Optional.) - TagPredicate *PredicateUpdateInput `json:"tagPredicate,omitempty" yaml:"tagPredicate,omitempty"` // The condition that should be satisfied by the tag value. (Optional.) -} - -// CheckToPromoteInput specifies the input fields used to promote a campaign check to the rubric. + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Optional) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated (Required) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check (Optional) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check (Optional) + TagKey *Nullable[string] `json:"tagKey,omitempty" yaml:"tagKey,omitempty" example:"example_value"` // The tag key where the tag predicate should be applied (Optional) + TagPredicate *PredicateUpdateInput `json:"tagPredicate,omitempty" yaml:"tagPredicate,omitempty"` // The condition that should be satisfied by the tag value (Optional) +} + +// CheckToPromoteInput Specifies the input fields used to promote a campaign check to the rubric type CheckToPromoteInput struct { - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the category that the promoted check will be linked to. (Required.) - CheckId ID `json:"checkId" yaml:"checkId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the check to be promoted to the rubric. (Required.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the level that the promoted check will be linked to. (Required.) + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the category that the promoted check will be linked to (Required) + CheckId ID `json:"checkId" yaml:"checkId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the check to be promoted to the rubric (Required) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the level that the promoted check will be linked to (Required) } -// CheckToolUsageCreateInput specifies the input fields used to create a tool usage check. +// CheckToolUsageCreateInput Specifies the input fields used to create a tool usage check type CheckToolUsageCreateInput struct { - CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Required.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnvironmentPredicate *PredicateInput `json:"environmentPredicate,omitempty" yaml:"environmentPredicate,omitempty"` // The condition that the environment should satisfy to be evaluated. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check. (Optional.) - LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Required.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check. (Required.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check. (Optional.) - ToolCategory ToolCategory `json:"toolCategory" yaml:"toolCategory" example:"admin"` // The category that the tool belongs to. (Required.) - ToolNamePredicate *PredicateInput `json:"toolNamePredicate,omitempty" yaml:"toolNamePredicate,omitempty"` // The condition that the tool name should satisfy to be evaluated. (Optional.) - ToolUrlPredicate *PredicateInput `json:"toolUrlPredicate,omitempty" yaml:"toolUrlPredicate,omitempty"` // The condition that the tool url should satisfy to be evaluated. (Optional.) -} - -// CheckToolUsageUpdateInput specifies the input fields used to update a tool usage check. + CategoryId ID `json:"categoryId" yaml:"categoryId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Required) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + EnvironmentPredicate *PredicateInput `json:"environmentPredicate,omitempty" yaml:"environmentPredicate,omitempty"` // The condition that the environment should satisfy to be evaluated (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter of the check (Optional) + LevelId ID `json:"levelId" yaml:"levelId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Required) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check (Required) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team that owns the check (Optional) + ToolCategory ToolCategory `json:"toolCategory" yaml:"toolCategory" example:"admin"` // The category that the tool belongs to (Required) + ToolNamePredicate *PredicateInput `json:"toolNamePredicate,omitempty" yaml:"toolNamePredicate,omitempty"` // The condition that the tool name should satisfy to be evaluated (Optional) + ToolUrlPredicate *PredicateInput `json:"toolUrlPredicate,omitempty" yaml:"toolUrlPredicate,omitempty"` // The condition that the tool url should satisfy to be evaluated (Optional) +} + +// CheckToolUsageUpdateInput Specifies the input fields used to update a tool usage check type CheckToolUsageUpdateInput struct { - CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to. (Optional.) - EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled. (Optional.) - Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not. (Optional.) - EnvironmentPredicate *PredicateUpdateInput `json:"environmentPredicate,omitempty" yaml:"environmentPredicate,omitempty"` // The condition that the environment should satisfy to be evaluated. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated. (Required.) - LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check. (Optional.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check. (Optional.) - ToolCategory *ToolCategory `json:"toolCategory,omitempty" yaml:"toolCategory,omitempty" example:"admin"` // The category that the tool belongs to. (Optional.) - ToolNamePredicate *PredicateUpdateInput `json:"toolNamePredicate,omitempty" yaml:"toolNamePredicate,omitempty"` // The condition that the tool name should satisfy to be evaluated. (Optional.) - ToolUrlPredicate *PredicateUpdateInput `json:"toolUrlPredicate,omitempty" yaml:"toolUrlPredicate,omitempty"` // The condition that the tool url should satisfy to be evaluated. (Optional.) -} - -// CodeIssueResolutionTimeInput represents the allowed threshold for how long an issue has been detected before the check starts failing. + CategoryId *Nullable[ID] `json:"categoryId,omitempty" yaml:"categoryId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the category the check belongs to (Optional) + EnableOn *Nullable[iso8601.Time] `json:"enableOn,omitempty" yaml:"enableOn,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date when the check will be automatically enabled (Optional) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional) + EnvironmentPredicate *PredicateUpdateInput `json:"environmentPredicate,omitempty" yaml:"environmentPredicate,omitempty"` // The condition that the environment should satisfy to be evaluated (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter the check belongs to (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the check to be updated (Required) + LevelId *Nullable[ID] `json:"levelId,omitempty" yaml:"levelId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level the check belongs to (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check (Optional) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Additional information about the check (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of the check (Optional) + ToolCategory *ToolCategory `json:"toolCategory,omitempty" yaml:"toolCategory,omitempty" example:"admin"` // The category that the tool belongs to (Optional) + ToolNamePredicate *PredicateUpdateInput `json:"toolNamePredicate,omitempty" yaml:"toolNamePredicate,omitempty"` // The condition that the tool name should satisfy to be evaluated (Optional) + ToolUrlPredicate *PredicateUpdateInput `json:"toolUrlPredicate,omitempty" yaml:"toolUrlPredicate,omitempty"` // The condition that the tool url should satisfy to be evaluated (Optional) +} + +// CodeIssueResolutionTimeInput The allowed threshold for how long an issue has been detected before the check starts failing type CodeIssueResolutionTimeInput struct { - Unit CodeIssueResolutionTimeUnitEnum `json:"unit" yaml:"unit" example:"day"` // (Required.) - Value int `json:"value" yaml:"value" example:"3"` // (Required.) + Unit CodeIssueResolutionTimeUnitEnum `json:"unit" yaml:"unit" example:"day"` // (Required) + Value int `json:"value" yaml:"value" example:"3"` // (Required) } -// ComponentTypeInput specifies the input fields used to create a component type. +// ComponentTypeInput Specifies the input fields used to create a component type type ComponentTypeInput struct { - Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The unique alias of the component type. (Optional.) - Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The unique alias of the component type. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The unique name of the component type. (Optional.) - Properties *[]ComponentTypePropertyDefinitionInput `json:"properties,omitempty" yaml:"properties,omitempty" example:"[]"` // A list of property definitions for the component type. (Optional.) + Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The unique alias of the component type (Optional) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The unique alias of the component type (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The unique name of the component type (Optional) + Properties *[]ComponentTypePropertyDefinitionInput `json:"properties,omitempty" yaml:"properties,omitempty" example:"[]"` // A list of property definitions for the component type (Optional) } -// ComponentTypePropertyDefinitionInput represents the input for defining a property on a component type. +// ComponentTypePropertyDefinitionInput The input for defining a property type ComponentTypePropertyDefinitionInput struct { - Alias string `json:"alias" yaml:"alias" example:"example_value"` // The human-friendly, unique identifier for the resource. (Required.) - AllowedInConfigFiles bool `json:"allowedInConfigFiles" yaml:"allowedInConfigFiles" example:"false"` // Whether or not the property is allowed to be set in opslevel.yml config files. (Required.) - Description string `json:"description" yaml:"description" example:"example_value"` // The description of the property definition. (Required.) - Name string `json:"name" yaml:"name" example:"example_value"` // The name of the property definition. (Required.) - PropertyDisplayStatus PropertyDisplayStatusEnum `json:"propertyDisplayStatus" yaml:"propertyDisplayStatus" example:"hidden"` // The display status of the custom property on service pages. (Required.) - Schema JSONSchema `json:"schema" yaml:"schema" example:"SCHEMA_TBD"` // The schema of the property definition. (Required.) + Alias string `json:"alias" yaml:"alias" example:"example_value"` // The human-friendly, unique identifier for the resource (Required) + AllowedInConfigFiles bool `json:"allowedInConfigFiles" yaml:"allowedInConfigFiles" example:"false"` // Whether or not the property is allowed to be set in opslevel.yml config files (Required) + Description string `json:"description" yaml:"description" example:"example_value"` // The description of the property definition (Required) + LockedStatus *PropertyLockedStatusEnum `json:"lockedStatus,omitempty" yaml:"lockedStatus,omitempty" example:"ui_locked"` // Restricts what sources are able to assign values to this property (Optional) + Name string `json:"name" yaml:"name" example:"example_value"` // The name of the property definition (Required) + PropertyDisplayStatus PropertyDisplayStatusEnum `json:"propertyDisplayStatus" yaml:"propertyDisplayStatus" example:"hidden"` // The display status of the custom property on service pages (Required) + Schema JSONSchema `json:"schema" yaml:"schema" example:"SCHEMA_TBD"` // The schema of the property definition (Required) } -// ContactCreateInput specifies the input fields used to create a contact. +// ContactCreateInput Specifies the input fields used to create a contact type ContactCreateInput struct { - Address string `json:"address" yaml:"address" example:"example_value"` // The contact address. Examples: support@company.com for type `email`, https://opslevel.com for type `web`. (Required.) - DisplayName *Nullable[string] `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_value"` // The name shown in the UI for the contact. (Optional.) - DisplayType *Nullable[string] `json:"displayType,omitempty" yaml:"displayType,omitempty" example:"example_value"` // The type shown in the UI for the contact. (Optional.) - ExternalId *Nullable[string] `json:"externalId,omitempty" yaml:"externalId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The remote identifier of the contact method. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of this contact. (Optional.) - TeamAlias *Nullable[string] `json:"teamAlias,omitempty" yaml:"teamAlias,omitempty" example:"example_value"` // The alias of the team the contact belongs to. (Optional.) - TeamId *Nullable[ID] `json:"teamId,omitempty" yaml:"teamId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team the contact belongs to. (Optional.) - Type ContactType `json:"type" yaml:"type" example:"email"` // The method of contact [email, slack, slack_handle, web, microsoft_teams]. (Required.) + Address string `json:"address" yaml:"address" example:"example_value"` // The contact address. Examples: support@company.com for type `email`, https://opslevel.com for type `web` (Required) + DisplayName *Nullable[string] `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_value"` // The name shown in the UI for the contact (Optional) + DisplayType *Nullable[string] `json:"displayType,omitempty" yaml:"displayType,omitempty" example:"example_value"` // The type shown in the UI for the contact (Optional) + ExternalId *Nullable[string] `json:"externalId,omitempty" yaml:"externalId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The remote identifier of the contact method (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner of this contact (Optional) + TeamAlias *Nullable[string] `json:"teamAlias,omitempty" yaml:"teamAlias,omitempty" example:"example_value"` // The alias of the team the contact belongs to (Optional) + TeamId *Nullable[ID] `json:"teamId,omitempty" yaml:"teamId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team the contact belongs to (Optional) + Type ContactType `json:"type" yaml:"type" example:"email"` // The method of contact [email, slack, slack_handle, web, microsoft_teams] (Required) } -// ContactDeleteInput specifies the input fields used to delete a contact. +// ContactDeleteInput Specifies the input fields used to delete a contact type ContactDeleteInput struct { - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The `id` of the contact you wish to delete. (Required.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The `id` of the contact you wish to delete (Required) } -// ContactInput specifies the input fields used to create a contact. +// ContactInput Specifies the input fields used to create a contact type ContactInput struct { - Address string `json:"address" yaml:"address" example:"example_value"` // The contact address. Examples: support@company.com for type `email`, https://opslevel.com for type `web`. (Required.) - DisplayName *Nullable[string] `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_value"` // The name shown in the UI for the contact. (Optional.) - Type ContactType `json:"type" yaml:"type" example:"email"` // The method of contact [email, slack, slack_handle, web, microsoft_teams]. (Required.) + Address string `json:"address" yaml:"address" example:"example_value"` // The contact address. Examples: support@company.com for type `email`, https://opslevel.com for type `web` (Required) + DisplayName *Nullable[string] `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_value"` // The name shown in the UI for the contact (Optional) + Type ContactType `json:"type" yaml:"type" example:"email"` // The method of contact [email, slack, slack_handle, web, microsoft_teams] (Required) } -// ContactUpdateInput specifies the input fields used to update a contact. +// ContactUpdateInput Specifies the input fields used to update a contact type ContactUpdateInput struct { - Address *Nullable[string] `json:"address,omitempty" yaml:"address,omitempty" example:"example_value"` // The contact address. Examples: support@company.com for type `email`, https://opslevel.com for type `web`. (Optional.) - DisplayName *Nullable[string] `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_value"` // The name shown in the UI for the contact. (Optional.) - DisplayType *Nullable[string] `json:"displayType,omitempty" yaml:"displayType,omitempty" example:"example_value"` // The type shown in the UI for the contact. (Optional.) - ExternalId *Nullable[string] `json:"externalId,omitempty" yaml:"externalId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The remote identifier of the contact method. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The unique identifier for the contact. (Required.) - MakeDefault *Nullable[bool] `json:"makeDefault,omitempty" yaml:"makeDefault,omitempty" example:"false"` // Makes the contact the default for the given type. Only available for team contacts. (Optional.) - Type *ContactType `json:"type,omitempty" yaml:"type,omitempty" example:"email"` // The method of contact [email, slack, slack_handle, web, microsoft_teams]. (Optional.) + Address *Nullable[string] `json:"address,omitempty" yaml:"address,omitempty" example:"example_value"` // The contact address. Examples: support@company.com for type `email`, https://opslevel.com for type `web` (Optional) + DisplayName *Nullable[string] `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_value"` // The name shown in the UI for the contact (Optional) + DisplayType *Nullable[string] `json:"displayType,omitempty" yaml:"displayType,omitempty" example:"example_value"` // The type shown in the UI for the contact (Optional) + ExternalId *Nullable[string] `json:"externalId,omitempty" yaml:"externalId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The remote identifier of the contact method (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The unique identifier for the contact (Required) + MakeDefault *Nullable[bool] `json:"makeDefault,omitempty" yaml:"makeDefault,omitempty" example:"false"` // Makes the contact the default for the given type. Only available for team contacts (Optional) + Type *ContactType `json:"type,omitempty" yaml:"type,omitempty" example:"email"` // The method of contact [email, slack, slack_handle, web, microsoft_teams] (Optional) } -// CustomActionsTriggerDefinitionCreateInput specifies the input fields used in the `customActionsTriggerDefinitionCreate` mutation. +// CustomActionsTriggerDefinitionCreateInput Specifies the input fields used in the `customActionsTriggerDefinitionCreate` mutation type CustomActionsTriggerDefinitionCreateInput struct { - AccessControl *CustomActionsTriggerDefinitionAccessControlEnum `json:"accessControl,omitempty" yaml:"accessControl,omitempty" example:"admins"` // The set of users that should be able to use the trigger definition. (Optional.) - ActionId *Nullable[ID] `json:"actionId,omitempty" yaml:"actionId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The action that will be triggered by the Trigger Definition. (Optional.) - Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of what the Trigger Definition will do, supports Markdown. (Optional.) - EntityType *CustomActionsEntityTypeEnum `json:"entityType,omitempty" yaml:"entityType,omitempty" example:"GLOBAL"` // The entity type to associate with the Trigger Definition. (Optional.) - ExtendedTeamAccess *[]IdentifierInput `json:"extendedTeamAccess,omitempty" yaml:"extendedTeamAccess,omitempty" example:"[]"` // The set of additional teams who can invoke this Trigger Definition. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The filter that will determine which services apply to the Trigger Definition. (Optional.) - ManualInputsDefinition *Nullable[string] `json:"manualInputsDefinition,omitempty" yaml:"manualInputsDefinition,omitempty" example:"example_value"` // The YAML definition of custom inputs for the Trigger Definition. (Optional.) - Name string `json:"name" yaml:"name" example:"example_value"` // The name of the Trigger Definition. (Required.) - OwnerId ID `json:"ownerId" yaml:"ownerId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The owner of the Trigger Definition. (Required.) - Published *Nullable[bool] `json:"published,omitempty" yaml:"published,omitempty" example:"false"` // The published state of the action; true if the definition is ready for use; false if it is a draft. (Optional.) - ResponseTemplate *Nullable[string] `json:"responseTemplate,omitempty" yaml:"responseTemplate,omitempty" example:"example_value"` // The liquid template used to parse the response from the External Action. (Optional.) -} - -// CustomActionsTriggerDefinitionUpdateInput specifies the input fields used in the `customActionsTriggerDefinitionUpdate` mutation. + AccessControl *CustomActionsTriggerDefinitionAccessControlEnum `json:"accessControl,omitempty" yaml:"accessControl,omitempty" example:"admins"` // The set of users that should be able to use the trigger definition (Optional) + ActionId *Nullable[ID] `json:"actionId,omitempty" yaml:"actionId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The action that will be triggered by the Trigger Definition (Optional) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of what the Trigger Definition will do, supports Markdown (Optional) + EntityType *CustomActionsEntityTypeEnum `json:"entityType,omitempty" yaml:"entityType,omitempty" example:"GLOBAL"` // The entity type to associate with the Trigger Definition (Optional) + ExtendedTeamAccess *[]IdentifierInput `json:"extendedTeamAccess,omitempty" yaml:"extendedTeamAccess,omitempty" example:"[]"` // The set of additional teams who can invoke this Trigger Definition (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The filter that will determine which services apply to the Trigger Definition (Optional) + ManualInputsDefinition *Nullable[string] `json:"manualInputsDefinition,omitempty" yaml:"manualInputsDefinition,omitempty" example:"example_value"` // The YAML definition of custom inputs for the Trigger Definition (Optional) + Name string `json:"name" yaml:"name" example:"example_value"` // The name of the Trigger Definition (Required) + OwnerId ID `json:"ownerId" yaml:"ownerId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The owner of the Trigger Definition (Required) + Published *Nullable[bool] `json:"published,omitempty" yaml:"published,omitempty" example:"false"` // The published state of the action; true if the definition is ready for use; false if it is a draft (Optional) + ResponseTemplate *Nullable[string] `json:"responseTemplate,omitempty" yaml:"responseTemplate,omitempty" example:"example_value"` // The liquid template used to parse the response from the External Action (Optional) +} + +// CustomActionsTriggerDefinitionUpdateInput Specifies the input fields used in the `customActionsTriggerDefinitionUpdate` mutation type CustomActionsTriggerDefinitionUpdateInput struct { - AccessControl *CustomActionsTriggerDefinitionAccessControlEnum `json:"accessControl,omitempty" yaml:"accessControl,omitempty" example:"admins"` // The set of users that should be able to use the trigger definition. (Optional.) - Action *CustomActionsWebhookActionUpdateInput `json:"action,omitempty" yaml:"action,omitempty"` // The details for the action to update for the Trigger Definition. (Optional.) - ActionId *Nullable[ID] `json:"actionId,omitempty" yaml:"actionId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The action that will be triggered by the Trigger Definition. (Optional.) - Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of what the Trigger Definition will do, support Markdown. (Optional.) - EntityType *CustomActionsEntityTypeEnum `json:"entityType,omitempty" yaml:"entityType,omitempty" example:"GLOBAL"` // The entity type to associate with the Trigger Definition. (Optional.) - ExtendedTeamAccess *[]IdentifierInput `json:"extendedTeamAccess,omitempty" yaml:"extendedTeamAccess,omitempty" example:"[]"` // The set of additional teams who can invoke this Trigger Definition. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The filter that will determine which services apply to the Trigger Definition. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the trigger definition. (Required.) - ManualInputsDefinition *Nullable[string] `json:"manualInputsDefinition,omitempty" yaml:"manualInputsDefinition,omitempty" example:"example_value"` // The YAML definition of custom inputs for the Trigger Definition. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the Trigger Definition. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The owner of the Trigger Definition. (Optional.) - Published *Nullable[bool] `json:"published,omitempty" yaml:"published,omitempty" example:"false"` // The published state of the action; true if the definition is ready for use; false if it is a draft. (Optional.) - ResponseTemplate *Nullable[string] `json:"responseTemplate,omitempty" yaml:"responseTemplate,omitempty" example:"example_value"` // The liquid template used to parse the response from the External Action. (Optional.) -} - -// CustomActionsWebhookActionCreateInput specifies the input fields used in the `customActionsWebhookActionCreate` mutation. + AccessControl *CustomActionsTriggerDefinitionAccessControlEnum `json:"accessControl,omitempty" yaml:"accessControl,omitempty" example:"admins"` // The set of users that should be able to use the trigger definition (Optional) + Action *CustomActionsWebhookActionUpdateInput `json:"action,omitempty" yaml:"action,omitempty"` // The details for the action to update for the Trigger Definition (Optional) + ActionId *Nullable[ID] `json:"actionId,omitempty" yaml:"actionId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The action that will be triggered by the Trigger Definition (Optional) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of what the Trigger Definition will do, support Markdown (Optional) + EntityType *CustomActionsEntityTypeEnum `json:"entityType,omitempty" yaml:"entityType,omitempty" example:"GLOBAL"` // The entity type to associate with the Trigger Definition (Optional) + ExtendedTeamAccess *[]IdentifierInput `json:"extendedTeamAccess,omitempty" yaml:"extendedTeamAccess,omitempty" example:"[]"` // The set of additional teams who can invoke this Trigger Definition (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The filter that will determine which services apply to the Trigger Definition (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the trigger definition (Required) + ManualInputsDefinition *Nullable[string] `json:"manualInputsDefinition,omitempty" yaml:"manualInputsDefinition,omitempty" example:"example_value"` // The YAML definition of custom inputs for the Trigger Definition (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the Trigger Definition (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The owner of the Trigger Definition (Optional) + Published *Nullable[bool] `json:"published,omitempty" yaml:"published,omitempty" example:"false"` // The published state of the action; true if the definition is ready for use; false if it is a draft (Optional) + ResponseTemplate *Nullable[string] `json:"responseTemplate,omitempty" yaml:"responseTemplate,omitempty" example:"example_value"` // The liquid template used to parse the response from the External Action (Optional) +} + +// CustomActionsWebhookActionCreateInput Specifies the input fields used in the `customActionsWebhookActionCreate` mutation type CustomActionsWebhookActionCreateInput struct { - Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description that gets assigned to the Webhook Action you're creating. (Optional.) - Headers *JSON `json:"headers,omitempty" yaml:"headers,omitempty" example:"{\"name\":\"my-big-query\",\"engine\":\"BigQuery\",\"endpoint\":\"https://google.com\",\"replica\":false}"` // HTTP headers be passed along with your Webhook when triggered. (Optional.) - HttpMethod CustomActionsHttpMethodEnum `json:"httpMethod" yaml:"httpMethod" example:"DELETE"` // HTTP used when the Webhook is triggered. Either POST or PUT. (Required.) - LiquidTemplate *Nullable[string] `json:"liquidTemplate,omitempty" yaml:"liquidTemplate,omitempty" example:"example_value"` // Template that can be used to generate a Webhook payload. (Optional.) - Name string `json:"name" yaml:"name" example:"example_value"` // The name that gets assigned to the Webhook Action you're creating. (Required.) - WebhookUrl string `json:"webhookUrl" yaml:"webhookUrl" example:"example_value"` // The URL that you wish to send the Webhook to when triggered. (Required.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description that gets assigned to the Webhook Action you're creating (Optional) + Headers *JSON `json:"headers,omitempty" yaml:"headers,omitempty" example:"{\"name\":\"my-big-query\",\"engine\":\"BigQuery\",\"endpoint\":\"https://google.com\",\"replica\":false}"` // HTTP headers be passed along with your Webhook when triggered (Optional) + HttpMethod CustomActionsHttpMethodEnum `json:"httpMethod" yaml:"httpMethod" example:"DELETE"` // HTTP used when the Webhook is triggered. Either POST or PUT (Required) + LiquidTemplate *Nullable[string] `json:"liquidTemplate,omitempty" yaml:"liquidTemplate,omitempty" example:"example_value"` // Template that can be used to generate a Webhook payload (Optional) + Name string `json:"name" yaml:"name" example:"example_value"` // The name that gets assigned to the Webhook Action you're creating (Required) + WebhookUrl string `json:"webhookUrl" yaml:"webhookUrl" example:"example_value"` // The URL that you wish to send the Webhook to when triggered (Required) } -// CustomActionsWebhookActionUpdateInput represents inputs that specify the details of a Webhook Action you wish to update. +// CustomActionsWebhookActionUpdateInput Inputs that specify the details of a Webhook Action you wish to update type CustomActionsWebhookActionUpdateInput struct { - Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description that gets assigned to the Webhook Action you're creating. (Optional.) - Headers *JSON `json:"headers,omitempty" yaml:"headers,omitempty" example:"{\"name\":\"my-big-query\",\"engine\":\"BigQuery\",\"endpoint\":\"https://google.com\",\"replica\":false}"` // HTTP headers be passed along with your Webhook when triggered. (Optional.) - HttpMethod *CustomActionsHttpMethodEnum `json:"httpMethod,omitempty" yaml:"httpMethod,omitempty" example:"DELETE"` // HTTP used when the Webhook is triggered. Either POST or PUT. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the Webhook Action you wish to update. (Required.) - LiquidTemplate *Nullable[string] `json:"liquidTemplate,omitempty" yaml:"liquidTemplate,omitempty" example:"example_value"` // Template that can be used to generate a Webhook payload. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name that gets assigned to the Webhook Action you're creating. (Optional.) - WebhookUrl *Nullable[string] `json:"webhookUrl,omitempty" yaml:"webhookUrl,omitempty" example:"example_value"` // The URL that you wish to send the Webhook too when triggered. (Optional.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description that gets assigned to the Webhook Action you're creating (Optional) + Headers *JSON `json:"headers,omitempty" yaml:"headers,omitempty" example:"{\"name\":\"my-big-query\",\"engine\":\"BigQuery\",\"endpoint\":\"https://google.com\",\"replica\":false}"` // HTTP headers be passed along with your Webhook when triggered (Optional) + HttpMethod *CustomActionsHttpMethodEnum `json:"httpMethod,omitempty" yaml:"httpMethod,omitempty" example:"DELETE"` // HTTP used when the Webhook is triggered. Either POST or PUT (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the Webhook Action you wish to update (Required) + LiquidTemplate *Nullable[string] `json:"liquidTemplate,omitempty" yaml:"liquidTemplate,omitempty" example:"example_value"` // Template that can be used to generate a Webhook payload (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name that gets assigned to the Webhook Action you're creating (Optional) + WebhookUrl *Nullable[string] `json:"webhookUrl,omitempty" yaml:"webhookUrl,omitempty" example:"example_value"` // The URL that you wish to send the Webhook too when triggered (Optional) } -// DeleteInput specifies the input fields used to delete an entity. +// DeleteInput Specifies the input fields used to delete an entity type DeleteInput struct { - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the entity to be deleted. (Required.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the entity to be deleted (Required) } -// DomainInput specifies the input fields for a domain. +// DomainInput Specifies the input fields for a domain type DomainInput struct { - Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description for the domain. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name for the domain. (Optional.) - Note *Nullable[string] `json:"note,omitempty" yaml:"note,omitempty" example:"example_value"` // Additional information about the domain. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner for the domain. (Optional.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description for the domain (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name for the domain (Optional) + Note *Nullable[string] `json:"note,omitempty" yaml:"note,omitempty" example:"example_value"` // Additional information about the domain (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner for the domain (Optional) } // EventIntegrationInput type EventIntegrationInput struct { - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the event integration. (Optional.) - Type EventIntegrationEnum `json:"type" yaml:"type" example:"apiDoc"` // The type of event integration to create. (Required.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the event integration (Optional) + Type EventIntegrationEnum `json:"type" yaml:"type" example:"apiDoc"` // The type of event integration to create (Required) } // EventIntegrationUpdateInput type EventIntegrationUpdateInput struct { - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the event integration to update. (Required.) - Name string `json:"name" yaml:"name" example:"example_value"` // The name of the event integration. (Required.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the event integration to update (Required) + Name string `json:"name" yaml:"name" example:"example_value"` // The name of the event integration (Required) } -// ExternalUuidMutationInput specifies the input used for modifying a resource's external UUID. +// ExternalUuidMutationInput Specifies the input used for modifying a resource's external UUID type ExternalUuidMutationInput struct { - ResourceId ID `json:"resourceId" yaml:"resourceId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the resource. (Required.) + ResourceId ID `json:"resourceId" yaml:"resourceId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the resource (Required) } -// FilterCreateInput specifies the input fields used to create a filter. +// FilterCreateInput Specifies the input fields used to create a filter type FilterCreateInput struct { - Connective *ConnectiveEnum `json:"connective,omitempty" yaml:"connective,omitempty" example:"and"` // The logical operator to be used in conjunction with predicates. (Optional.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the filter. (Required.) - Predicates *[]FilterPredicateInput `json:"predicates,omitempty" yaml:"predicates,omitempty" example:"[]"` // The list of predicates used to select which services apply to the filter. (Optional.) + Connective *ConnectiveEnum `json:"connective,omitempty" yaml:"connective,omitempty" example:"and"` // The logical operator to be used in conjunction with predicates (Optional) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the filter (Required) + Predicates *[]FilterPredicateInput `json:"predicates,omitempty" yaml:"predicates,omitempty" example:"[]"` // The list of predicates used to select which services apply to the filter (Optional) } -// FilterPredicateInput represents a condition that should be satisfied. +// FilterPredicateInput A condition that should be satisfied type FilterPredicateInput struct { - CaseSensitive *Nullable[bool] `json:"caseSensitive,omitempty" yaml:"caseSensitive,omitempty" example:"false"` // (Optional.) - Key PredicateKeyEnum `json:"key" yaml:"key" example:"aliases"` // The condition key used by the predicate. (Required.) - KeyData *Nullable[string] `json:"keyData,omitempty" yaml:"keyData,omitempty" example:"example_value"` // Additional data used by the predicate. This field is used by predicates with key = 'tags' to specify the tag key. For example, to create a predicate for services containing the tag 'db:mysql', set keyData = 'db' and value = 'mysql'. (Optional.) - Type PredicateTypeEnum `json:"type" yaml:"type" example:"belongs_to"` // The condition type used by the predicate. (Required.) - Value *Nullable[string] `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // The condition value used by the predicate. (Optional.) + CaseSensitive *Nullable[bool] `json:"caseSensitive,omitempty" yaml:"caseSensitive,omitempty" example:"false"` // (Optional) + Key PredicateKeyEnum `json:"key" yaml:"key" example:"aliases"` // The condition key used by the predicate (Required) + KeyData *Nullable[string] `json:"keyData,omitempty" yaml:"keyData,omitempty" example:"example_value"` // Additional data used by the predicate. This field is used by predicates with key = 'tags' to specify the tag key. For example, to create a predicate for services containing the tag 'db:mysql', set keyData = 'db' and value = 'mysql' (Optional) + Type PredicateTypeEnum `json:"type" yaml:"type" example:"belongs_to"` // The condition type used by the predicate (Required) + Value *Nullable[string] `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // The condition value used by the predicate (Optional) } -// FilterUpdateInput specifies the input fields used to update a filter. +// FilterUpdateInput Specifies the input fields used to update a filter type FilterUpdateInput struct { - Connective *ConnectiveEnum `json:"connective,omitempty" yaml:"connective,omitempty" example:"and"` // The logical operator to be used in conjunction with predicates. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter. (Required.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the filter. (Optional.) - Predicates *[]FilterPredicateInput `json:"predicates,omitempty" yaml:"predicates,omitempty" example:"[]"` // The list of predicates used to select which services apply to the filter. All existing predicates will be replaced by these predicates. (Optional.) + Connective *ConnectiveEnum `json:"connective,omitempty" yaml:"connective,omitempty" example:"and"` // The logical operator to be used in conjunction with predicates (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the filter (Required) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the filter (Optional) + Predicates *[]FilterPredicateInput `json:"predicates,omitempty" yaml:"predicates,omitempty" example:"[]"` // The list of predicates used to select which services apply to the filter. All existing predicates will be replaced by these predicates (Optional) +} + +// FireHydrantIntegrationInput A FireHydrant integration input +type FireHydrantIntegrationInput struct { + ApiKey *Nullable[string] `json:"apiKey,omitempty" yaml:"apiKey,omitempty" example:"example_value"` // The API Key for the FireHydrant API (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name for the FireHydrant integration (Optional) } -// GoogleCloudIntegrationInput specifies the input fields used to create and update a Google Cloud integration. +// GoogleCloudIntegrationInput Specifies the input fields used to create and update a Google Cloud integration type GoogleCloudIntegrationInput struct { - ClientEmail *Nullable[string] `json:"clientEmail,omitempty" yaml:"clientEmail,omitempty" example:"example_value"` // The service account email OpsLevel uses to access the Google Cloud account. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the integration. (Optional.) - OwnershipTagKeys *Nullable[[]string] `json:"ownershipTagKeys,omitempty" yaml:"ownershipTagKeys,omitempty" example:"['tag_key1', 'tag_key2']"` // An array of tag keys used to associate ownership from an integration. Max 5. (Optional.) - PrivateKey *Nullable[string] `json:"privateKey,omitempty" yaml:"privateKey,omitempty" example:"example_value"` // The private key for the service account that OpsLevel uses to access the Google Cloud account. (Optional.) - TagsOverrideOwnership *Nullable[bool] `json:"tagsOverrideOwnership,omitempty" yaml:"tagsOverrideOwnership,omitempty" example:"false"` // Allow tags imported from Google Cloud to override ownership set in OpsLevel directly. (Optional.) + ClientEmail *Nullable[string] `json:"clientEmail,omitempty" yaml:"clientEmail,omitempty" example:"example_value"` // The service account email OpsLevel uses to access the Google Cloud account (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the integration (Optional) + OwnershipTagKeys *Nullable[[]string] `json:"ownershipTagKeys,omitempty" yaml:"ownershipTagKeys,omitempty" example:"['tag_key1', 'tag_key2']"` // An array of tag keys used to associate ownership from an integration. Max 5 (Optional) + PrivateKey *Nullable[string] `json:"privateKey,omitempty" yaml:"privateKey,omitempty" example:"example_value"` // The private key for the service account that OpsLevel uses to access the Google Cloud account (Optional) + TagsOverrideOwnership *Nullable[bool] `json:"tagsOverrideOwnership,omitempty" yaml:"tagsOverrideOwnership,omitempty" example:"false"` // Allow tags imported from Google Cloud to override ownership set in OpsLevel directly (Optional) } -// IdentifierInput specifies the input fields used to identify a resource. +// IdentifierInput Specifies the input fields used to identify a resource type IdentifierInput struct { - Alias *string `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The human-friendly, unique identifier for the resource. (Optional.) - Id *ID `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the resource. (Optional.) + Alias *string `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The human-friendly, unique identifier for the resource (Optional) + Id *ID `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the resource (Optional) } -// InfrastructureResourceInput specifies the input fields for a infrastructure resource. +// InfrastructureResourceInput Specifies the input fields for a infrastructure resource type InfrastructureResourceInput struct { - Data *JSON `json:"data,omitempty" yaml:"data,omitempty" example:"{\"name\":\"my-big-query\",\"engine\":\"BigQuery\",\"endpoint\":\"https://google.com\",\"replica\":false}"` // The data for the infrastructure_resource. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner for the infrastructure_resource. (Optional.) - ProviderData *InfrastructureResourceProviderDataInput `json:"providerData,omitempty" yaml:"providerData,omitempty"` // Data about the provider of the infrastructure resource. (Optional.) - ProviderResourceType *Nullable[string] `json:"providerResourceType,omitempty" yaml:"providerResourceType,omitempty" example:"example_value"` // The type of the infrastructure resource in its provider. (Optional.) - Schema *InfrastructureResourceSchemaInput `json:"schema,omitempty" yaml:"schema,omitempty"` // The schema for the infrastructure_resource that determines its type. (Optional.) + Data *JSON `json:"data,omitempty" yaml:"data,omitempty" example:"{\"name\":\"my-big-query\",\"engine\":\"BigQuery\",\"endpoint\":\"https://google.com\",\"replica\":false}"` // The data for the infrastructure_resource (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner for the infrastructure_resource (Optional) + ProviderData *InfrastructureResourceProviderDataInput `json:"providerData,omitempty" yaml:"providerData,omitempty"` // Data about the provider of the infrastructure resource (Optional) + ProviderResourceType *Nullable[string] `json:"providerResourceType,omitempty" yaml:"providerResourceType,omitempty" example:"example_value"` // The type of the infrastructure resource in its provider (Optional) + Schema *InfrastructureResourceSchemaInput `json:"schema,omitempty" yaml:"schema,omitempty"` // The schema for the infrastructure_resource that determines its type (Optional) } -// InfrastructureResourceProviderDataInput specifies the input fields for data about an infrastructure resource's provider. +// InfrastructureResourceProviderDataInput Specifies the input fields for data about an infrastructure resource's provider type InfrastructureResourceProviderDataInput struct { - AccountName string `json:"accountName" yaml:"accountName" example:"example_value"` // The account name of the provider. (Required.) - ExternalUrl *Nullable[string] `json:"externalUrl,omitempty" yaml:"externalUrl,omitempty" example:"example_value"` // The external URL of the infrastructure resource in its provider. (Optional.) - ProviderName *Nullable[string] `json:"providerName,omitempty" yaml:"providerName,omitempty" example:"example_value"` // The name of the provider (e.g. AWS, GCP, Azure). (Optional.) + AccountName string `json:"accountName" yaml:"accountName" example:"example_value"` // The account name of the provider (Required) + ExternalUrl *Nullable[string] `json:"externalUrl,omitempty" yaml:"externalUrl,omitempty" example:"example_value"` // The external URL of the infrastructure resource in its provider (Optional) + ProviderName *Nullable[string] `json:"providerName,omitempty" yaml:"providerName,omitempty" example:"example_value"` // The name of the provider (e.g. AWS, GCP, Azure) (Optional) } -// InfrastructureResourceSchemaInput specifies the schema for an infrastructure resource. +// InfrastructureResourceSchemaInput Specifies the schema for an infrastructure resource type InfrastructureResourceSchemaInput struct { - Type string `json:"type" yaml:"type" example:"example_value"` // The type of the infrastructure resource. (Required.) + Type string `json:"type" yaml:"type" example:"example_value"` // The type of the infrastructure resource (Required) } -// LevelCreateInput specifies the input fields used to create a level. The new level will be added as the highest level (greatest level index). +// LevelCreateInput Specifies the input fields used to create a level. The new level will be added as the highest level (greatest level index) type LevelCreateInput struct { - Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of the level. (Optional.) - Index *int `json:"index,omitempty" yaml:"index,omitempty" example:"3"` // an integer allowing this level to be inserted between others. Must be unique per Rubric. (Optional.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the level. (Required.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of the level (Optional) + Index *int `json:"index,omitempty" yaml:"index,omitempty" example:"3"` // an integer allowing this level to be inserted between others. Must be unique per Rubric (Optional) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the level (Required) } -// LevelDeleteInput specifies the input fields used to delete a level. +// LevelDeleteInput Specifies the input fields used to delete a level type LevelDeleteInput struct { - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level to be deleted. (Required.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level to be deleted (Required) } -// LevelUpdateInput specifies the input fields used to update a level. +// LevelUpdateInput Specifies the input fields used to update a level type LevelUpdateInput struct { - Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of the level. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level to be updated. (Required.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the level. (Optional.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of the level (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the level to be updated (Required) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the level (Optional) } -// ManualCheckFrequencyInput represents defines a frequency for the check update. +// ManualCheckFrequencyInput Defines a frequency for the check update type ManualCheckFrequencyInput struct { - FrequencyTimeScale FrequencyTimeScale `json:"frequencyTimeScale" yaml:"frequencyTimeScale" example:"day"` // The time scale type for the frequency. (Required.) - FrequencyValue int `json:"frequencyValue" yaml:"frequencyValue" example:"3"` // The value to be used together with the frequency scale. (Required.) - StartingDate iso8601.Time `json:"startingDate" yaml:"startingDate" example:"2025-01-05T01:00:00.000Z"` // The date that the check will start to evaluate. (Required.) + FrequencyTimeScale FrequencyTimeScale `json:"frequencyTimeScale" yaml:"frequencyTimeScale" example:"day"` // The time scale type for the frequency (Required) + FrequencyValue int `json:"frequencyValue" yaml:"frequencyValue" example:"3"` // The value to be used together with the frequency scale (Required) + StartingDate iso8601.Time `json:"startingDate" yaml:"startingDate" example:"2025-01-05T01:00:00.000Z"` // The date that the check will start to evaluate (Required) } -// ManualCheckFrequencyUpdateInput represents defines a frequency for the check update. +// ManualCheckFrequencyUpdateInput Defines a frequency for the check update type ManualCheckFrequencyUpdateInput struct { - FrequencyTimeScale *FrequencyTimeScale `json:"frequencyTimeScale,omitempty" yaml:"frequencyTimeScale,omitempty" example:"day"` // The time scale type for the frequency. (Optional.) - FrequencyValue *Nullable[int] `json:"frequencyValue,omitempty" yaml:"frequencyValue,omitempty" example:"3"` // The value to be used together with the frequency scale. (Optional.) - StartingDate *Nullable[iso8601.Time] `json:"startingDate,omitempty" yaml:"startingDate,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date that the check will start to evaluate. (Optional.) + FrequencyTimeScale *FrequencyTimeScale `json:"frequencyTimeScale,omitempty" yaml:"frequencyTimeScale,omitempty" example:"day"` // The time scale type for the frequency (Optional) + FrequencyValue *Nullable[int] `json:"frequencyValue,omitempty" yaml:"frequencyValue,omitempty" example:"3"` // The value to be used together with the frequency scale (Optional) + StartingDate *Nullable[iso8601.Time] `json:"startingDate,omitempty" yaml:"startingDate,omitempty" example:"2025-01-05T01:00:00.000Z"` // The date that the check will start to evaluate (Optional) } -// MemberInput represents input for specifying members on a group. +// MemberInput Input for specifying members on a group type MemberInput struct { - Email string `json:"email" yaml:"email" example:"example_value"` // The user's email. (Required.) + Email string `json:"email" yaml:"email" example:"example_value"` // The user's email (Required) } // NewRelicIntegrationAccountsInput type NewRelicIntegrationAccountsInput struct { - ApiKey string `json:"apiKey" yaml:"apiKey" example:"example_value"` // The API Key for the New Relic API. (Required.) - BaseUrl string `json:"baseUrl" yaml:"baseUrl" example:"example_value"` // The API URL for New Relic API. (Required.) + ApiKey string `json:"apiKey" yaml:"apiKey" example:"example_value"` // The API Key for the New Relic API (Required) + BaseUrl string `json:"baseUrl" yaml:"baseUrl" example:"example_value"` // The API URL for New Relic API (Required) } // NewRelicIntegrationInput type NewRelicIntegrationInput struct { - ApiKey *Nullable[string] `json:"apiKey,omitempty" yaml:"apiKey,omitempty" example:"example_value"` // The API Key for the New Relic API. (Optional.) - BaseUrl *Nullable[string] `json:"baseUrl,omitempty" yaml:"baseUrl,omitempty" example:"example_value"` // The API URL for New Relic API. (Optional.) + ApiKey *Nullable[string] `json:"apiKey,omitempty" yaml:"apiKey,omitempty" example:"example_value"` // The API Key for the New Relic API (Optional) + BaseUrl *Nullable[string] `json:"baseUrl,omitempty" yaml:"baseUrl,omitempty" example:"example_value"` // The API URL for New Relic API (Optional) } -// OctopusDeployIntegrationInput specifies the input fields used to create and update an Octopus Deploy integration. +// OctopusDeployIntegrationInput Specifies the input fields used to create and update an Octopus Deploy integration type OctopusDeployIntegrationInput struct { - ApiKey *Nullable[string] `json:"apiKey,omitempty" yaml:"apiKey,omitempty" example:"example_value"` // The API Key for the Octopus Deploy API. (Optional.) - InstanceUrl *Nullable[string] `json:"instanceUrl,omitempty" yaml:"instanceUrl,omitempty" example:"example_value"` // The URL the Octopus Deploy instance if hosted on. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the integration. (Optional.) + ApiKey *Nullable[string] `json:"apiKey,omitempty" yaml:"apiKey,omitempty" example:"example_value"` // The API Key for the Octopus Deploy API (Optional) + InstanceUrl *Nullable[string] `json:"instanceUrl,omitempty" yaml:"instanceUrl,omitempty" example:"example_value"` // The URL the Octopus Deploy instance if hosted on (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the integration (Optional) } -// PayloadFilterInput represents input to be used to filter types. +// PayloadFilterInput Input to be used to filter types type PayloadFilterInput struct { - Arg *Nullable[string] `json:"arg,omitempty" yaml:"arg,omitempty" example:"example_value"` // Value to be filtered. (Optional.) - Key PayloadFilterEnum `json:"key" yaml:"key" example:"integration_id"` // Field to be filtered. (Required.) - Type *BasicTypeEnum `json:"type,omitempty" yaml:"type,omitempty" example:"does_not_equal"` // Type of operation to be applied to value on the field. (Optional.) + Arg *Nullable[string] `json:"arg,omitempty" yaml:"arg,omitempty" example:"example_value"` // Value to be filtered (Optional) + Key PayloadFilterEnum `json:"key" yaml:"key" example:"integration_id"` // Field to be filtered (Required) + Type *BasicTypeEnum `json:"type,omitempty" yaml:"type,omitempty" example:"does_not_equal"` // Type of operation to be applied to value on the field (Optional) } -// PredicateInput represents a condition that should be satisfied. +// PredicateInput A condition that should be satisfied type PredicateInput struct { - Type PredicateTypeEnum `json:"type" yaml:"type" example:"belongs_to"` // The condition type used by the predicate. (Required.) - Value *Nullable[string] `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // The condition value used by the predicate. (Optional.) + Type PredicateTypeEnum `json:"type" yaml:"type" example:"belongs_to"` // The condition type used by the predicate (Required) + Value *Nullable[string] `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // The condition value used by the predicate (Optional) } -// PredicateUpdateInput represents a condition that should be satisfied. +// PredicateUpdateInput A condition that should be satisfied type PredicateUpdateInput struct { - Type *PredicateTypeEnum `json:"type,omitempty" yaml:"type,omitempty" example:"belongs_to"` // The condition type used by the predicate. (Optional.) - Value *Nullable[string] `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // The condition value used by the predicate. (Optional.) + Type *PredicateTypeEnum `json:"type,omitempty" yaml:"type,omitempty" example:"belongs_to"` // The condition type used by the predicate (Optional) + Value *Nullable[string] `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // The condition value used by the predicate (Optional) } -// PropertyDefinitionInput represents the input for defining a property. +// PropertyDefinitionInput The input for defining a property type PropertyDefinitionInput struct { - AllowedInConfigFiles *Nullable[bool] `json:"allowedInConfigFiles,omitempty" yaml:"allowedInConfigFiles,omitempty" example:"false"` // Whether or not the property is allowed to be set in opslevel.yml config files. (Optional.) - Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of the property definition. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the property definition. (Optional.) - PropertyDisplayStatus *PropertyDisplayStatusEnum `json:"propertyDisplayStatus,omitempty" yaml:"propertyDisplayStatus,omitempty" example:"hidden"` // The display status of the custom property on service pages. (Optional.) - Schema *JSONSchema `json:"schema,omitempty" yaml:"schema,omitempty" example:"SCHEMA_TBD"` // The schema of the property definition. (Optional.) + AllowedInConfigFiles *Nullable[bool] `json:"allowedInConfigFiles,omitempty" yaml:"allowedInConfigFiles,omitempty" example:"false"` // Whether or not the property is allowed to be set in opslevel.yml config files (Optional) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of the property definition (Optional) + LockedStatus *PropertyLockedStatusEnum `json:"lockedStatus,omitempty" yaml:"lockedStatus,omitempty" example:"ui_locked"` // Restricts what sources are able to assign values to this property (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the property definition (Optional) + PropertyDisplayStatus *PropertyDisplayStatusEnum `json:"propertyDisplayStatus,omitempty" yaml:"propertyDisplayStatus,omitempty" example:"hidden"` // The display status of the custom property on service pages (Optional) + Schema *JSONSchema `json:"schema,omitempty" yaml:"schema,omitempty" example:"SCHEMA_TBD"` // The schema of the property definition (Optional) } -// PropertyInput represents the input for setting a property. +// PropertyInput The input for setting a property type PropertyInput struct { - Definition IdentifierInput `json:"definition" yaml:"definition"` // The definition of the property. (Required.) - Owner IdentifierInput `json:"owner" yaml:"owner"` // The entity that the property has been assigned to. (Required.) - RunValidation *Nullable[bool] `json:"runValidation,omitempty" yaml:"runValidation,omitempty" example:"false"` // Validate the property value against the schema. On by default. (Optional.) - Value JsonString `json:"value" yaml:"value" example:"JSON_TBD"` // The value of the property. (Required.) + Definition IdentifierInput `json:"definition" yaml:"definition"` // The definition of the property (Required) + Owner IdentifierInput `json:"owner" yaml:"owner"` // The entity that the property has been assigned to (Required) + OwnerType *PropertyOwnerTypeEnum `json:"ownerType,omitempty" yaml:"ownerType,omitempty" example:"COMPONENT"` // The type of the entity that the property has been assigned to. Defaults to `COMPONENT` if alias is provided for `owner` and `definition` (Optional) + RunValidation *Nullable[bool] `json:"runValidation,omitempty" yaml:"runValidation,omitempty" example:"false"` // Validate the property value against the schema. On by default (Optional) + Value JsonString `json:"value" yaml:"value" example:"JSON_TBD"` // The value of the property (Required) } -// RelationshipDefinition represents a source, target and relationship type specifying a relationship between two resources. +// RelationshipDefinition A source, target and relationship type specifying a relationship between two resources type RelationshipDefinition struct { - Source IdentifierInput `json:"source" yaml:"source"` // The resource that is the source of the relationship. alias is ambiguous in this context and is not supported. Please supply an id. (Required.) - Target IdentifierInput `json:"target" yaml:"target"` // The resource that is the target of the relationship. alias is ambiguous in this context and is not supported. Please supply an id. (Required.) - Type RelationshipTypeEnum `json:"type" yaml:"type" example:"belongs_to"` // The type of the relationship between source and target. (Required.) + Source IdentifierInput `json:"source" yaml:"source"` // The resource that is the source of the relationship. alias is ambiguous in this context and is not supported. Please supply an id (Required) + Target IdentifierInput `json:"target" yaml:"target"` // The resource that is the target of the relationship. alias is ambiguous in this context and is not supported. Please supply an id (Required) + Type RelationshipTypeEnum `json:"type" yaml:"type" example:"belongs_to"` // The type of the relationship between source and target (Required) } -// RepositoryUpdateInput specifies the input fields used to update a repository. +// RepositoryUpdateInput Specifies the input fields used to update a repository type RepositoryUpdateInput struct { - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the repository to be updated. (Required.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The team that owns the repository. (Optional.) - Visible *Nullable[bool] `json:"visible,omitempty" yaml:"visible,omitempty" example:"false"` // Indicates if the repository is visible. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the repository to be updated (Required) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The team that owns the repository (Optional) + Visible *Nullable[bool] `json:"visible,omitempty" yaml:"visible,omitempty" example:"false"` // Indicates if the repository is visible (Optional) } -// ScorecardInput represents input used to create scorecards. +// ScorecardInput Input used to create scorecards type ScorecardInput struct { - AffectsOverallServiceLevels *Nullable[bool] `json:"affectsOverallServiceLevels,omitempty" yaml:"affectsOverallServiceLevels,omitempty" example:"false"` // (Optional.) - Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // Description of the scorecard. (Optional.) - FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // Filter used by the scorecard to restrict services. (Optional.) - Name string `json:"name" yaml:"name" example:"example_value"` // Name of the scorecard. (Required.) - OwnerId ID `json:"ownerId" yaml:"ownerId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // Owner of the scorecard. Can currently be a team or a group. (Required.) + AffectsOverallServiceLevels *Nullable[bool] `json:"affectsOverallServiceLevels,omitempty" yaml:"affectsOverallServiceLevels,omitempty" example:"false"` // (Optional) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // Description of the scorecard (Optional) + FilterId *Nullable[ID] `json:"filterId,omitempty" yaml:"filterId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // Filter used by the scorecard to restrict services (Optional) + Name string `json:"name" yaml:"name" example:"example_value"` // Name of the scorecard (Required) + OwnerId ID `json:"ownerId" yaml:"ownerId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // Owner of the scorecard. Can currently be a team or a group (Required) } -// SecretInput represents arguments for secret operations. +// SecretInput Arguments for secret operations type SecretInput struct { - Owner *IdentifierInput `json:"owner,omitempty" yaml:"owner,omitempty"` // The owner of this secret. (Optional.) - Value *Nullable[string] `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // A sensitive value. (Optional.) + Owner *IdentifierInput `json:"owner,omitempty" yaml:"owner,omitempty"` // The owner of this secret (Optional) + Value *Nullable[string] `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // A sensitive value (Optional) } -// ServiceCreateInput specifies the input fields used in the `serviceCreate` mutation. +// ServiceCreateInput Specifies the input fields used in the `serviceCreate` mutation type ServiceCreateInput struct { - Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // A brief description of the service. (Optional.) - Framework *Nullable[string] `json:"framework,omitempty" yaml:"framework,omitempty" example:"example_value"` // The primary software development framework that the service uses. (Optional.) - Language *Nullable[string] `json:"language,omitempty" yaml:"language,omitempty" example:"example_value"` // The primary programming language that the service is written in. (Optional.) - LifecycleAlias *Nullable[string] `json:"lifecycleAlias,omitempty" yaml:"lifecycleAlias,omitempty" example:"example_value"` // The lifecycle stage of the service. (Optional.) - Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the service. (Required.) - OwnerAlias *Nullable[string] `json:"ownerAlias,omitempty" yaml:"ownerAlias,omitempty" example:"example_value"` // The team that owns the service. (Optional.) - OwnerInput *IdentifierInput `json:"ownerInput,omitempty" yaml:"ownerInput,omitempty"` // The owner for this service. (Optional.) - Parent *IdentifierInput `json:"parent,omitempty" yaml:"parent,omitempty"` // The parent system for the service. (Optional.) - Product *Nullable[string] `json:"product,omitempty" yaml:"product,omitempty" example:"example_value"` // A product is an application that your end user interacts with. Multiple services can work together to power a single product. (Optional.) - SkipAliasesValidation *Nullable[bool] `json:"skipAliasesValidation,omitempty" yaml:"skipAliasesValidation,omitempty" example:"false"` // Allows for the creation of a service with invalid aliases. (Optional.) - TierAlias *Nullable[string] `json:"tierAlias,omitempty" yaml:"tierAlias,omitempty" example:"example_value"` // The software tier that the service belongs to. (Optional.) - Type *IdentifierInput `json:"type,omitempty" yaml:"type,omitempty"` // The type of the component. (Optional.) -} - -// ServiceDeleteInput specifies the input fields used in the `serviceDelete` mutation. + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // A brief description of the service (Optional) + Framework *Nullable[string] `json:"framework,omitempty" yaml:"framework,omitempty" example:"example_value"` // The primary software development framework that the service uses (Optional) + Language *Nullable[string] `json:"language,omitempty" yaml:"language,omitempty" example:"example_value"` // The primary programming language that the service is written in (Optional) + LifecycleAlias *Nullable[string] `json:"lifecycleAlias,omitempty" yaml:"lifecycleAlias,omitempty" example:"example_value"` // The lifecycle stage of the service (Optional) + Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the service (Required) + OwnerAlias *Nullable[string] `json:"ownerAlias,omitempty" yaml:"ownerAlias,omitempty" example:"example_value"` // The team that owns the service (Optional) + OwnerInput *IdentifierInput `json:"ownerInput,omitempty" yaml:"ownerInput,omitempty"` // The owner for this service (Optional) + Parent *IdentifierInput `json:"parent,omitempty" yaml:"parent,omitempty"` // The parent system for the service (Optional) + Product *Nullable[string] `json:"product,omitempty" yaml:"product,omitempty" example:"example_value"` // A product is an application that your end user interacts with. Multiple services can work together to power a single product (Optional) + SkipAliasesValidation *Nullable[bool] `json:"skipAliasesValidation,omitempty" yaml:"skipAliasesValidation,omitempty" example:"false"` // Allows for the creation of a service with invalid aliases (Optional) + TierAlias *Nullable[string] `json:"tierAlias,omitempty" yaml:"tierAlias,omitempty" example:"example_value"` // The software tier that the service belongs to (Optional) + Type *IdentifierInput `json:"type,omitempty" yaml:"type,omitempty"` // The type of the component (Optional) +} + +// ServiceDeleteInput Specifies the input fields used in the `serviceDelete` mutation type ServiceDeleteInput struct { - Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The alias of the service to be deleted. (Optional.) - Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the service to be deleted. (Optional.) + Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The alias of the service to be deleted (Optional) + Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the service to be deleted (Optional) } -// ServiceDependencyCreateInput specifies the input fields used for creating a service dependency. +// ServiceDependencyCreateInput Specifies the input fields used for creating a service dependency type ServiceDependencyCreateInput struct { - DependencyKey ServiceDependencyKey `json:"dependencyKey" yaml:"dependencyKey"` // A source, destination pair specifying a dependency between services. (Required.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Notes for service dependency. (Optional.) + DependencyKey ServiceDependencyKey `json:"dependencyKey" yaml:"dependencyKey"` // A source, destination pair specifying a dependency between services (Required) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Notes for service dependency (Optional) } -// ServiceDependencyKey represents a source, destination pair specifying a dependency between services. +// ServiceDependencyKey A source, destination pair specifying a dependency between services type ServiceDependencyKey struct { - Destination *Nullable[ID] `json:"destination,omitempty" yaml:"destination,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the service that is depended upon. (Optional.) - DestinationIdentifier *IdentifierInput `json:"destinationIdentifier,omitempty" yaml:"destinationIdentifier,omitempty"` // The ID or alias identifier of the service that is depended upon. (Optional.) - Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Notes about the dependency edge (Optional.) - Source *Nullable[ID] `json:"source,omitempty" yaml:"source,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the service with the dependency. (Optional.) - SourceIdentifier *IdentifierInput `json:"sourceIdentifier,omitempty" yaml:"sourceIdentifier,omitempty"` // The ID or alias identifier of the service with the dependency. (Optional.) + Destination *Nullable[ID] `json:"destination,omitempty" yaml:"destination,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the service that is depended upon (Optional) + DestinationIdentifier *IdentifierInput `json:"destinationIdentifier,omitempty" yaml:"destinationIdentifier,omitempty"` // The ID or alias identifier of the service that is depended upon (Optional) + Notes *Nullable[string] `json:"notes,omitempty" yaml:"notes,omitempty" example:"example_value"` // Notes about the dependency edge (Optional) + Source *Nullable[ID] `json:"source,omitempty" yaml:"source,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the service with the dependency (Optional) + SourceIdentifier *IdentifierInput `json:"sourceIdentifier,omitempty" yaml:"sourceIdentifier,omitempty"` // The ID or alias identifier of the service with the dependency (Optional) } -// ServiceLevelNotificationsUpdateInput specifies the input fields used to update service level notification settings. +// ServiceLevelNotificationsUpdateInput Specifies the input fields used to update service level notification settings type ServiceLevelNotificationsUpdateInput struct { - EnableSlackNotifications *Nullable[bool] `json:"enableSlackNotifications,omitempty" yaml:"enableSlackNotifications,omitempty" example:"false"` // Whether or not to enable receiving slack notifications on service level changes. (Optional.) + EnableSlackNotifications *Nullable[bool] `json:"enableSlackNotifications,omitempty" yaml:"enableSlackNotifications,omitempty" example:"false"` // Whether or not to enable receiving slack notifications on service level changes (Optional) } -// ServiceNoteUpdateInput specifies the input fields used in the `serviceNoteUpdate` mutation. +// ServiceNoteUpdateInput Specifies the input fields used in the `serviceNoteUpdate` mutation type ServiceNoteUpdateInput struct { - Note *Nullable[string] `json:"note,omitempty" yaml:"note,omitempty" example:"example_value"` // Note about the service. (Optional.) - Service IdentifierInput `json:"service" yaml:"service"` // The identifier for the service. (Required.) + Note *Nullable[string] `json:"note,omitempty" yaml:"note,omitempty" example:"example_value"` // Note about the service (Optional) + Service IdentifierInput `json:"service" yaml:"service"` // The identifier for the service (Required) } -// ServiceRepositoryCreateInput specifies the input fields used in the `serviceRepositoryCreate` mutation. +// ServiceRepositoryCreateInput Specifies the input fields used in the `serviceRepositoryCreate` mutation type ServiceRepositoryCreateInput struct { - BaseDirectory *Nullable[string] `json:"baseDirectory,omitempty" yaml:"baseDirectory,omitempty" example:"example_value"` // The directory in the repository where service information exists, including the opslevel.yml file. This path is always returned without leading and trailing slashes. (Optional.) - DisplayName *Nullable[string] `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_value"` // The name displayed in the UI for the service repository. (Optional.) - Repository IdentifierInput `json:"repository" yaml:"repository"` // The identifier for the repository. (Required.) - Service IdentifierInput `json:"service" yaml:"service"` // The identifier for the service. (Required.) + BaseDirectory *Nullable[string] `json:"baseDirectory,omitempty" yaml:"baseDirectory,omitempty" example:"example_value"` // The directory in the repository where service information exists, including the opslevel.yml file. This path is always returned without leading and trailing slashes (Optional) + DisplayName *Nullable[string] `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_value"` // The name displayed in the UI for the service repository (Optional) + Repository IdentifierInput `json:"repository" yaml:"repository"` // The identifier for the repository (Required) + Service IdentifierInput `json:"service" yaml:"service"` // The identifier for the service (Required) } -// ServiceRepositoryUpdateInput specifies the input fields used to update a service repository. +// ServiceRepositoryUpdateInput Specifies the input fields used to update a service repository type ServiceRepositoryUpdateInput struct { - BaseDirectory *Nullable[string] `json:"baseDirectory,omitempty" yaml:"baseDirectory,omitempty" example:"example_value"` // The directory in the repository where service information exists, including the opslevel.yml file. This path is always returned without leading and trailing slashes. (Optional.) - DisplayName *Nullable[string] `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_value"` // The name displayed in the UI for the service repository. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the service repository to be updated. (Required.) + BaseDirectory *Nullable[string] `json:"baseDirectory,omitempty" yaml:"baseDirectory,omitempty" example:"example_value"` // The directory in the repository where service information exists, including the opslevel.yml file. This path is always returned without leading and trailing slashes (Optional) + DisplayName *Nullable[string] `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_value"` // The name displayed in the UI for the service repository (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the service repository to be updated (Required) } -// ServiceUpdateInput specifies the input fields used in the `serviceUpdate` mutation. +// ServiceUpdateInput Specifies the input fields used in the `serviceUpdate` mutation type ServiceUpdateInput struct { - Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The alias of the service to be updated. (Optional.) - Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // A brief description of the service. (Optional.) - Framework *Nullable[string] `json:"framework,omitempty" yaml:"framework,omitempty" example:"example_value"` // The primary software development framework that the service uses. (Optional.) - Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the service to be updated. (Optional.) - Language *Nullable[string] `json:"language,omitempty" yaml:"language,omitempty" example:"example_value"` // The primary programming language that the service is written in. (Optional.) - LifecycleAlias *Nullable[string] `json:"lifecycleAlias,omitempty" yaml:"lifecycleAlias,omitempty" example:"example_value"` // The lifecycle stage of the service. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the service. (Optional.) - OwnerAlias *Nullable[string] `json:"ownerAlias,omitempty" yaml:"ownerAlias,omitempty" example:"example_value"` // The team that owns the service. (Optional.) - OwnerInput *IdentifierInput `json:"ownerInput,omitempty" yaml:"ownerInput,omitempty"` // The owner for the service. (Optional.) - Parent *IdentifierInput `json:"parent,omitempty" yaml:"parent,omitempty"` // The parent system for the service. (Optional.) - Product *Nullable[string] `json:"product,omitempty" yaml:"product,omitempty" example:"example_value"` // A product is an application that your end user interacts with. Multiple services can work together to power a single product. (Optional.) - SkipAliasesValidation *Nullable[bool] `json:"skipAliasesValidation,omitempty" yaml:"skipAliasesValidation,omitempty" example:"false"` // Allows updating a service with invalid aliases. (Optional.) - TierAlias *Nullable[string] `json:"tierAlias,omitempty" yaml:"tierAlias,omitempty" example:"example_value"` // The software tier that the service belongs to. (Optional.) - Type *IdentifierInput `json:"type,omitempty" yaml:"type,omitempty"` // The type of the component. (Optional.) -} - -// SnykIntegrationInput specifies the input fields used to create and update a Snyk integration. + Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The alias of the service to be updated (Optional) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // A brief description of the service (Optional) + Framework *Nullable[string] `json:"framework,omitempty" yaml:"framework,omitempty" example:"example_value"` // The primary software development framework that the service uses (Optional) + Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the service to be updated (Optional) + Language *Nullable[string] `json:"language,omitempty" yaml:"language,omitempty" example:"example_value"` // The primary programming language that the service is written in (Optional) + LifecycleAlias *Nullable[string] `json:"lifecycleAlias,omitempty" yaml:"lifecycleAlias,omitempty" example:"example_value"` // The lifecycle stage of the service (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the service (Optional) + OwnerAlias *Nullable[string] `json:"ownerAlias,omitempty" yaml:"ownerAlias,omitempty" example:"example_value"` // The team that owns the service (Optional) + OwnerInput *IdentifierInput `json:"ownerInput,omitempty" yaml:"ownerInput,omitempty"` // The owner for the service (Optional) + Parent *IdentifierInput `json:"parent,omitempty" yaml:"parent,omitempty"` // The parent system for the service (Optional) + Product *Nullable[string] `json:"product,omitempty" yaml:"product,omitempty" example:"example_value"` // A product is an application that your end user interacts with. Multiple services can work together to power a single product (Optional) + SkipAliasesValidation *Nullable[bool] `json:"skipAliasesValidation,omitempty" yaml:"skipAliasesValidation,omitempty" example:"false"` // Allows updating a service with invalid aliases (Optional) + TierAlias *Nullable[string] `json:"tierAlias,omitempty" yaml:"tierAlias,omitempty" example:"example_value"` // The software tier that the service belongs to (Optional) + Type *IdentifierInput `json:"type,omitempty" yaml:"type,omitempty"` // The type of the component (Optional) +} + +// SnykIntegrationInput Specifies the input fields used to create and update a Snyk integration type SnykIntegrationInput struct { - ApiKey *Nullable[string] `json:"apiKey,omitempty" yaml:"apiKey,omitempty" example:"example_value"` // The API Key for the Snyk API (Optional.) - GroupId *Nullable[string] `json:"groupId,omitempty" yaml:"groupId,omitempty" example:"example_value"` // The group ID for the Snyk API (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the integration. (Optional.) - Region *SnykIntegrationRegionEnum `json:"region,omitempty" yaml:"region,omitempty" example:"AU"` // The region in which your data is hosted. (Optional.) + ApiKey *Nullable[string] `json:"apiKey,omitempty" yaml:"apiKey,omitempty" example:"example_value"` // The API Key for the Snyk API (Optional) + GroupId *Nullable[string] `json:"groupId,omitempty" yaml:"groupId,omitempty" example:"example_value"` // The group ID for the Snyk API (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the integration (Optional) + Region *SnykIntegrationRegionEnum `json:"region,omitempty" yaml:"region,omitempty" example:"AU"` // The region in which your data is hosted (Optional) } -// SonarqubeCloudIntegrationInput specifies the input fields used to create and update a SonarQube Cloud integration. +// SonarqubeCloudIntegrationInput Specifies the input fields used to create and update a SonarQube Cloud integration type SonarqubeCloudIntegrationInput struct { - ApiKey *Nullable[string] `json:"apiKey,omitempty" yaml:"apiKey,omitempty" example:"example_value"` // The API Key for the SonarQube Cloud API. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the integration. (Optional.) - OrganizationKey *Nullable[string] `json:"organizationKey,omitempty" yaml:"organizationKey,omitempty" example:"example_value"` // The Organization Key for the SonarQube Cloud organization. (Optional.) + ApiKey *Nullable[string] `json:"apiKey,omitempty" yaml:"apiKey,omitempty" example:"example_value"` // The API Key for the SonarQube Cloud API (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the integration (Optional) + OrganizationKey *Nullable[string] `json:"organizationKey,omitempty" yaml:"organizationKey,omitempty" example:"example_value"` // The Organization Key for the SonarQube Cloud organization (Optional) } -// SonarqubeIntegrationInput specifies the input fields used to create and update a SonarQube integration. +// SonarqubeIntegrationInput Specifies the input fields used to create and update a SonarQube integration type SonarqubeIntegrationInput struct { - ApiKey *Nullable[string] `json:"apiKey,omitempty" yaml:"apiKey,omitempty" example:"example_value"` // The API Key for the SonarQube API (Optional.) - BaseUrl *Nullable[string] `json:"baseUrl,omitempty" yaml:"baseUrl,omitempty" example:"example_value"` // The base URL for the SonarQube instance (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the integration. (Optional.) + ApiKey *Nullable[string] `json:"apiKey,omitempty" yaml:"apiKey,omitempty" example:"example_value"` // The API Key for the SonarQube API (Optional) + BaseUrl *Nullable[string] `json:"baseUrl,omitempty" yaml:"baseUrl,omitempty" example:"example_value"` // The base URL for the SonarQube instance (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the integration (Optional) } -// SystemInput specifies the input fields for a system. +// SystemInput Specifies the input fields for a system type SystemInput struct { - Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description for the system. (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name for the system. (Optional.) - Note *Nullable[string] `json:"note,omitempty" yaml:"note,omitempty" example:"example_value"` // Additional information about the system. (Optional.) - OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner for the system. (Optional.) - Parent *IdentifierInput `json:"parent,omitempty" yaml:"parent,omitempty"` // The parent domain for the system. (Optional.) + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description for the system (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name for the system (Optional) + Note *Nullable[string] `json:"note,omitempty" yaml:"note,omitempty" example:"example_value"` // Additional information about the system (Optional) + OwnerId *Nullable[ID] `json:"ownerId,omitempty" yaml:"ownerId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the owner for the system (Optional) + Parent *IdentifierInput `json:"parent,omitempty" yaml:"parent,omitempty"` // The parent domain for the system (Optional) } -// TagArgs represents arguments used to query with a certain tag. +// TagArgs Arguments used to query with a certain tag type TagArgs struct { - Key *Nullable[string] `json:"key,omitempty" yaml:"key,omitempty" example:"example_value"` // The key of a tag. (Optional.) - Value *Nullable[string] `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // The value of a tag. (Optional.) + Key *Nullable[string] `json:"key,omitempty" yaml:"key,omitempty" example:"example_value"` // The key of a tag (Optional) + Value *Nullable[string] `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // The value of a tag (Optional) } -// TagAssignInput specifies the input fields used to assign tags. +// TagAssignInput Specifies the input fields used to assign tags type TagAssignInput struct { - Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The alias of the resource that tags will be added to. (Optional.) - Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the resource that the tags will be assigned to. (Optional.) - Tags []TagInput `json:"tags" yaml:"tags" example:"[]"` // The desired tags to assign to the resource. (Required.) - Type *TaggableResource `json:"type,omitempty" yaml:"type,omitempty" example:"Domain"` // The type of resource `alias` refers to, if `alias` is provided. (Optional.) + Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The alias of the resource that tags will be added to (Optional) + Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the resource that the tags will be assigned to (Optional) + Tags []TagInput `json:"tags" yaml:"tags" example:"[]"` // The desired tags to assign to the resource (Required) + Type *TaggableResource `json:"type,omitempty" yaml:"type,omitempty" example:"Domain"` // The type of resource `alias` refers to, if `alias` is provided (Optional) } -// TagCreateInput specifies the input fields used to create a tag. +// TagCreateInput Specifies the input fields used to create a tag type TagCreateInput struct { - Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The alias of the resource that this tag will be added to. (Optional.) - Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the resource that this tag will be added to. (Optional.) - Key string `json:"key" yaml:"key" example:"example_value"` // The tag's key. (Required.) - Type *TaggableResource `json:"type,omitempty" yaml:"type,omitempty" example:"Domain"` // The type of resource `alias` refers to, if `alias` is provided. (Optional.) - Value string `json:"value" yaml:"value" example:"example_value"` // The tag's value. (Required.) + Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The alias of the resource that this tag will be added to (Optional) + Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the resource that this tag will be added to (Optional) + Key string `json:"key" yaml:"key" example:"example_value"` // The tag's key (Required) + Type *TaggableResource `json:"type,omitempty" yaml:"type,omitempty" example:"Domain"` // The type of resource `alias` refers to, if `alias` is provided (Optional) + Value string `json:"value" yaml:"value" example:"example_value"` // The tag's value (Required) } -// TagDeleteInput specifies the input fields used to delete a tag. +// TagDeleteInput Specifies the input fields used to delete a tag type TagDeleteInput struct { - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the tag to be deleted. (Required.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the tag to be deleted (Required) } -// TagInput specifies the basic input fields used to construct a tag. +// TagInput Specifies the basic input fields used to construct a tag type TagInput struct { - Key string `json:"key" yaml:"key" example:"example_value"` // The tag's key. (Required.) - Value string `json:"value" yaml:"value" example:"example_value"` // The tag's value. (Required.) + Key string `json:"key" yaml:"key" example:"example_value"` // The tag's key (Required) + Value string `json:"value" yaml:"value" example:"example_value"` // The tag's value (Required) } -// TagRelationshipKeysAssignInput represents the input for the `tagRelationshipKeysAssign` mutation. +// TagRelationshipKeysAssignInput The input for the `tagRelationshipKeysAssign` mutation type TagRelationshipKeysAssignInput struct { - BelongsTo *Nullable[string] `json:"belongsTo,omitempty" yaml:"belongsTo,omitempty" example:"example_value"` // (Optional.) - DependencyOf *Nullable[[]string] `json:"dependencyOf,omitempty" yaml:"dependencyOf,omitempty" example:"[]"` // (Optional.) - DependsOn *Nullable[[]string] `json:"dependsOn,omitempty" yaml:"dependsOn,omitempty" example:"[]"` // (Optional.) + BelongsTo *Nullable[string] `json:"belongsTo,omitempty" yaml:"belongsTo,omitempty" example:"example_value"` // (Optional) + DependencyOf *Nullable[[]string] `json:"dependencyOf,omitempty" yaml:"dependencyOf,omitempty" example:"[]"` // (Optional) + DependsOn *Nullable[[]string] `json:"dependsOn,omitempty" yaml:"dependsOn,omitempty" example:"[]"` // (Optional) } -// TagUpdateInput specifies the input fields used to update a tag. +// TagUpdateInput Specifies the input fields used to update a tag type TagUpdateInput struct { - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the tag to be updated. (Required.) - Key *Nullable[string] `json:"key,omitempty" yaml:"key,omitempty" example:"example_value"` // The tag's key. (Optional.) - Value *Nullable[string] `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // The tag's value. (Optional.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the tag to be updated (Required) + Key *Nullable[string] `json:"key,omitempty" yaml:"key,omitempty" example:"example_value"` // The tag's key (Optional) + Value *Nullable[string] `json:"value,omitempty" yaml:"value,omitempty" example:"example_value"` // The tag's value (Optional) } -// TeamCreateInput specifies the input fields used to create a team. +// TeamCreateInput Specifies the input fields used to create a team type TeamCreateInput struct { - Contacts *[]ContactInput `json:"contacts,omitempty" yaml:"contacts,omitempty" example:"[]"` // The contacts for the team. (Optional.) - Group *IdentifierInput `json:"group,omitempty" yaml:"group,omitempty"` // The group this team belongs to. (Optional.) - ManagerEmail *Nullable[string] `json:"managerEmail,omitempty" yaml:"managerEmail,omitempty" example:"example_value"` // The email of the user who manages the team. (Optional.) - Members *[]TeamMembershipUserInput `json:"members,omitempty" yaml:"members,omitempty" example:"[]"` // A set of emails that identify users in OpsLevel (Optional.) - Name string `json:"name" yaml:"name" example:"example_value"` // The team's display name. (Required.) - ParentTeam *IdentifierInput `json:"parentTeam,omitempty" yaml:"parentTeam,omitempty"` // The parent team. (Optional.) - Responsibilities *Nullable[string] `json:"responsibilities,omitempty" yaml:"responsibilities,omitempty" example:"example_value"` // A description of what the team is responsible for. (Optional.) + Contacts *[]ContactInput `json:"contacts,omitempty" yaml:"contacts,omitempty" example:"[]"` // The contacts for the team (Optional) + Group *IdentifierInput `json:"group,omitempty" yaml:"group,omitempty"` // The group this team belongs to (Optional) + ManagerEmail *Nullable[string] `json:"managerEmail,omitempty" yaml:"managerEmail,omitempty" example:"example_value"` // The email of the user who manages the team (Optional) + Members *[]TeamMembershipUserInput `json:"members,omitempty" yaml:"members,omitempty" example:"[]"` // A set of emails that identify users in OpsLevel (Optional) + Name string `json:"name" yaml:"name" example:"example_value"` // The team's display name (Required) + ParentTeam *IdentifierInput `json:"parentTeam,omitempty" yaml:"parentTeam,omitempty"` // The parent team (Optional) + Responsibilities *Nullable[string] `json:"responsibilities,omitempty" yaml:"responsibilities,omitempty" example:"example_value"` // A description of what the team is responsible for (Optional) } -// TeamDeleteInput specifies the input fields used to delete a team. +// TeamDeleteInput Specifies the input fields used to delete a team type TeamDeleteInput struct { - Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The alias of the team to be deleted. (Optional.) - Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team to be deleted. (Optional.) + Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The alias of the team to be deleted (Optional) + Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team to be deleted (Optional) } -// TeamMembershipCreateInput represents input for adding members to a team. +// TeamMembershipCreateInput Input for adding members to a team type TeamMembershipCreateInput struct { - Members []TeamMembershipUserInput `json:"members" yaml:"members" example:"[]"` // A set of emails that identify users in OpsLevel (Required.) - TeamId ID `json:"teamId" yaml:"teamId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the team to add members (Required.) + Members []TeamMembershipUserInput `json:"members" yaml:"members" example:"[]"` // A set of emails that identify users in OpsLevel (Required) + TeamId ID `json:"teamId" yaml:"teamId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the team to add members (Required) } -// TeamMembershipDeleteInput represents input for removing members from a team. +// TeamMembershipDeleteInput Input for removing members from a team type TeamMembershipDeleteInput struct { - Members []TeamMembershipUserInput `json:"members" yaml:"members" example:"[]"` // A set of emails that identify users in OpsLevel (Required.) - TeamId ID `json:"teamId" yaml:"teamId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the team to remove members from (Required.) + Members []TeamMembershipUserInput `json:"members" yaml:"members" example:"[]"` // A set of emails that identify users in OpsLevel (Required) + TeamId ID `json:"teamId" yaml:"teamId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the team to remove members from (Required) } -// TeamMembershipUserInput represents input for specifying members on a team. +// TeamMembershipUserInput Input for specifying members on a team type TeamMembershipUserInput struct { - Email *Nullable[string] `json:"email,omitempty" yaml:"email,omitempty" example:"example_value"` // The user's email. (Optional.) - Role *Nullable[string] `json:"role,omitempty" yaml:"role,omitempty" example:"example_value"` // The type of relationship this membership implies. (Optional.) - User *UserIdentifierInput `json:"user,omitempty" yaml:"user,omitempty"` // The email address or ID of the user to add to a team. (Optional.) + Email *Nullable[string] `json:"email,omitempty" yaml:"email,omitempty" example:"example_value"` // The user's email (Optional) + Role *Nullable[string] `json:"role,omitempty" yaml:"role,omitempty" example:"example_value"` // The type of relationship this membership implies (Optional) + User *UserIdentifierInput `json:"user,omitempty" yaml:"user,omitempty"` // The email address or ID of the user to add to a team (Optional) +} + +// TeamPropertyDefinitionInput The input for defining a property +type TeamPropertyDefinitionInput struct { + Alias string `json:"alias" yaml:"alias" example:"example_value"` // The human-friendly, unique identifier for the resource (Required) + Description string `json:"description" yaml:"description" example:"example_value"` // The description of the property definition (Required) + LockedStatus *PropertyLockedStatusEnum `json:"lockedStatus,omitempty" yaml:"lockedStatus,omitempty" example:"ui_locked"` // Restricts what sources are able to assign values to this property (Optional) + Name string `json:"name" yaml:"name" example:"example_value"` // The name of the property definition (Required) + Schema JSONSchema `json:"schema" yaml:"schema" example:"SCHEMA_TBD"` // The schema of the property definition (Required) +} + +// TeamPropertyDefinitionsAssignInput Specifies the input fields used to define properties that apply to teams +type TeamPropertyDefinitionsAssignInput struct { + Properties []TeamPropertyDefinitionInput `json:"properties" yaml:"properties" example:"[]"` // A list of property definitions (Required) } -// TeamUpdateInput specifies the input fields used to update a team. +// TeamUpdateInput Specifies the input fields used to update a team type TeamUpdateInput struct { - Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The alias of the team to be updated. (Optional.) - Group *IdentifierInput `json:"group,omitempty" yaml:"group,omitempty"` // The group this team belongs to. (Optional.) - Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team to be updated. (Optional.) - ManagerEmail *Nullable[string] `json:"managerEmail,omitempty" yaml:"managerEmail,omitempty" example:"example_value"` // The email of the user who manages the team. (Optional.) - Members *[]TeamMembershipUserInput `json:"members,omitempty" yaml:"members,omitempty" example:"[]"` // A set of emails that identify users in OpsLevel (Optional.) - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The team's display name. (Optional.) - ParentTeam *IdentifierInput `json:"parentTeam,omitempty" yaml:"parentTeam,omitempty"` // The parent team. (Optional.) - Responsibilities *Nullable[string] `json:"responsibilities,omitempty" yaml:"responsibilities,omitempty" example:"example_value"` // A description of what the team is responsible for. (Optional.) + Alias *Nullable[string] `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The alias of the team to be updated (Optional) + Group *IdentifierInput `json:"group,omitempty" yaml:"group,omitempty"` // The group this team belongs to (Optional) + Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the team to be updated (Optional) + ManagerEmail *Nullable[string] `json:"managerEmail,omitempty" yaml:"managerEmail,omitempty" example:"example_value"` // The email of the user who manages the team (Optional) + Members *[]TeamMembershipUserInput `json:"members,omitempty" yaml:"members,omitempty" example:"[]"` // A set of emails that identify users in OpsLevel (Optional) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The team's display name (Optional) + ParentTeam *IdentifierInput `json:"parentTeam,omitempty" yaml:"parentTeam,omitempty"` // The parent team (Optional) + Responsibilities *Nullable[string] `json:"responsibilities,omitempty" yaml:"responsibilities,omitempty" example:"example_value"` // A description of what the team is responsible for (Optional) } -// ToolCreateInput specifies the input fields used to create a tool. +// ToolCreateInput Specifies the input fields used to create a tool type ToolCreateInput struct { - Category ToolCategory `json:"category" yaml:"category" example:"admin"` // The category that the tool belongs to. (Required.) - DisplayName string `json:"displayName" yaml:"displayName" example:"example_value"` // The display name of the tool. (Required.) - Environment *Nullable[string] `json:"environment,omitempty" yaml:"environment,omitempty" example:"example_value"` // The environment that the tool belongs to. (Optional.) - ServiceAlias *Nullable[string] `json:"serviceAlias,omitempty" yaml:"serviceAlias,omitempty" example:"example_value"` // The alias of the service the tool will be assigned to. (Optional.) - ServiceId *Nullable[ID] `json:"serviceId,omitempty" yaml:"serviceId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the service the tool will be assigned to. (Optional.) - Url string `json:"url" yaml:"url" example:"example_value"` // The URL of the tool. (Required.) + Category ToolCategory `json:"category" yaml:"category" example:"admin"` // The category that the tool belongs to (Required) + DisplayName string `json:"displayName" yaml:"displayName" example:"example_value"` // The display name of the tool (Required) + Environment *Nullable[string] `json:"environment,omitempty" yaml:"environment,omitempty" example:"example_value"` // The environment that the tool belongs to (Optional) + ServiceAlias *Nullable[string] `json:"serviceAlias,omitempty" yaml:"serviceAlias,omitempty" example:"example_value"` // The alias of the service the tool will be assigned to (Optional) + ServiceId *Nullable[ID] `json:"serviceId,omitempty" yaml:"serviceId,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the service the tool will be assigned to (Optional) + Url string `json:"url" yaml:"url" example:"example_value"` // The URL of the tool (Required) } -// ToolDeleteInput specifies the input fields used to delete a tool. +// ToolDeleteInput Specifies the input fields used to delete a tool type ToolDeleteInput struct { - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the tool to be deleted. (Required.) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the tool to be deleted (Required) } -// ToolUpdateInput specifies the input fields used to update a tool. +// ToolUpdateInput Specifies the input fields used to update a tool type ToolUpdateInput struct { - Category *ToolCategory `json:"category,omitempty" yaml:"category,omitempty" example:"admin"` // The category that the tool belongs to. (Optional.) - DisplayName *Nullable[string] `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_value"` // The display name of the tool. (Optional.) - Environment *Nullable[string] `json:"environment,omitempty" yaml:"environment,omitempty" example:"example_value"` // The environment that the tool belongs to. (Optional.) - Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the tool to be updated. (Required.) - Url *Nullable[string] `json:"url,omitempty" yaml:"url,omitempty" example:"example_value"` // The URL of the tool. (Optional.) + Category *ToolCategory `json:"category,omitempty" yaml:"category,omitempty" example:"admin"` // The category that the tool belongs to (Optional) + DisplayName *Nullable[string] `json:"displayName,omitempty" yaml:"displayName,omitempty" example:"example_value"` // The display name of the tool (Optional) + Environment *Nullable[string] `json:"environment,omitempty" yaml:"environment,omitempty" example:"example_value"` // The environment that the tool belongs to (Optional) + Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the tool to be updated (Required) + Url *Nullable[string] `json:"url,omitempty" yaml:"url,omitempty" example:"example_value"` // The URL of the tool (Optional) } -// UserIdentifierInput specifies the input fields used to identify a user. Exactly one field should be provided. +// UserIdentifierInput Specifies the input fields used to identify a user. Exactly one field should be provided type UserIdentifierInput struct { - Email *Nullable[string] `json:"email,omitempty" yaml:"email,omitempty" example:"example_value"` // The email address of the user. (Optional.) - Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the user. (Optional.) + Email *Nullable[string] `json:"email,omitempty" yaml:"email,omitempty" example:"example_value"` // The email address of the user (Optional) + Id *Nullable[ID] `json:"id,omitempty" yaml:"id,omitempty" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The ID of the user (Optional) } -// UserInput specifies the input fields used to create and update a user. +// UserInput Specifies the input fields used to create and update a user type UserInput struct { - Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the user. (Optional.) - Role *UserRole `json:"role,omitempty" yaml:"role,omitempty" example:"admin"` // The access role (e.g. user vs admin) of the user. (Optional.) - SkipWelcomeEmail *Nullable[bool] `json:"skipWelcomeEmail,omitempty" yaml:"skipWelcomeEmail,omitempty" example:"false"` // Don't send an email welcoming the user to OpsLevel. (Optional.) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the user (Optional) + Role *UserRole `json:"role,omitempty" yaml:"role,omitempty" example:"admin"` // The access role (e.g. user vs admin) of the user (Optional) + SkipWelcomeEmail *Nullable[bool] `json:"skipWelcomeEmail,omitempty" yaml:"skipWelcomeEmail,omitempty" example:"false"` // Don't send an email welcoming the user to OpsLevel (Optional) } -// UsersFilterInput represents the input for filtering users. +// UsersFilterInput The input for filtering users type UsersFilterInput struct { - Arg *Nullable[string] `json:"arg,omitempty" yaml:"arg,omitempty" example:"example_value"` // Value to be filtered. (Optional.) - Key UsersFilterEnum `json:"key" yaml:"key" example:"deactivated_at"` // Field to be filtered. (Required.) - Type *BasicTypeEnum `json:"type,omitempty" yaml:"type,omitempty" example:"does_not_equal"` // The operation applied to value on the field. (Optional.) + Arg *Nullable[string] `json:"arg,omitempty" yaml:"arg,omitempty" example:"example_value"` // Value to be filtered (Optional) + Key UsersFilterEnum `json:"key" yaml:"key" example:"deactivated_at"` // Field to be filtered (Required) + Type *BasicTypeEnum `json:"type,omitempty" yaml:"type,omitempty" example:"does_not_equal"` // The operation applied to value on the field (Optional) } -// UsersInviteInput specifies the input fields used in the `usersInvite` mutation. +// UsersInviteInput Specifies the input fields used in the `usersInvite` mutation type UsersInviteInput struct { - Scope *UsersInviteScopeEnum `json:"scope,omitempty" yaml:"scope,omitempty" example:"pending"` // A classification of users to invite. (Optional.) - Users *[]UserIdentifierInput `json:"users,omitempty" yaml:"users,omitempty" example:"[]"` // A list of individual users to invite. (Optional.) + Scope *UsersInviteScopeEnum `json:"scope,omitempty" yaml:"scope,omitempty" example:"pending"` // A classification of users to invite (Optional) + Users *[]UserIdentifierInput `json:"users,omitempty" yaml:"users,omitempty" example:"[]"` // A list of individual users to invite (Optional) } diff --git a/integration.go b/integration.go index 40fd1359..2fbf7793 100644 --- a/integration.go +++ b/integration.go @@ -29,12 +29,6 @@ type AzureResourcesIntegrationFragment struct { TenantId string `graphql:"tenantId"` } -type GoogleCloudProject struct { - ID string `graphql:"id"` - Name string `graphql:"name"` - URL string `graphql:"url"` -} - type GoogleCloudIntegrationFragment struct { Aliases []string `graphql:"aliases"` ClientEmail string `graphql:"clientEmail"` @@ -76,7 +70,7 @@ func (client *Client) CreateIntegrationAWS(input AWSIntegrationInput) (*Integrat var m struct { Payload struct { Integration *Integration - Errors []OpsLevelErrors + Errors []Error } `graphql:"awsIntegrationCreate(input: $input)"` } // This is a default in the UI, so we must maintain it @@ -94,7 +88,7 @@ func (client *Client) CreateEventIntegration(input EventIntegrationInput) (*Inte var m struct { Payload struct { Integration *Integration - Errors []OpsLevelErrors + Errors []Error } `graphql:"eventIntegrationCreate(input: $input)"` } v := PayloadVariables{ @@ -108,7 +102,7 @@ func (client *Client) CreateIntegrationNewRelic(input NewRelicIntegrationInput) var m struct { Payload struct { Integration *Integration - Errors []OpsLevelErrors + Errors []Error } `graphql:"newRelicIntegrationCreate(input: $input)"` } @@ -167,7 +161,7 @@ func (client *Client) UpdateIntegrationAWS(identifier string, input AWSIntegrati var m struct { Payload struct { Integration *Integration - Errors []OpsLevelErrors + Errors []Error } `graphql:"awsIntegrationUpdate(integration: $integration input: $input)"` } v := PayloadVariables{ @@ -182,7 +176,7 @@ func (client *Client) UpdateEventIntegration(input EventIntegrationUpdateInput) var m struct { Payload struct { Integration *Integration - Errors []OpsLevelErrors + Errors []Error } `graphql:"eventIntegrationUpdate(input: $input)"` } v := PayloadVariables{ @@ -196,7 +190,7 @@ func (client *Client) UpdateIntegrationNewRelic(identifier string, input NewReli var m struct { Payload struct { Integration *Integration - Errors []OpsLevelErrors + Errors []Error } `graphql:"newRelicIntegrationUpdate(input: $input resource: $resource)"` } v := PayloadVariables{ @@ -210,7 +204,7 @@ func (client *Client) UpdateIntegrationNewRelic(identifier string, input NewReli func (client *Client) DeleteIntegration(identifier string) error { var m struct { Payload struct { - Errors []OpsLevelErrors `graphql:"errors"` + Errors []Error `graphql:"errors"` } `graphql:"integrationDelete(resource: $input)"` } v := PayloadVariables{ @@ -224,7 +218,7 @@ func (client *Client) CreateIntegrationAzureResources(input AzureResourcesIntegr var m struct { Payload struct { Integration *Integration - Errors []OpsLevelErrors + Errors []Error } `graphql:"azureResourcesIntegrationCreate(input: $input)"` } v := PayloadVariables{ @@ -238,7 +232,7 @@ func (client *Client) UpdateIntegrationAzureResources(identifier string, input A var m struct { Payload struct { Integration *Integration - Errors []OpsLevelErrors + Errors []Error } `graphql:"azureResourcesIntegrationUpdate(integration: $integration input: $input)"` } v := PayloadVariables{ @@ -253,7 +247,7 @@ func (client *Client) CreateIntegrationGCP(input GoogleCloudIntegrationInput) (* var m struct { Payload struct { Integration *Integration - Errors []OpsLevelErrors + Errors []Error } `graphql:"googleCloudIntegrationCreate(input: $input)"` } v := PayloadVariables{ @@ -267,7 +261,7 @@ func (client *Client) UpdateIntegrationGCP(identifier string, input GoogleCloudI var m struct { Payload struct { Integration *Integration - Errors []OpsLevelErrors + Errors []Error } `graphql:"googleCloudIntegrationUpdate(integration: $integration input: $input)"` } v := PayloadVariables{ @@ -282,7 +276,7 @@ func (client *Client) IntegrationReactivate(identifier string) (*Integration, er var m struct { Payload struct { Integration *Integration - Errors []OpsLevelErrors + Errors []Error } `graphql:"integrationReactivate(integration: $integration)"` } v := PayloadVariables{ diff --git a/integration_test.go b/integration_test.go index fcf1bdf9..db4c0bde 100644 --- a/integration_test.go +++ b/integration_test.go @@ -155,7 +155,7 @@ func TestCreateGoogleCloudIntegration(t *testing.T) { autopilot.Equals(t, result.GoogleCloudIntegrationFragment.OwnershipTagKeys, []string{"owner", "team", "opslevel_team"}) autopilot.Equals(t, []string{"new_gcp_integration"}, result.GoogleCloudIntegrationFragment.Aliases) autopilot.Equals(t, []opslevel.GoogleCloudProject{ - {ID: "123", Name: "my-project-1", URL: "XXX_URL_XXX"}, + {Id: "123", Name: "my-project-1", Url: "XXX_URL_XXX"}, }, result.Projects) } @@ -363,7 +363,7 @@ func TestUpdateGoogleCloudIntegration(t *testing.T) { autopilot.Equals(t, result.GoogleCloudIntegrationFragment.OwnershipTagKeys, []string{"team", "opslevel_team"}) autopilot.Equals(t, []string{"new_gcp_integration", "updated_gcp"}, result.GoogleCloudIntegrationFragment.Aliases) autopilot.Equals(t, []opslevel.GoogleCloudProject{ - {ID: "123", Name: "my-project-1", URL: "XXX_URL_XXX"}, + {Id: "123", Name: "my-project-1", Url: "XXX_URL_XXX"}, }, result.Projects) } diff --git a/job.go b/job.go index ec52c298..f740ce9a 100644 --- a/job.go +++ b/job.go @@ -128,7 +128,7 @@ func (client *Client) RunnerRegister() (*Runner, error) { var m struct { Payload struct { Runner Runner - Errors []OpsLevelErrors + Errors []Error } `graphql:"runnerRegister"` } v := PayloadVariables{} @@ -141,7 +141,7 @@ func (client *Client) RunnerGetPendingJob(runnerId ID, lastUpdateToken ID) (*Run Payload struct { RunnerJob RunnerJob LastUpdateToken ID - Errors []OpsLevelErrors + Errors []Error } `graphql:"runnerGetPendingJob(runnerId: $id lastUpdateToken: $token)"` } v := PayloadVariables{ @@ -170,7 +170,7 @@ func (client *Client) RunnerScale(runnerId ID, currentReplicaCount, jobConcurren func (client *Client) RunnerAppendJobLog(input RunnerAppendJobLogInput) error { var m struct { Payload struct { - Errors []OpsLevelErrors + Errors []Error } `graphql:"runnerAppendJobLog(input: $input)"` } v := PayloadVariables{ @@ -183,7 +183,7 @@ func (client *Client) RunnerAppendJobLog(input RunnerAppendJobLogInput) error { func (client *Client) RunnerReportJobOutcome(input RunnerReportJobOutcomeInput) error { var m struct { Payload struct { - Errors []OpsLevelErrors + Errors []Error } `graphql:"runnerReportJobOutcome(input: $input)"` } v := PayloadVariables{ @@ -196,7 +196,7 @@ func (client *Client) RunnerReportJobOutcome(input RunnerReportJobOutcomeInput) func (client *Client) RunnerUnregister(runnerId ID) error { var m struct { Payload struct { - Errors []OpsLevelErrors + Errors []Error } `graphql:"runnerUnregister(runnerId: $runnerId)"` } v := PayloadVariables{ diff --git a/level.go b/level.go index 5b212987..3aefe492 100644 --- a/level.go +++ b/level.go @@ -6,14 +6,6 @@ import ( "github.com/hasura/go-graphql-client" ) -type Level struct { - Alias string - Description string `json:"description,omitempty"` - Id ID `json:"id"` - Index int - Name string -} - type LevelConnection struct { Nodes []Level PageInfo PageInfo @@ -46,7 +38,7 @@ func (client *Client) CreateLevel(input LevelCreateInput) (*Level, error) { var m struct { Payload struct { Level Level - Errors []OpsLevelErrors + Errors []Error } `graphql:"levelCreate(input: $input)"` } v := PayloadVariables{ @@ -96,7 +88,7 @@ func (client *Client) UpdateLevel(input LevelUpdateInput) (*Level, error) { var m struct { Payload struct { Level Level - Errors []OpsLevelErrors + Errors []Error } `graphql:"levelUpdate(input: $input)"` } v := PayloadVariables{ @@ -110,7 +102,7 @@ func (client *Client) DeleteLevel(id ID) error { var m struct { Payload struct { Id ID `graphql:"deletedLevelId"` - Errors []OpsLevelErrors + Errors []Error } `graphql:"levelDelete(input: $input)"` } v := PayloadVariables{ diff --git a/lifecycle.go b/lifecycle.go index d9fae22d..a4d6d623 100644 --- a/lifecycle.go +++ b/lifecycle.go @@ -1,13 +1,5 @@ package opslevel -type Lifecycle struct { - Alias string - Description string - Id ID - Index int - Name string -} - func (client *Client) ListLifecycles() ([]Lifecycle, error) { var q struct { Account struct { diff --git a/maturity_test.go b/maturity_test.go index f1c3180a..bb05c0f0 100644 --- a/maturity_test.go +++ b/maturity_test.go @@ -9,7 +9,7 @@ import ( func TestGetServiceMaturityWithAlias(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `query ($service:String!){account{service(alias:$service){name,maturityReport{categoryBreakdown{category{id,name},level{alias,description,id,index,name}},overallLevel{alias,description,id,index,name}}}}}`, + `query ($service:String!){account{service(alias:$service){name,maturityReport{categoryBreakdown{category{description,id,name},level{alias,description,id,index,name}},overallLevel{alias,description,id,index,name}}}}}`, `{"service": "cert-manager"}`, `{ "data": { @@ -133,7 +133,7 @@ func TestGetServiceMaturityWithAlias(t *testing.T) { func TestListServicesMaturity(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `query ServiceMaturityList($after:String!$first:Int!){account{services(after: $after, first: $first){nodes{name,maturityReport{categoryBreakdown{category{id,name},level{alias,description,id,index,name}},overallLevel{alias,description,id,index,name}}},{{ template "pagination_request" }}}}}`, + `query ServiceMaturityList($after:String!$first:Int!){account{services(after: $after, first: $first){nodes{name,maturityReport{categoryBreakdown{category{description,id,name},level{alias,description,id,index,name}},overallLevel{alias,description,id,index,name}}},{{ template "pagination_request" }}}}}`, `{"after":"", "first":100}`, `{ "data": { diff --git a/object.go b/object.go new file mode 100644 index 00000000..45bd8008 --- /dev/null +++ b/object.go @@ -0,0 +1,481 @@ +// Code generated; DO NOT EDIT. +package opslevel + +import "github.com/relvacode/iso8601" + +// AlertSource An alert source that is currently integrated and belongs to the account +type AlertSource struct { + Description string // The description of the alert source (Optional) + ExternalId string // The external id of the alert (Required) + Id ID // The id of the alert source (Required) + Integration IntegrationId // The integration of the alert source (Optional) + Metadata string // The metadata of the alert source (Optional) + Name string // The name of the alert source (Required) + Type AlertSourceTypeEnum // The type of the alert (Required) + Url string // The url to the alert source (Optional) +} + +// AlertSourceService An alert source that is connected with a service +type AlertSourceService struct { + AlertSource AlertSource // The alert source that is mapped to a service (Required) + Id ID // id of the alert_source_service mapping (Required) + Service ServiceId // The service the alert source maps to (Required) + Status AlertSourceStatusTypeEnum // The status of the alert source (Required) +} + +// AzureDevopsPermissionError +type AzureDevopsPermissionError struct { + Name string // The name of the object that the error was encountered on (Required) + Permissions []string // The permissions that are missing (Optional) + Type string // The type of the object that the error was encountered on (Required) +} + +// Category A category is used to group related checks in a rubric +type Category struct { + Description string // The description of the category (Optional) + Id ID // The unique identifier for the category (Required) + Name string // The display name of the category (Required) +} + +// CategoryLevel The level of a specific category +type CategoryLevel struct { + Category Category // A category is used to group related checks in a rubric (Required) + Level Level // A performance rating that is used to grade your services against (Optional) +} + +// CheckResult The result for a given Check +type CheckResult struct { + Check Check // The check of check result (Required) + LastUpdated iso8601.Time // The time the check most recently ran (Required) + Message string // The check message (Required) + Service ServiceId // The service of check result (Optional) + ServiceAlias string // The alias for the service (Optional) + Status CheckStatus // The check status (Required) +} + +// CheckStats Check stats shows a summary of check results +type CheckStats struct { + TotalChecks int // The number of existing checks for the resource (Required) + TotalPassingChecks int // The number of checks that are passing for the resource (Required) +} + +// CommonVulnerabilityEnumeration A category system for hardware and software weaknesses +type CommonVulnerabilityEnumeration struct { + Identifier string // The identifer of this item in the CVE system (Required) + Url string // The url for this item in the CVE system (Optional) +} + +// CommonWeaknessEnumeration A category system for hardware and software weaknesses +type CommonWeaknessEnumeration struct { + Identifier string // The identifer of this item in the CWE system (Required) + Url string // The url for this item in the CWE system (Optional) +} + +// ComponentTypeId Information about a particular component type +type ComponentTypeId struct { + Id ID // The id of the component type. + Aliases []string // A list of human-friendly, unique identifiers of the component type. +} + +// ComponentType Information about a particular component type +type ComponentType struct { + ComponentTypeId + Description string // The description of the component type (Optional) + Href string // The relative path to link to the component type (Required) + Icon ComponentTypeIcon // The icon associated with the component type (Required) + IsDefault bool // Whether or not the component type is the default (Required) + Name string // The name of the component type (Required) + Timestamps Timestamps // When the component type was created and updated (Required) +} + +// ComponentTypeIcon The icon for a component type +type ComponentTypeIcon struct { + Color string // The color, represented as a hexcode, for the icon (Optional) + Name string // The name of the icon in Phosphor icons for Vue, e.g. `PhBird`. See https://phosphoricons.com/ for a full list (Optional) +} + +// ConfigError An error that occurred when syncing an opslevel.yml file +type ConfigError struct { + Message string // A description of the error (Optional) + SourceFilename string // The file name where the error was found (Required) +} + +// ConfigFile An OpsLevel config as code definition +type ConfigFile struct { + OwnerType string // The relation for which the config was returned (Required) + Yaml string // The OpsLevel config in yaml format (Required) +} + +// Contact A method of contact for a team +type Contact struct { + Address string // The contact address. Examples: support@company.com for type `email`, https://opslevel.com for type `web` (Required) + DisplayName string // The name shown in the UI for the contact (Optional) + DisplayType string // The type shown in the UI for the contact (Optional) + ExternalId string // The remote identifier of the contact method (Optional) + Id ID // The unique identifier for the contact (Required) + IsDefault bool // Indicates if this address is a team's default for the given type (Optional) + Type ContactType // The method of contact [email, slack, slack_handle, web, microsoft_teams] (Required) +} + +// CustomActionsTemplate Template of a custom action +type CustomActionsTemplate struct { + Action CustomActionsTemplatesAction // The template's action (Required) + Metadata CustomActionsTemplatesMetadata // The template's metadata (Required) + TriggerDefinition CustomActionsTemplatesTriggerDefinition // The template's trigger definition (Required) +} + +// CustomActionsTemplatesAction The action of a custom action template +type CustomActionsTemplatesAction struct { + Description string // A description of what the action should accomplish (Optional) + Headers JSON `scalar:"true"` // The headers sent along with the webhook, if any (Optional) + HttpMethod CustomActionsHttpMethodEnum // The HTTP Method used to call the webhook action (Required) + LiquidTemplate string // The liquid template used to generate the data sent to the external action (Optional) + Name string // The name of the external action (Required) + Url string // The URL of the webhook action (Required) +} + +// CustomActionsTemplatesMetadata The metadata about the custom action template +type CustomActionsTemplatesMetadata struct { + Categories []string // The categories for the custom action template (Required) + Description string // The description of the custom action template (Optional) + Icon string // The icon for the custom action template (Optional) + Name string // The name of the custom action template (Required) +} + +// CustomActionsTemplatesTriggerDefinition The definition of a potential trigger for a template custom action +type CustomActionsTemplatesTriggerDefinition struct { + AccessControl CustomActionsTriggerDefinitionAccessControlEnum // The set of users that should be able to use the trigger definition (Required) + Description string // The description of what the trigger definition will do, supports Markdown (Optional) + ManualInputsDefinition string // The YAML definition of any custom inputs for this trigger definition (Optional) + Name string // The name of the trigger definition (Required) + Published bool // The published state of the action; true if the definition is ready for use; false if it is a draft (Required) + ResponseTemplate string // The liquid template used to parse the response from the External Action (Optional) +} + +// CustomActionsTriggerDefinition The definition of a potential trigger for a custom action +type CustomActionsTriggerDefinition struct { + AccessControl CustomActionsTriggerDefinitionAccessControlEnum // The set of users that should be able to use the trigger definition (Required) + Action CustomActionsId // The action that would be triggered (Required) + Aliases []string // Any aliases for this trigger definition (Required) + Description string // The description of what the trigger definition will do, supports Markdown (Optional) + EntityType CustomActionsEntityTypeEnum // The entity type associated with this trigger definition (Required) + Filter FilterId // A filter defining which services this trigger definition applies to, if present (Optional) + Id ID // The ID of the trigger definition (Required) + ManualInputsDefinition string // The YAML definition of any custom inputs for this trigger definition (Optional) + Name string // The name of the trigger definition (Required) + Owner TeamId // The owner of the trigger definition (Optional) + Published bool // The published state of the action; true if the definition is ready for use; false if it is a draft (Required) + ResponseTemplate string // The liquid template used to parse the response from the External Action (Optional) + Timestamps Timestamps // Relevant timestamps (Required) +} + +// CustomActionsWebhookAction An external webhook action to be triggered by a custom action +type CustomActionsWebhookAction struct { + Aliases []string // Any aliases for this external action (Required) + Description string // A description of what the action should accomplish (Optional) + Headers JSON `scalar:"true"` // The headers sent along with the webhook, if any (Optional) + HttpMethod CustomActionsHttpMethodEnum // The HTTP Method used to call the webhook action (Required) + Id ID // The ID of the external action (Required) + LiquidTemplate string // The liquid template used to generate the data sent to the external action (Optional) + Name string // The name of the external action (Required) + WebhookUrl string // The URL of the webhook action (Required) +} + +// Deploy An event sent via webhook to track deploys +type Deploy struct { + AssociatedUser UserId // The associated OpsLevel user for the deploy (Optional) + Author string // The author of the deploy (Optional) + CommitAuthorEmail string // The email of the commit (Optional) + CommitAuthorName string // The author of the commit (Optional) + CommitAuthoringDate iso8601.Time // The time the commit was authored (Optional) + CommitBranch string // The branch the commit took place on (Optional) + CommitMessage string // The commit message associated with the deploy (Optional) + CommitSha string // The sha associated with the commit of the deploy (Optional) + CommittedAt iso8601.Time // The time the commit happened (Optional) + CommitterEmail string // The email of the person who created the commit (Optional) + CommitterName string // The name of the person who created the commit (Optional) + DedupId string // The deduplication ID provided to prevent duplicate deploys (Optional) + DeployNumber string // An identifier to keep track of the version of the deploy (Optional) + DeployUrl string // The url the where the deployment can be found (Optional) + DeployedAt iso8601.Time // The time the deployment happened (Optional) + DeployerEmail string // The email of who is responsible for the deployment (Optional) + DeployerId string // An external id of who deployed (Optional) + DeployerName string // The name of who is responsible for the deployment (Optional) + Description string // The given description of the deploy (Required) + Environment string // The environment in which the deployment happened in (Optional) + Id ID // The id of the deploy (Required) + ProviderName string // The integration name of the deploy (Optional) + ProviderType string // The integration type used the deploy (Optional) + ProviderUrl string // The url to the deploy integration (Optional) + Service ServiceId // The service object the deploy is attached to (Optional) + ServiceAlias string // The alias used to associated this deploy to its service (Required) + ServiceId string // The id the deploy is associated to (Optional) + Status string // The deployment status (Optional) +} + +// DomainId A collection of related Systems +type DomainId struct { + Id ID // The identifier of the object. + Aliases []string // All of the aliases attached to the resource. +} + +// Domain A collection of related Systems +type Domain struct { + DomainId + Description string // The description of the Domain (Optional) + HtmlUrl string // A link to the HTML page for the resource. Ex. https://app.opslevel.com/services/shopping_cart (Required) + ManagedAliases []string // A list of aliases that can be set by users. The unique identifier for the resource is omitted (Required) + Name string // The name of the object (Required) + Note string // Additional information about the domain (Optional) + Owner EntityOwner // The owner of the object (Optional) +} + +// Error The input error of a mutation +type Error struct { + Message string // The error message (Required) + Path []string // The path to the input field with an error (Required) +} + +// FilterId A filter is used to select which services will have checks applied. It can also be used to filter services in reports +type FilterId struct { + Id ID // The unique identifier for the filter. + Name string // The display name of the filter. +} + +// Filter A filter is used to select which services will have checks applied. It can also be used to filter services in reports +type Filter struct { + FilterId + Connective ConnectiveEnum // The logical operator to be used in conjunction with predicates (Optional) + HtmlUrl string // A link to the HTML page for the resource. Ex. https://app.opslevel.com/services/shopping_cart (Required) + Predicates []FilterPredicate // The predicates used to select services (Required) +} + +// FilterPredicate A condition used to select services +type FilterPredicate struct { + CaseSensitive *bool // Option for determining whether to compare strings case-sensitively (Optional) + Key PredicateKeyEnum // The key of the condition (Required) + KeyData string // Additional data used in the condition (Optional) + Type PredicateTypeEnum // Type of operation to be used in the condition (Required) + Value string // The value of the condition (Optional) +} + +// GoogleCloudProject +type GoogleCloudProject struct { + Id string // The ID of the Google Cloud project (Required) + Name string // The name of the Google Cloud project (Required) + Url string // The URL to the Google Cloud project (Required) +} + +// InfrastructureResourceProviderData Data about the provider the infrastructure resource is from +type InfrastructureResourceProviderData struct { + AccountName string // The account name of the provider (Required) + ExternalUrl string // The external URL of the infrastructure resource in its provider (Optional) + ProviderName string // The name of the provider (e.g. AWS, GCP, Azure) (Optional) +} + +// Language A language that can be assigned to a repository +type Language struct { + Name string // The name of the language (Required) + Usage float64 // The percentage of the code written in that language (Required) +} + +// Level A performance rating that is used to grade your services against +type Level struct { + Alias string // The human-friendly, unique identifier for the level (Optional) + Description string // A brief description of the level (Optional) + Id ID // The unique identifier for the level (Required) + Index int // The numerical representation of the level (highest is better) (Optional) + Name string // The display name of the level (Optional) +} + +// LevelCount The total number of services in each level +type LevelCount struct { + Level Level // A performance rating that is used to grade your services against (Required) + ServiceCount int // The number of services (Required) +} + +// Lifecycle A lifecycle represents the current development stage of a service +type Lifecycle struct { + Alias string // The human-friendly, unique identifier for the lifecycle (Optional) + Description string // The lifecycle's description (Optional) + Id ID // The unique identifier for the lifecycle (Required) + Index int // The numerical representation of the lifecycle (Optional) + Name string // The lifecycle's display name (Optional) +} + +// ManualCheckFrequency +type ManualCheckFrequency struct { + FrequencyTimeScale FrequencyTimeScale // The time scale type for the frequency (Required) + FrequencyValue int // The value to be used together with the frequency scale (Required) + StartingDate iso8601.Time // The date that the check will start to evaluate (Required) +} + +// Predicate A condition used to select services +type Predicate struct { + Type PredicateTypeEnum // Type of operation to be used in the condition (Required) + Value string // The value of the condition (Optional) +} + +// RepositoryPath The repository path used for this service +type RepositoryPath struct { + Href string // The deep link to the repository path where the linked service's code exists (Required) + Path string // The path where the linked service's code exists, relative to the root of the repository (Required) +} + +// ScorecardId A scorecard +type ScorecardId struct { + Id ID // A reference to the scorecard. + Aliases []string // Aliases of the scorecard. +} + +// Scorecard A scorecard +type Scorecard struct { + ScorecardId + AffectsOverallServiceLevels bool // Specifies whether the checks on this scorecard affect services' overall maturity level (Required) + Description string // Description of the scorecard (Optional) + Filter Filter // Filter used by the scorecard to restrict services (Optional) + Href string // The hypertext reference (link) to the UI showing this scorecard (Required) + Name string // Name of the scorecard (Required) + Owner EntityOwner // The owner of this scorecard. Can currently either be a team or a group (Optional) + PassingChecks int // The number of checks that are passing on this scorecard. A check executed against two services counts as two (Required) + ServiceCount int // The number of services covered by this scorecard (Required) + ServicesReport ScorecardServicesReport // Service stats regarding this scorecard (Optional) + Slug string // Slug of the scorecard (Required) + TotalChecks int // The number of checks that are performed on this scorecard. A check executed against two services counts as two (Required) +} + +// ScorecardServicesReport Service stats regarding this scorecard +type ScorecardServicesReport struct { + LevelCounts []LevelCount // Services per level regarding this scorecard (Required) +} + +// Secret A sensitive value +type Secret struct { + Alias string // A human reference for the secret (Required) + Id ID // A reference for the secret (Required) + Owner TeamId // The owner of this secret (Optional) + Timestamps Timestamps // Relevant timestamps (Required) +} + +// ServiceLevelNotifications +type ServiceLevelNotifications struct { + SlackNotificationEnabled bool // Whether slack notifications on service level changes are enabled on your account (Required) +} + +// ServiceMaturityReport The health report for this service in terms of its levels and checks +type ServiceMaturityReport struct { + CategoryBreakdown []CategoryLevel // The level of each category for this service (Required) + LatestCheckResults []CheckResult // The latest check results for this service across the given checks (Optional) + OverallLevel Level // The overall level for this service (Required) +} + +// ServiceRepository A record of the connection between a service and a repository +type ServiceRepository struct { + BaseDirectory string // The directory in the repository where service information exists, including the opslevel.yml file. This path is always returned without leading and trailing slashes (Optional) + DisplayName string // The name displayed in the UI for the service repository (Optional) + Id ID // ID of the service repository (Required) + Repository RepositoryId // The repository that is part of this connection (Required) + Service ServiceId // The service that is part of this connection (Required) +} + +// Stats An object that contains statistics +type Stats struct { + Total int // How many there are (Required) + TotalSuccessful int // How many are successfully passing (Required) +} + +// SystemId A collection of related Services +type SystemId struct { + Id ID // The identifier of the object. + Aliases []string // All of the aliases attached to the resource. +} + +// System A collection of related Services +type System struct { + SystemId + Description string // The description of the System (Optional) + HtmlUrl string // A link to the HTML page for the resource. Ex. https://app.opslevel.com/services/shopping_cart (Required) + ManagedAliases []string // A list of aliases that can be set by users. The unique identifier for the resource is omitted (Required) + Name string // The name of the object (Required) + Note string // Additional information about the system (Optional) + Owner EntityOwner // The owner of the object (Optional) + Parent Domain // Parent domain of the System (Optional) +} + +// Tag An arbitrary key-value pair associated with a resource +type Tag struct { + Id ID // The unique identifier for the tag (Required) + Key string // The tag's key (Required) + Value string // The tag's value (Required) +} + +// TagRelationshipKeys Returns the keys that set relationships when imported from AWS +type TagRelationshipKeys struct { + BelongsTo string // The tag key that will create `belongs_to` relationships (Required) + DependencyOf []string // The tag keys that will create `dependency_of` relationships (Required) + DependsOn []string // The tag keys that will create `depends_on` relationships (Required) +} + +// TeamMembership +type TeamMembership struct { + Role string // Role of the user on the Team (Optional) + Team TeamId // Team for the membership (Required) + User UserId // User for the membership (Required) +} + +// TeamPropertyDefinition The definition of a property +type TeamPropertyDefinition struct { + Alias string // The human-friendly, unique identifier of the property definition (Required) + Description string // The description of the property definition (Required) + DisplaySubtype PropertyDefinitionDisplayTypeEnum // The secondary inferred type of the schema (Optional) + DisplayType PropertyDefinitionDisplayTypeEnum // The primary inferred type of the schema (Required) + Id ID // The id of the property definition (Required) + LockedStatus PropertyLockedStatusEnum // Restricts what sources are able to assign values to this property (Required) + Name string // The name of the property definition (Required) + Schema JSONSchema `scalar:"true"` // The schema of the property definition (Required) +} + +// Tier A tier measures how critical or important a service is to your business +type Tier struct { + Alias string // The human-friendly, unique identifier for the tier (Optional) + Description string // A brief description of the tier (Optional) + Id ID // The unique identifier for the tier (Required) + Index int // The numerical representation of the tier (Optional) + Name string // The display name of the tier (Optional) +} + +// Timestamps Relevant timestamps +type Timestamps struct { + CreatedAt iso8601.Time // The time at which the entity was created (Required) + UpdatedAt iso8601.Time // The time at which the entity was most recently updated (Required) +} + +// Tool A tool is used to support the operations of a service +type Tool struct { + Category ToolCategory // The category that the tool belongs to (Optional) + CategoryAlias string // The human-friendly, unique identifier for the tool's category (Optional) + DisplayName string // The display name of the tool (Optional) + Environment string // The environment that the tool belongs to (Optional) + Id ID // The unique identifier for the tool (Required) + Service ServiceId // The service that is associated to the tool (Required) + Url string // The URL of the tool (Required) +} + +// UserId A user is someone who belongs to an organization +type UserId struct { + Id ID // The unique identifier for the user. + Email string // The user's email. +} + +// User A user is someone who belongs to an organization +type User struct { + UserId + HtmlUrl string // A link to the HTML page for the resource. Ex. https://app.opslevel.com/services/shopping_cart (Required) + Name string // The user's full name (Required) + Role UserRole // The user's assigned role (Optional) +} + +// Warning The warnings of the mutation +type Warning struct { + Message string // The warning message (Required) +} diff --git a/owner.go b/owner.go index 304ab664..050db146 100644 --- a/owner.go +++ b/owner.go @@ -5,10 +5,6 @@ type EntityOwnerTeam struct { Id ID `json:"id"` } -type EntityOwner struct { - OnTeam EntityOwnerTeam `graphql:"... on Team"` -} - func (entityOwner *EntityOwner) Alias() string { return entityOwner.OnTeam.Alias } diff --git a/predicate.go b/predicate.go index 929e4cc5..95848c87 100644 --- a/predicate.go +++ b/predicate.go @@ -7,11 +7,6 @@ import ( "strconv" ) -type Predicate struct { - Type PredicateTypeEnum `graphql:"type"` - Value string `graphql:"value"` -} - var existsTypes = []PredicateTypeEnum{ PredicateTypeEnumDoesNotExist, PredicateTypeEnumExists, diff --git a/property.go b/property.go index cedceda3..26b7e83e 100644 --- a/property.go +++ b/property.go @@ -31,7 +31,7 @@ type Property struct { Definition PropertyDefinitionId `graphql:"definition"` Locked bool `graphql:"locked"` Owner EntityOwnerService `graphql:"owner"` - ValidationErrors []OpsLevelErrors `graphql:"validationErrors"` + ValidationErrors []Error `graphql:"validationErrors"` Value *JsonString `graphql:"value"` } @@ -45,7 +45,7 @@ func (client *Client) CreatePropertyDefinition(input PropertyDefinitionInput) (* var m struct { Payload struct { Definition PropertyDefinition `graphql:"definition"` - Errors []OpsLevelErrors `graphql:"errors"` + Errors []Error `graphql:"errors"` } `graphql:"propertyDefinitionCreate(input: $input)"` } v := PayloadVariables{ @@ -59,7 +59,7 @@ func (client *Client) UpdatePropertyDefinition(identifier string, input Property var m struct { Payload struct { Definition PropertyDefinition `graphql:"definition"` - Errors []OpsLevelErrors `graphql:"errors"` + Errors []Error `graphql:"errors"` } `graphql:"propertyDefinitionUpdate(propertyDefinition: $propertyDefinition, input: $input)"` } v := PayloadVariables{ @@ -114,7 +114,7 @@ func (client *Client) ListPropertyDefinitions(variables *PayloadVariables) (*Pro func (client *Client) DeletePropertyDefinition(input string) error { var m struct { Payload struct { - Errors []OpsLevelErrors `graphql:"errors"` + Errors []Error `graphql:"errors"` } `graphql:"propertyDefinitionDelete(resource: $input)"` } v := PayloadVariables{ @@ -141,8 +141,8 @@ func (client *Client) GetProperty(owner string, definition string) (*Property, e func (client *Client) PropertyAssign(input PropertyInput) (*Property, error) { var m struct { Payload struct { - Property Property `graphql:"property"` - Errors []OpsLevelErrors `graphql:"errors"` + Property Property `graphql:"property"` + Errors []Error `graphql:"errors"` } `graphql:"propertyAssign(input: $input)"` } v := PayloadVariables{ @@ -155,7 +155,7 @@ func (client *Client) PropertyAssign(input PropertyInput) (*Property, error) { func (client *Client) PropertyUnassign(owner string, definition string) error { var m struct { Payload struct { - Errors []OpsLevelErrors `graphql:"errors"` + Errors []Error `graphql:"errors"` } `graphql:"propertyUnassign(owner: $owner, definition: $definition)"` } v := PayloadVariables{ diff --git a/property_test.go b/property_test.go index 211b2d58..80fdfb05 100644 --- a/property_test.go +++ b/property_test.go @@ -327,7 +327,7 @@ func TestGetServiceProperties(t *testing.T) { Id: id2, }, Owner: owner, - ValidationErrors: []ol.OpsLevelErrors{}, + ValidationErrors: []ol.Error{}, Value: &value1, }, { @@ -336,7 +336,7 @@ func TestGetServiceProperties(t *testing.T) { Id: id3, }, Owner: owner, - ValidationErrors: []ol.OpsLevelErrors{}, + ValidationErrors: []ol.Error{}, Value: &value2, }, }) @@ -347,7 +347,7 @@ func TestGetServiceProperties(t *testing.T) { Id: id4, }, Owner: owner, - ValidationErrors: []ol.OpsLevelErrors{}, + ValidationErrors: []ol.Error{}, Value: &value3, }, }) diff --git a/repository.go b/repository.go index a322a36b..07f5ac38 100644 --- a/repository.go +++ b/repository.go @@ -7,11 +7,6 @@ import ( "github.com/relvacode/iso8601" ) -type Language struct { - Name string - Usage float64 -} - type RepositoryId struct { Id ID DefaultAlias string @@ -42,19 +37,6 @@ type Repository struct { Visible bool } -type RepositoryPath struct { - Href string - Path string -} - -type ServiceRepository struct { - BaseDirectory string - DisplayName string - Id ID - Repository RepositoryId - Service ServiceId -} - type RepositoryConnection struct { HiddenCount int Nodes []Repository @@ -222,7 +204,7 @@ func (client *Client) CreateServiceRepository(input ServiceRepositoryCreateInput var m struct { Payload struct { ServiceRepository ServiceRepository - Errors []OpsLevelErrors + Errors []Error } `graphql:"serviceRepositoryCreate(input: $input)"` } v := PayloadVariables{ @@ -336,7 +318,7 @@ func (client *Client) UpdateRepository(input RepositoryUpdateInput) (*Repository var m struct { Payload struct { Repository Repository - Errors []OpsLevelErrors + Errors []Error } `graphql:"repositoryUpdate(input: $input)"` } v := PayloadVariables{ @@ -350,7 +332,7 @@ func (client *Client) UpdateServiceRepository(input ServiceRepositoryUpdateInput var m struct { Payload struct { ServiceRepository ServiceRepository - Errors []OpsLevelErrors + Errors []Error } `graphql:"serviceRepositoryUpdate(input: $input)"` } v := PayloadVariables{ @@ -364,7 +346,7 @@ func (client *Client) DeleteServiceRepository(id ID) error { var m struct { Payload struct { Id ID `graphql:"deletedId"` - Errors []OpsLevelErrors + Errors []Error } `graphql:"serviceRepositoryDelete(input: $input)"` } v := PayloadVariables{ diff --git a/scorecards.go b/scorecards.go index be34de3f..94c78cd1 100644 --- a/scorecards.go +++ b/scorecards.go @@ -7,24 +7,6 @@ import ( "github.com/hasura/go-graphql-client" ) -type ScorecardId struct { - Aliases []string `graphql:"aliases"` - Id ID `graphql:"id"` -} - -type Scorecard struct { - ScorecardId - - AffectsOverallServiceLevels bool `graphql:"affectsOverallServiceLevels"` - Description string `graphql:"description"` // optional - Filter Filter `graphql:"filter"` // optional - Name string `graphql:"name"` - Owner EntityOwner `graphql:"owner"` - PassingChecks int `graphql:"passingChecks"` - ServiceCount int `graphql:"serviceCount"` - ChecksCount int `graphql:"totalChecks"` -} - type ScorecardConnection struct { Nodes []Scorecard `graphql:"nodes"` PageInfo PageInfo `graphql:"pageInfo"` @@ -101,8 +83,8 @@ func (scorecard *Scorecard) ListCategories(client *Client, variables *PayloadVar func (client *Client) CreateScorecard(input ScorecardInput) (*Scorecard, error) { var m struct { Payload struct { - Scorecard Scorecard `graphql:"scorecard"` - Errors []OpsLevelErrors `graphql:"errors"` + Scorecard Scorecard `graphql:"scorecard"` + Errors []Error `graphql:"errors"` } `graphql:"scorecardCreate(input: $input)"` } v := PayloadVariables{ @@ -159,8 +141,8 @@ func (client *Client) ListScorecards(variables *PayloadVariables) (*ScorecardCon func (client *Client) UpdateScorecard(identifier string, input ScorecardInput) (*Scorecard, error) { var m struct { Payload struct { - Scorecard Scorecard `graphql:"scorecard"` - Errors []OpsLevelErrors `graphql:"errors"` + Scorecard Scorecard `graphql:"scorecard"` + Errors []Error `graphql:"errors"` } `graphql:"scorecardUpdate(scorecard: $scorecard, input: $input)"` } scorecard := *NewIdentifier(identifier) @@ -175,8 +157,8 @@ func (client *Client) UpdateScorecard(identifier string, input ScorecardInput) ( func (client *Client) DeleteScorecard(identifier string) (*ID, error) { var m struct { Payload struct { - DeletedScorecardId ID `graphql:"deletedScorecardId"` - Errors []OpsLevelErrors `graphql:"errors"` + DeletedScorecardId ID `graphql:"deletedScorecardId"` + Errors []Error `graphql:"errors"` } `graphql:"scorecardDelete(input: $input)"` } input := *NewIdentifier(identifier) diff --git a/scorecards_test.go b/scorecards_test.go index 63e24552..87eb7f39 100644 --- a/scorecards_test.go +++ b/scorecards_test.go @@ -127,7 +127,7 @@ func TestGetScorecard(t *testing.T) { autopilot.Equals(t, *fakeFilterId, sc.Filter.Id) autopilot.Equals(t, 10, sc.PassingChecks) autopilot.Equals(t, 20, sc.ServiceCount) - autopilot.Equals(t, 30, sc.ChecksCount) + autopilot.Equals(t, 30, sc.TotalChecks) } func TestListScorecards(t *testing.T) { @@ -168,12 +168,12 @@ func TestListScorecards(t *testing.T) { func TestListScorecardCategories(t *testing.T) { // Arrange testRequestOne := autopilot.NewTestRequest( - `query ScorecardCategoryList($after:String!$first:Int!$scorecard:IdentifierInput!){account{scorecard(input: $scorecard){categories(after: $after, first: $first){nodes{id,name},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}`, + `query ScorecardCategoryList($after:String!$first:Int!$scorecard:IdentifierInput!){account{scorecard(input: $scorecard){categories(after: $after, first: $first){nodes{description,id,name},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}`, `{ {{ template "first_page_variables" }}, "scorecard": { {{ template "id1" }} } }`, `{ "data": { "account": { "scorecard": { "categories": { "nodes": [ { {{ template "id2" }}, "name": "quality" } ], {{ template "pagination_initial_pageInfo_response" }}, "totalCount": 1 }}}}}`, ) testRequestTwo := autopilot.NewTestRequest( - `query ScorecardCategoryList($after:String!$first:Int!$scorecard:IdentifierInput!){account{scorecard(input: $scorecard){categories(after: $after, first: $first){nodes{id,name},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}`, + `query ScorecardCategoryList($after:String!$first:Int!$scorecard:IdentifierInput!){account{scorecard(input: $scorecard){categories(after: $after, first: $first){nodes{description,id,name},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}`, `{ {{ template "second_page_variables" }}, "scorecard": { {{ template "id1" }} } }`, `{ "data": { "account": { "scorecard": { "categories": { "nodes": [ { {{ template "id3" }}, "name": "ownership" } ], {{ template "pagination_second_pageInfo_response" }}, "totalCount": 1 }}}}}`, ) diff --git a/secrets.go b/secrets.go index c876941d..fe59b8f6 100644 --- a/secrets.go +++ b/secrets.go @@ -1,12 +1,5 @@ package opslevel -type Secret struct { - Alias string `json:"alias"` - ID ID `json:"id"` - Owner TeamId `json:"team"` - Timestamps Timestamps `json:"timestamps"` -} - type SecretsVaultsSecretConnection struct { Nodes []Secret PageInfo PageInfo @@ -17,7 +10,7 @@ func (client *Client) CreateSecret(alias string, input SecretInput) (*Secret, er var m struct { Payload struct { Secret Secret - Errors []OpsLevelErrors + Errors []Error } `graphql:"secretsVaultsSecretCreate(alias: $alias, input: $input)"` } v := PayloadVariables{ @@ -57,7 +50,7 @@ func (client *Client) UpdateSecret(identifier string, secretInput SecretInput) ( var m struct { Payload struct { Secret Secret - Errors []OpsLevelErrors + Errors []Error } `graphql:"secretsVaultsSecretUpdate(input: $input, secret: $secret)"` } v := PayloadVariables{ @@ -71,7 +64,7 @@ func (client *Client) UpdateSecret(identifier string, secretInput SecretInput) ( func (client *Client) DeleteSecret(identifier string) error { var m struct { Payload struct { - Errors []OpsLevelErrors `graphql:"errors"` + Errors []Error `graphql:"errors"` } `graphql:"secretsVaultsSecretDelete(resource: $input)"` } v := PayloadVariables{"input": *NewIdentifier(identifier)} diff --git a/secrets_test.go b/secrets_test.go index 30f7fb2a..0e9434fa 100644 --- a/secrets_test.go +++ b/secrets_test.go @@ -39,7 +39,7 @@ func TestGetSecret(t *testing.T) { result, err := client.GetSecret(string(id2)) // Assert autopilot.Equals(t, nil, err) - autopilot.Equals(t, id2, result.ID) + autopilot.Equals(t, id2, result.Id) } func TestListSecrets(t *testing.T) { @@ -83,7 +83,7 @@ func TestUpdateSecret(t *testing.T) { result, err := client.UpdateSecret(string(id2), secretInput) // Assert autopilot.Ok(t, err) - autopilot.Equals(t, id2, result.ID) + autopilot.Equals(t, id2, result.Id) autopilot.Equals(t, id2, result.Owner.Id) } diff --git a/service.go b/service.go index a5ab8896..a85fd521 100644 --- a/service.go +++ b/service.go @@ -312,7 +312,7 @@ func (client *Client) CreateService(input ServiceCreateInput) (*Service, error) var m struct { Payload struct { Service Service - Errors []OpsLevelErrors + Errors []Error } `graphql:"serviceCreate(input: $input)"` } v := PayloadVariables{ @@ -708,7 +708,7 @@ func (client *Client) UpdateService(input ServiceUpdateInput) (*Service, error) var m struct { Payload struct { Service Service - Errors []OpsLevelErrors + Errors []Error } `graphql:"serviceUpdate(input: $input)"` } @@ -728,7 +728,7 @@ func (client *Client) UpdateServiceNote(input ServiceNoteUpdateInput) (*Service, var m struct { Payload struct { Service Service - Errors []OpsLevelErrors + Errors []Error } `graphql:"serviceNoteUpdate(input: $input)"` } @@ -752,9 +752,9 @@ func (client *Client) DeleteService(identifier string) error { var m struct { Payload struct { - Id ID `graphql:"deletedServiceId"` - Alias string `graphql:"deletedServiceAlias"` - Errors []OpsLevelErrors `graphql:"errors"` + Id ID `graphql:"deletedServiceId"` + Alias string `graphql:"deletedServiceAlias"` + Errors []Error `graphql:"errors"` } `graphql:"serviceDelete(input: $input)"` } v := PayloadVariables{ diff --git a/service_test.go b/service_test.go index dc9602a5..fe08721a 100644 --- a/service_test.go +++ b/service_test.go @@ -43,7 +43,7 @@ func TestServiceTags(t *testing.T) { func TestServiceTools(t *testing.T) { // Arrange testRequestOne := autopilot.NewTestRequest( - `query ServiceToolsList($after:String!$first:Int!$service:ID!){account{service(id: $service){tools(after: $after, first: $first){nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}}}}`, + `query ServiceToolsList($after:String!$first:Int!$service:ID!){account{service(id: $service){tools(after: $after, first: $first){nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}}}}`, `{ {{ template "first_page_variables" }}, "service": "Z2lkOi8vb3BzbGV2ZWwvU2VydmljZS85NjQ4" }`, `{ "data": { "account": { @@ -71,7 +71,7 @@ func TestServiceTools(t *testing.T) { }}}}`, ) testRequestTwo := autopilot.NewTestRequest( - `query ServiceToolsList($after:String!$first:Int!$service:ID!){account{service(id: $service){tools(after: $after, first: $first){nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}}}}`, + `query ServiceToolsList($after:String!$first:Int!$service:ID!){account{service(id: $service){tools(after: $after, first: $first){nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}}}}`, `{ {{ template "second_page_variables" }}, "service": "Z2lkOi8vb3BzbGV2ZWwvU2VydmljZS85NjQ4" }`, `{ "data": { "account": { @@ -230,7 +230,7 @@ func TestServiceRepositories(t *testing.T) { func TestCreateService(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `mutation ServiceCreate($input:ServiceCreateInput!){serviceCreate(input: $input){service{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},errors{message,path}}}`, + `mutation ServiceCreate($input:ServiceCreateInput!){serviceCreate(input: $input){service{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},errors{message,path}}}`, `{ "input": { "name": "Foo", "description": "Foo service" } }`, `{ "data": { "serviceCreate": { "service": {{ template "service_1" }}, "errors": [] } }}`, ) @@ -248,12 +248,12 @@ func TestCreateService(t *testing.T) { func TestCreateServiceWithNote(t *testing.T) { // Arrange testRequestOne := autopilot.NewTestRequest( - `mutation ServiceCreate($input:ServiceCreateInput!){serviceCreate(input: $input){service{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},errors{message,path}}}`, + `mutation ServiceCreate($input:ServiceCreateInput!){serviceCreate(input: $input){service{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},errors{message,path}}}`, `{ "input": { "name": "Foo", "description": "Foo service" } }`, `{ "data": { "serviceCreate": { "service": {{ template "service_1" }}, "errors": [] } }}`, ) testRequestTwo := autopilot.NewTestRequest( - `mutation ServiceUpdateNote($input:ServiceNoteUpdateInput!){serviceNoteUpdate(input: $input){service{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}},errors{message,path}}}`, + `mutation ServiceUpdateNote($input:ServiceNoteUpdateInput!){serviceNoteUpdate(input: $input){service{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}},errors{message,path}}}`, `{ "input": { "service": { {{ template "id1" }} }, "note": "Foo note" } }`, `{ "data": { "serviceNoteUpdate": { "service": {{ template "service_with_note" }}, "errors": [] } }}`, ) @@ -279,7 +279,7 @@ func TestCreateServiceWithNote(t *testing.T) { func TestCreateServiceWithParentSystem(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `mutation ServiceCreate($input:ServiceCreateInput!){serviceCreate(input: $input){service{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},errors{message,path}}}`, + `mutation ServiceCreate($input:ServiceCreateInput!){serviceCreate(input: $input){service{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},errors{message,path}}}`, `{ "input": { "name": "Foo", "description": "Foo service", "parent": {"alias": "FooSystem"} } }`, `{ "data": { "serviceCreate": { "service": {{ template "service_1" }}, "errors": [] } }}`, ) @@ -380,7 +380,7 @@ func TestUpdateService(t *testing.T) { for i, testCase := range testCases { t.Run(testCase.Name, func(t *testing.T) { testRequest := autopilot.NewTestRequest( - `mutation ServiceUpdate($input:ServiceUpdateInput!){serviceUpdate(input: $input){service{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},errors{message,path}}}`, + `mutation ServiceUpdate($input:ServiceUpdateInput!){serviceUpdate(input: $input){service{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},errors{message,path}}}`, testCase.Vars, `{"data": {"serviceUpdate": { "service": {{ template "service_1" }}, "errors": [] }}}`, ) @@ -413,7 +413,7 @@ func TestGetServiceIdWithAlias(t *testing.T) { func TestGetServiceWithAlias(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `query ServiceGet($service:String!){account{service(alias: $service){apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}}}}`, + `query ServiceGet($service:String!){account{service(alias: $service){apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}}}}`, `{ "service": "coredns" }`, `{ "data": { "account": { @@ -793,12 +793,12 @@ func TestGetServiceDocuments(t *testing.T) { func TestListServices(t *testing.T) { // Arrange testRequestOne := autopilot.NewTestRequest( - `query ServiceList($after:String!$first:Int!){account{services(after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, + `query ServiceList($after:String!$first:Int!){account{services(after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, `{ {{ template "first_page_variables" }} }`, `{ "data": { "account": { "services": { "nodes": [ {{ template "service_1" }} ], {{ template "pagination_initial_pageInfo_response" }}, "totalCount": 1 }}}}`, ) testRequestTwo := autopilot.NewTestRequest( - `query ServiceList($after:String!$first:Int!){account{services(after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, + `query ServiceList($after:String!$first:Int!){account{services(after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, `{ {{ template "second_page_variables" }} }`, `{ "data": { "account": { "services": { "nodes": [ {{ template "service_2" }} ], {{ template "pagination_second_pageInfo_response" }}, "totalCount": 1 }}}}`, ) @@ -819,12 +819,12 @@ func TestListServices(t *testing.T) { func TestListServicesWithFilter(t *testing.T) { // Arrange testRequestOne := autopilot.NewTestRequest( - `query ServiceListWithFilter($after:String!$filter:IdentifierInput$first:Int!){account{services(filterIdentifier: $filter, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}`, + `query ServiceListWithFilter($after:String!$filter:IdentifierInput$first:Int!){account{services(filterIdentifier: $filter, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}`, `{ {{ template "first_page_variables" }}, "filter": { {{ template "id1" }} } }`, `{ "data": { "account": { "services": { "nodes": [ {{ template "service_1" }} ], {{ template "pagination_initial_pageInfo_response" }}, "totalCount": 1 }}}}`, ) testRequestTwo := autopilot.NewTestRequest( - `query ServiceListWithFilter($after:String!$filter:IdentifierInput$first:Int!){account{services(filterIdentifier: $filter, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}`, + `query ServiceListWithFilter($after:String!$filter:IdentifierInput$first:Int!){account{services(filterIdentifier: $filter, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}`, `{ {{ template "second_page_variables" }}, "filter": { {{ template "id1" }} } }`, `{ "data": { "account": { "services": { "nodes": [ {{ template "service_2" }} ], {{ template "pagination_second_pageInfo_response" }}, "totalCount": 1 }}}}`, ) @@ -844,12 +844,12 @@ func TestListServicesWithFilter(t *testing.T) { func TestListServicesWithFramework(t *testing.T) { // Arrange testRequestOne := autopilot.NewTestRequest( - `query ServiceListWithFramework($after:String!$first:Int!$framework:String!){account{services(framework: $framework, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, + `query ServiceListWithFramework($after:String!$first:Int!$framework:String!){account{services(framework: $framework, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, `{ {{ template "first_page_variables" }}, "framework": "postgres" }`, `{ "data": { "account": { "services": { "nodes": [ {{ template "service_1" }} ], {{ template "pagination_initial_pageInfo_response" }}, "totalCount": 1 }}}}`, ) testRequestTwo := autopilot.NewTestRequest( - `query ServiceListWithFramework($after:String!$first:Int!$framework:String!){account{services(framework: $framework, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, + `query ServiceListWithFramework($after:String!$first:Int!$framework:String!){account{services(framework: $framework, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, `{ {{ template "second_page_variables" }}, "framework": "postgres" }`, `{ "data": { "account": { "services": { "nodes": [ {{ template "service_2" }} ], {{ template "pagination_second_pageInfo_response" }}, "totalCount": 1 }}}}`, ) @@ -869,12 +869,12 @@ func TestListServicesWithFramework(t *testing.T) { func TestListServicesWithLanguage(t *testing.T) { // Arrange testRequestOne := autopilot.NewTestRequest( - `query ServiceListWithLanguage($after:String!$first:Int!$language:String!){account{services(language: $language, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, + `query ServiceListWithLanguage($after:String!$first:Int!$language:String!){account{services(language: $language, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, `{ {{ template "first_page_variables" }}, "language": "postgres" }`, `{ "data": { "account": { "services": { "nodes": [ {{ template "service_1" }} ], {{ template "pagination_initial_pageInfo_response" }}, "totalCount": 1 }}}}`, ) testRequestTwo := autopilot.NewTestRequest( - `query ServiceListWithLanguage($after:String!$first:Int!$language:String!){account{services(language: $language, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, + `query ServiceListWithLanguage($after:String!$first:Int!$language:String!){account{services(language: $language, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, `{ {{ template "second_page_variables" }}, "language": "postgres" }`, `{ "data": { "account": { "services": { "nodes": [ {{ template "service_2" }} ], {{ template "pagination_second_pageInfo_response" }}, "totalCount": 1 }}}}`, ) @@ -894,12 +894,12 @@ func TestListServicesWithLanguage(t *testing.T) { func TestListServicesWithOwner(t *testing.T) { // Arrange testRequestOne := autopilot.NewTestRequest( - `query ServiceListWithOwner($after:String!$first:Int!$owner:String!){account{services(ownerAlias: $owner, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, + `query ServiceListWithOwner($after:String!$first:Int!$owner:String!){account{services(ownerAlias: $owner, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, `{ {{ template "first_page_variables" }}, "owner": "postgres" }`, `{ "data": { "account": { "services": { "nodes": [ {{ template "service_1" }} ], {{ template "pagination_initial_pageInfo_response" }}, "totalCount": 1 }}}}`, ) testRequestTwo := autopilot.NewTestRequest( - `query ServiceListWithOwner($after:String!$first:Int!$owner:String!){account{services(ownerAlias: $owner, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, + `query ServiceListWithOwner($after:String!$first:Int!$owner:String!){account{services(ownerAlias: $owner, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, `{ {{ template "second_page_variables" }}, "owner": "postgres" }`, `{ "data": { "account": { "services": { "nodes": [ {{ template "service_2" }} ], {{ template "pagination_second_pageInfo_response" }}, "totalCount": 1 }}}}`, ) @@ -919,12 +919,12 @@ func TestListServicesWithOwner(t *testing.T) { func TestListServicesWithTag(t *testing.T) { // Arrange testRequestOne := autopilot.NewTestRequest( - `query ServiceListWithTag($after:String!$first:Int!$tag:TagArgs!){account{services(tag: $tag, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, + `query ServiceListWithTag($after:String!$first:Int!$tag:TagArgs!){account{services(tag: $tag, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, `{ {{ template "first_page_variables" }}, "tag": { "key": "app", "value": "worker" } }`, `{"data": { "account": { "services": { "nodes": [ {{ template "service_1" }} ], {{ template "pagination_initial_pageInfo_response" }}, "totalCount": 1 }}}}`, ) testRequestTwo := autopilot.NewTestRequest( - `query ServiceListWithTag($after:String!$first:Int!$tag:TagArgs!){account{services(tag: $tag, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, + `query ServiceListWithTag($after:String!$first:Int!$tag:TagArgs!){account{services(tag: $tag, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, `{ {{ template "second_page_variables" }}, "tag": { "key": "app", "value": "worker" } }`, `{ "data": { "account": { "services": { "nodes": [ {{ template "service_2" }} ], {{ template "pagination_second_pageInfo_response" }}, "totalCount": 1 }}}}`, ) @@ -946,12 +946,12 @@ func TestListServicesWithTag(t *testing.T) { func TestListServicesWithTier(t *testing.T) { // Arrange testRequestOne := autopilot.NewTestRequest( - `query ServiceListWithTier($after:String!$first:Int!$tier:String!){account{services(tierAlias: $tier, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, + `query ServiceListWithTier($after:String!$first:Int!$tier:String!){account{services(tierAlias: $tier, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, `{ {{ template "first_page_variables" }}, "tier": "tier_1" }`, `{ "data": { "account": { "services": { "nodes": [ {{ template "service_1" }} ], {{ template "pagination_initial_pageInfo_response" }}, "totalCount": 1 }}}}`, ) testRequestTwo := autopilot.NewTestRequest( - `query ServiceListWithTier($after:String!$first:Int!$tier:String!){account{services(tierAlias: $tier, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, + `query ServiceListWithTier($after:String!$first:Int!$tier:String!){account{services(tierAlias: $tier, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, `{ {{ template "second_page_variables" }}, "tier": "tier_1" }`, `{ "data": { "account": { "services": { "nodes": [ {{ template "service_2" }} ], {{ template "pagination_second_pageInfo_response" }}, "totalCount": 1 }}}}`, ) @@ -971,12 +971,12 @@ func TestListServicesWithTier(t *testing.T) { func TestListServicesWithLifecycle(t *testing.T) { // Arrange testRequestOne := autopilot.NewTestRequest( - `query ServiceListWithLifecycle($after:String!$first:Int!$lifecycle:String!){account{services(lifecycleAlias: $lifecycle, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, + `query ServiceListWithLifecycle($after:String!$first:Int!$lifecycle:String!){account{services(lifecycleAlias: $lifecycle, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, `{ {{ template "first_page_variables" }}, "lifecycle": "alpha" }`, `{ "data": { "account": { "services": { "nodes": [ {{ template "service_1" }} ], {{ template "pagination_initial_pageInfo_response" }}, "totalCount": 1 }}}}`, ) testRequestTwo := autopilot.NewTestRequest( - `query ServiceListWithLifecycle($after:String!$first:Int!$lifecycle:String!){account{services(lifecycleAlias: $lifecycle, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, + `query ServiceListWithLifecycle($after:String!$first:Int!$lifecycle:String!){account{services(lifecycleAlias: $lifecycle, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, `{ {{ template "second_page_variables" }}, "lifecycle": "alpha" }`, `{ "data": { "account": { "services": { "nodes": [ {{ template "service_2" }} ], {{ template "pagination_second_pageInfo_response" }}, "totalCount": 1 }}}}`, ) @@ -996,12 +996,12 @@ func TestListServicesWithLifecycle(t *testing.T) { func TestListServicesWithProduct(t *testing.T) { // Arrange testRequestOne := autopilot.NewTestRequest( - `query ServiceListWithProduct($after:String!$first:Int!$product:String!){account{services(product: $product, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, + `query ServiceListWithProduct($after:String!$first:Int!$product:String!){account{services(product: $product, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, `{ {{ template "first_page_variables" }}, "product": "test" }`, `{ "data": { "account": { "services": { "nodes": [ {{ template "service_1" }} ], {{ template "pagination_initial_pageInfo_response" }}, "totalCount": 1 }}}}`, ) testRequestTwo := autopilot.NewTestRequest( - `query ServiceListWithProduct($after:String!$first:Int!$product:String!){account{services(product: $product, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, + `query ServiceListWithProduct($after:String!$first:Int!$product:String!){account{services(product: $product, after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}`, `{ {{ template "second_page_variables" }}, "product": "test" }`, `{ "data": { "account": { "services": { "nodes": [ {{ template "service_2" }} ], {{ template "pagination_second_pageInfo_response" }}, "totalCount": 1 }}}}`, ) @@ -1071,7 +1071,7 @@ func TestServiceReconcileAliasesDeleteAll(t *testing.T) { ) // get service testRequestThree := autopilot.NewTestRequest( - `query ServiceGet($service:ID!){account{service(id: $service){apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}`, + `query ServiceGet($service:ID!){account{service(id: $service){apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}`, `{ "service": "{{ template "id1_string" }}" }`, `{ "data": { "account": { "service": { {{ template "id1" }}, "aliases": [], "managedAliases": [] }}}}`, ) @@ -1105,7 +1105,7 @@ func TestServiceReconcileAliasesDeleteSome(t *testing.T) { `{"data": { "aliasDelete": {"errors": [] }}}`, ) testRequestTwo := autopilot.NewTestRequest( - `query ServiceGet($service:ID!){account{service(id: $service){apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}`, + `query ServiceGet($service:ID!){account{service(id: $service){apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}`, `{ "service": "{{ template "id1_string" }}" }`, `{ "data": { "account": { "service": { {{ template "id1" }}, "aliases": [ "two" ], "managedAliases": [ "two" ] }}}}`, ) @@ -1158,7 +1158,7 @@ func TestServiceReconcileAliases(t *testing.T) { ) // get service testRequestFive := autopilot.NewTestRequest( - `query ServiceGet($service:ID!){account{service(id: $service){apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}`, + `query ServiceGet($service:ID!){account{service(id: $service){apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}}`, `{ "service": "{{ template "id1_string" }}" }`, `{ "data": { "account": { "service": { {{ template "id1" }}, "aliases": ["one", "two", "three"], "managedAliases": ["one", "two", "three"] }}}}`, ) diff --git a/system.go b/system.go index aeefe8c1..5b0bc9d1 100644 --- a/system.go +++ b/system.go @@ -6,19 +6,6 @@ import ( "slices" ) -type SystemId Identifier - -type System struct { - SystemId - ManagedAliases []string `graphql:"managedAliases"` - Name string `graphql:"name"` - Description string `graphql:"description"` - HTMLUrl string `graphql:"htmlUrl"` - Owner EntityOwner `graphql:"owner"` - Parent Domain `graphql:"parent"` - Note string `graphql:"note"` -} - type SystemConnection struct { Nodes []System `json:"nodes"` PageInfo PageInfo `json:"pageInfo"` @@ -143,7 +130,7 @@ func (systemId *SystemId) AssignService(client *Client, services ...string) erro var m struct { Payload struct { System System - Errors []OpsLevelErrors + Errors []Error } `graphql:"systemChildAssign(system:$system, childServices:$childServices)"` } v := PayloadVariables{ @@ -158,7 +145,7 @@ func (client *Client) CreateSystem(input SystemInput) (*System, error) { var m struct { Payload struct { System System - Errors []OpsLevelErrors + Errors []Error } `graphql:"systemCreate(input:$input)"` } v := PayloadVariables{ @@ -210,7 +197,7 @@ func (client *Client) UpdateSystem(identifier string, input SystemInput) (*Syste var s struct { Payload struct { System System - Errors []OpsLevelErrors + Errors []Error } `graphql:"systemUpdate(system:$system,input:$input)"` } v := PayloadVariables{ @@ -224,7 +211,7 @@ func (client *Client) UpdateSystem(identifier string, input SystemInput) (*Syste func (client *Client) DeleteSystem(identifier string) error { var s struct { Payload struct { - Errors []OpsLevelErrors `graphql:"errors"` + Errors []Error `graphql:"errors"` } `graphql:"systemDelete(resource: $input)"` } v := PayloadVariables{ diff --git a/system_test.go b/system_test.go index 722cd8a8..3fba63ad 100644 --- a/system_test.go +++ b/system_test.go @@ -10,7 +10,7 @@ import ( func TestSystemCreate(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `mutation SystemCreate($input:SystemInput!){systemCreate(input:$input){system{id,aliases,managedAliases,name,description,htmlUrl,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}},note},errors{message,path}}}`, + `mutation SystemCreate($input:SystemInput!){systemCreate(input:$input){system{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}}},errors{message,path}}}`, `{"input": { "name": "PlatformSystem3", "description": "creating this for testing purposes", "ownerId": "{{ template "id4_string" }}", "note": "hello world" } }`, `{"data": { "systemCreate": { "system": {{ template "system1_response" }}, "errors": [] }}}`, ) @@ -33,12 +33,12 @@ func TestSystemCreate(t *testing.T) { func TestSystemGetServices(t *testing.T) { // Arrange testRequestOne := autopilot.NewTestRequest( - `query SystemChildServicesList($after:String!$first:Int!$system:IdentifierInput!){account{system(input: $system){childServices(after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}}`, + `query SystemChildServicesList($after:String!$first:Int!$system:IdentifierInput!){account{system(input: $system){childServices(after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}}`, `{ {{ template "first_page_variables" }}, "system": { "id": "Z2lkOi8vMTkyODM3NDY1NTY0NzM4Mjkx" }}`, `{ "data": { "account": { "system": { "childServices": { "nodes": [ {{ template "service_1" }}, {{ template "service_2" }} ], {{ template "pagination_initial_pageInfo_response" }}, "totalCount": 2 }}}}}`, ) testRequestTwo := autopilot.NewTestRequest( - `query SystemChildServicesList($after:String!$first:Int!$system:IdentifierInput!){account{system(input: $system){childServices(after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}}`, + `query SystemChildServicesList($after:String!$first:Int!$system:IdentifierInput!){account{system(input: $system){childServices(after: $after, first: $first){nodes{apiDocumentPath,description,framework,htmlUrl,id,aliases,language,lifecycle{alias,description,id,index,name},locked,managedAliases,name,note,owner{alias,id},parent{id,aliases},preferredApiDocument{id,htmlUrl,source{... on ApiDocIntegration{id,name,type},... on ServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},timestamps{createdAt,updatedAt}},preferredApiDocumentSource,product,repos{edges{node{id,defaultAlias},serviceRepositories{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}}},{{ template "pagination_request" }},totalCount},defaultServiceRepository{baseDirectory,displayName,id,repository{id,defaultAlias},service{id,aliases}},tags{nodes{id,key,value},{{ template "pagination_request" }},totalCount},tier{alias,description,id,index,name},timestamps{createdAt,updatedAt},tools{nodes{category,categoryAlias,displayName,environment,id,service{id,aliases},url},{{ template "pagination_request" }},totalCount}},{{ template "pagination_request" }},totalCount}}}}`, `{ {{ template "second_page_variables" }}, "system": { "id": "Z2lkOi8vMTkyODM3NDY1NTY0NzM4Mjkx" }}`, `{ "data": { "account": { "system": { "childServices": { "nodes": [ {{ template "service_2" }} ], {{ template "pagination_second_pageInfo_response" }}, "totalCount": 1 }}}}}`, ) @@ -94,7 +94,7 @@ func TestSystemGetTags(t *testing.T) { func TestSystemAssignService(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `mutation SystemAssignService($childServices:[IdentifierInput!]!$system:IdentifierInput!){systemChildAssign(system:$system, childServices:$childServices){system{id,aliases,managedAliases,name,description,htmlUrl,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}},note},errors{message,path}}}`, + `mutation SystemAssignService($childServices:[IdentifierInput!]!$system:IdentifierInput!){systemChildAssign(system:$system, childServices:$childServices){system{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}}},errors{message,path}}}`, `{"system": { {{ template "id3" }} }, "childServices": [ { {{ template "id4" }} } ] }`, `{"data": { "systemChildAssign": { "system": {{ template "system1_response" }} } }}`, ) @@ -129,7 +129,7 @@ func TestSystemGetId(t *testing.T) { func TestSystemGetAlias(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `query SystemGet($input:IdentifierInput!){account{system(input: $input){id,aliases,managedAliases,name,description,htmlUrl,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}},note}}}`, + `query SystemGet($input:IdentifierInput!){account{system(input: $input){id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}}}}}`, `{ "input": { "alias": "platformsystem1" } }`, `{"data": { "account": { "system": {{ template "system1_response" }} }}}`, ) @@ -144,12 +144,12 @@ func TestSystemGetAlias(t *testing.T) { func TestListSystems(t *testing.T) { // Arrange testRequestOne := autopilot.NewTestRequest( - `query SystemsList($after:String!$first:Int!){account{systems(after: $after, first: $first){nodes{id,aliases,managedAliases,name,description,htmlUrl,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}},note},{{ template "pagination_request" }}}}}`, + `query SystemsList($after:String!$first:Int!){account{systems(after: $after, first: $first){nodes{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}}},{{ template "pagination_request" }}}}}`, `{{ template "pagination_initial_query_variables" }}`, `{ "data": { "account": { "systems": { "nodes": [ {{ template "system1_response" }}, {{ template "system2_response" }} ], {{ template "pagination_initial_pageInfo_response" }} }}}}`, ) testRequestTwo := autopilot.NewTestRequest( - `query SystemsList($after:String!$first:Int!){account{systems(after: $after, first: $first){nodes{id,aliases,managedAliases,name,description,htmlUrl,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}},note},{{ template "pagination_request" }}}}}`, + `query SystemsList($after:String!$first:Int!){account{systems(after: $after, first: $first){nodes{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}}},{{ template "pagination_request" }}}}}`, `{{ template "pagination_second_query_variables" }}`, `{ "data": { "account": { "systems": { "nodes": [ {{ template "system3_response" }} ], {{ template "pagination_second_pageInfo_response" }} }}}}`, ) @@ -171,7 +171,7 @@ func TestListSystems(t *testing.T) { func TestSystemUpdate(t *testing.T) { // Arrange testRequest := autopilot.NewTestRequest( - `mutation SystemUpdate($input:SystemInput!$system:IdentifierInput!){systemUpdate(system:$system,input:$input){system{id,aliases,managedAliases,name,description,htmlUrl,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}},note},errors{message,path}}}`, + `mutation SystemUpdate($input:SystemInput!$system:IdentifierInput!){systemUpdate(system:$system,input:$input){system{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}}},errors{message,path}}}`, `{"system": { {{ template "id1" }} }, "input":{ "name": "PlatformSystem1", "description":"Yolo!", "ownerId":"{{ template "id4_string" }}", "note": "Please delete me" }}`, `{"data": {"systemUpdate": {"system": {{ template "system1_response" }}, "errors": [] }}}`, ) @@ -228,7 +228,7 @@ func TestSystemReconcileAliasesDeleteAll(t *testing.T) { `{"data": { "aliasDelete": {"errors": [] }}}`, ) testRequestThree := autopilot.NewTestRequest( - `query SystemGet($input:IdentifierInput!){account{system(input: $input){id,aliases,managedAliases,name,description,htmlUrl,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}},note}}}`, + `query SystemGet($input:IdentifierInput!){account{system(input: $input){id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}}}}}`, `{ "input": { {{ template "id1" }} } }`, `{"data": { "account": { "system": { {{ template "id1" }}, "aliases": [] }}}}`, ) @@ -260,7 +260,7 @@ func TestSystemReconcileAliasesDeleteSome(t *testing.T) { `{"data": { "aliasDelete": {"errors": [] }}}`, ) testRequestTwo := autopilot.NewTestRequest( - `query SystemGet($input:IdentifierInput!){account{system(input: $input){id,aliases,managedAliases,name,description,htmlUrl,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}},note}}}`, + `query SystemGet($input:IdentifierInput!){account{system(input: $input){id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}}}}}`, `{ "input": { {{ template "id1" }} } }`, `{"data": { "account": { "system": { {{ template "id1" }}, "aliases": ["two"] }}}}`, ) @@ -309,7 +309,7 @@ func TestSystemReconcileAliases(t *testing.T) { ) // get service testRequestFive := autopilot.NewTestRequest( - `query SystemGet($input:IdentifierInput!){account{system(input: $input){id,aliases,managedAliases,name,description,htmlUrl,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}},note}}}`, + `query SystemGet($input:IdentifierInput!){account{system(input: $input){id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}},parent{id,aliases,description,htmlUrl,managedAliases,name,note,owner{... on Team{teamAlias:alias,id}}}}}}`, `{ "input": { {{ template "id1" }} } }`, `{"data": { "account": { "system": { {{ template "id1" }}, "aliases": ["one", "two", "three"] }}}}`, ) diff --git a/tags.go b/tags.go index 9f106232..336d4d1c 100644 --- a/tags.go +++ b/tags.go @@ -7,13 +7,6 @@ import ( "slices" ) -type TagOwner string - -const ( - TagOwnerService TagOwner = "Service" - TagOwnerRepository TagOwner = "Repository" -) - type TaggableResourceInterface interface { GetTags(*Client, *PayloadVariables) (*TagConnection, error) ResourceId() ID @@ -25,12 +18,6 @@ var ( TagKeyErrorMsg = "tag key name '%s' must start with a letter and be only lowercase alphanumerics, underscores, hyphens, periods, and slashes" ) -type Tag struct { - Id ID `json:"id"` - Key string `json:"key"` - Value string `json:"value"` -} - func (t Tag) HasSameKeyValue(otherTag Tag) bool { return t.Key == otherTag.Key && t.Value == otherTag.Value } @@ -128,7 +115,7 @@ func (client *Client) AssignTag(input TagAssignInput) ([]Tag, error) { var m struct { Payload struct { Tags []Tag - Errors []OpsLevelErrors + Errors []Error } `graphql:"tagAssign(input: $input)"` } v := PayloadVariables{ @@ -168,7 +155,7 @@ func (client *Client) CreateTag(input TagCreateInput) (*Tag, error) { var m struct { Payload struct { Tag Tag `json:"tag"` - Errors []OpsLevelErrors + Errors []Error } `graphql:"tagCreate(input: $input)"` } if err := ValidateTagKey(input.Key); err != nil { @@ -185,7 +172,7 @@ func (client *Client) UpdateTag(input TagUpdateInput) (*Tag, error) { var m struct { Payload struct { Tag Tag - Errors []OpsLevelErrors + Errors []Error } `graphql:"tagUpdate(input: $input)"` } if err := ValidateTagKey(input.Key.Value); err != nil { @@ -201,7 +188,7 @@ func (client *Client) UpdateTag(input TagUpdateInput) (*Tag, error) { func (client *Client) DeleteTag(id ID) error { var m struct { Payload struct { - Errors []OpsLevelErrors + Errors []Error } `graphql:"tagDelete(input: $input)"` } v := PayloadVariables{ diff --git a/team.go b/team.go index df15f767..df9e83f0 100644 --- a/team.go +++ b/team.go @@ -7,16 +7,6 @@ import ( "slices" ) -type Contact struct { - Address string - DisplayName string - DisplayType string - ExternalId string - Id ID - IsDefault bool - Type ContactType -} - type TeamId struct { Alias string Id ID @@ -51,12 +41,6 @@ type TeamConnection struct { TotalCount int } -type TeamMembership struct { - Role string `graphql:"role"` - Team TeamId `graphql:"team"` - User UserId `graphql:"user"` -} - type TeamMembershipConnection struct { Nodes []TeamMembership PageInfo PageInfo @@ -260,7 +244,7 @@ func (client *Client) CreateTeam(input TeamCreateInput) (*Team, error) { var m struct { Payload struct { Team Team - Errors []OpsLevelErrors + Errors []Error } `graphql:"teamCreate(input: $input)"` } v := PayloadVariables{ @@ -279,7 +263,7 @@ func (client *Client) AddMemberships(team *TeamId, memberships ...TeamMembership var m struct { Payload struct { Memberships []TeamMembership `graphql:"memberships"` - Errors []OpsLevelErrors + Errors []Error } `graphql:"teamMembershipCreate(input: $input)"` } v := PayloadVariables{ @@ -296,7 +280,7 @@ func (client *Client) AddContact(team string, contact ContactInput) (*Contact, e var m struct { Payload struct { Contact Contact - Errors []OpsLevelErrors + Errors []Error } `graphql:"contactCreate(input: $input)"` } contactInput := ContactCreateInput{ @@ -434,7 +418,7 @@ func (client *Client) UpdateTeam(input TeamUpdateInput) (*Team, error) { var m struct { Payload struct { Team Team - Errors []OpsLevelErrors + Errors []Error } `graphql:"teamUpdate(input: $input)"` } v := PayloadVariables{ @@ -453,7 +437,7 @@ func (client *Client) UpdateContact(id ID, contact ContactInput) (*Contact, erro var m struct { Payload struct { Contact Contact - Errors []OpsLevelErrors + Errors []Error } `graphql:"contactUpdate(input: $input)"` } input := ContactUpdateInput{ @@ -483,9 +467,9 @@ func (client *Client) DeleteTeam(identifier string) error { var m struct { Payload struct { - Id ID `graphql:"deletedTeamId"` - Alias string `graphql:"deletedTeamAlias"` - Errors []OpsLevelErrors `graphql:"errors"` + Id ID `graphql:"deletedTeamId"` + Alias string `graphql:"deletedTeamAlias"` + Errors []Error `graphql:"errors"` } `graphql:"teamDelete(input: $input)"` } v := PayloadVariables{ @@ -499,7 +483,7 @@ func (client *Client) RemoveMemberships(team *TeamId, memberships ...TeamMembers var m struct { Payload struct { Members []User `graphql:"deletedMembers"` - Errors []OpsLevelErrors + Errors []Error } `graphql:"teamMembershipDelete(input: $input)"` } v := PayloadVariables{ @@ -516,7 +500,7 @@ func (client *Client) RemoveContact(contact ID) error { var m struct { Payload struct { Contact ID `graphql:"deletedContactId"` - Errors []OpsLevelErrors + Errors []Error } `graphql:"contactDelete(input: $input)"` } v := PayloadVariables{ diff --git a/templates/objects.tpl b/templates/objects.tpl new file mode 100644 index 00000000..7f776cfc --- /dev/null +++ b/templates/objects.tpl @@ -0,0 +1,9 @@ +{{- define "objects" }} +// {{.Name | title}} {{.Desc | clean | endSentence}} +type {{.Name}} struct { {{ range .Fields }} + {{- if eq (len .Arguments) 0 }} + {{ title .Name | getFieldNameForObject }} {{ getFieldTypeForObject . | trimPrefix "*" }} `graphql:"{{ .Name }}" json:"{{ .Name }}" + {{- if hasPrefix "JSON" .Type.String }} scalar:"true"{{ end }}` // {{ .Desc | replace "\n" " " }} + {{- end -}}{{- end }} +} +{{- end -}} diff --git a/templates/unions.tpl b/templates/unions.tpl new file mode 100644 index 00000000..9e7ab896 --- /dev/null +++ b/templates/unions.tpl @@ -0,0 +1,40 @@ +{{- define "union" }} +// {{ title .Name }} {{.Desc | clean | endSentence}} + {{- if eq "CheckOwner" .Name }} + {{ template "check_owner" }} + {{- else if eq "EntityOwner" .Name }} + {{ template "entity_owner" }} + {{- else if eq "ServiceDocumentSource" .Name }} + {{ template "service_document_source" }} + {{- else }} +type {{.Name}} struct { + {{ range .TypeNames }} + {{- if not (contains "Group" . ) }} + {{.}} {{. -}} + {{- if not (contains . (list "ApiDocIntegration" "InfrastructureResource" "ServiceRepository" | join " " )) -}}Id + {{- end }} `graphql:"... on {{.}}"` + {{- end }} + {{- end }} +} + {{- end }} +{{- end -}} + +{{- define "check_owner" -}} +type CheckOwner struct { + Team TeamId `graphql:"... on Team"` + // User UserId `graphql:"... on User"` // TODO: will this be public? +} +{{ end }} + +{{- define "entity_owner" -}} +type EntityOwner struct { + OnTeam EntityOwnerTeam `graphql:"... on Team"` +} +{{ end }} + +{{- define "service_document_source" -}} +type ServiceDocumentSource struct { + IntegrationId `graphql:"... on ApiDocIntegration"` + ServiceRepository `graphql:"... on ServiceRepository"` +} +{{ end }} diff --git a/testdata/templates/custom_actions.tpl b/testdata/templates/custom_actions.tpl index 9fd738f9..59cc7702 100644 --- a/testdata/templates/custom_actions.tpl +++ b/testdata/templates/custom_actions.tpl @@ -118,8 +118,8 @@ "updatedAt": "2022-12-15T15:01:08.832770Z" } {{ end }} -{{- define "custom_actions_request" }}{aliases,id,description,liquidTemplate,name,... on CustomActionsWebhookAction{headers,httpMethod,webhookUrl}}{{ end }} -{{- define "custom_actions_trigger_request" }}{action{aliases,id},aliases,description,filter{id,name},id,manualInputsDefinition,name,owner{alias,id},published,timestamps{createdAt,updatedAt},accessControl,responseTemplate,entityType}{{ end }} +{{- define "custom_actions_request" }}{aliases,id,description,liquidTemplate,name,... on CustomActionsWebhookAction{aliases,description,headers,httpMethod,id,liquidTemplate,name,webhookUrl}}{{ end }} +{{- define "custom_actions_trigger_request" }}{accessControl,action{aliases,id},aliases,description,entityType,filter{id,name},id,manualInputsDefinition,name,owner{alias,id},published,responseTemplate,timestamps{createdAt,updatedAt}}{{ end }} {{- define "custom_action1" }}{ "aliases": [], "description": null, diff --git a/testdata/templates/query/service/get.tpl b/testdata/templates/query/service/get.tpl index 984a47b3..327415ca 100644 --- a/testdata/templates/query/service/get.tpl +++ b/testdata/templates/query/service/get.tpl @@ -119,11 +119,11 @@ displayName, environment, id, - url, service{ id, aliases - } + }, + url }, {{ template "pagination_request" }}, totalCount diff --git a/testdata/templates/query/system/get.tpl b/testdata/templates/query/system/get.tpl index 270dfe20..df0fbb17 100644 --- a/testdata/templates/query/system/get.tpl +++ b/testdata/templates/query/system/get.tpl @@ -2,10 +2,11 @@ { id, aliases, - managedAliases, - name, description, htmlUrl, + managedAliases, + name, + note, owner{ ... on Team{ teamAlias:alias, @@ -26,7 +27,6 @@ id } } - }, - note + } } {{- end -}} \ No newline at end of file diff --git a/testdata/templates/scorecards.tpl b/testdata/templates/scorecards.tpl index 01baa31f..661cff1d 100644 --- a/testdata/templates/scorecards.tpl +++ b/testdata/templates/scorecards.tpl @@ -1,5 +1,5 @@ {{- define "scorecard_create_request" }} -mutation ScorecardCreate($input:ScorecardInput!){scorecardCreate(input: $input){scorecard{aliases,id,affectsOverallServiceLevels,description,filter{id,name,connective,htmlUrl,predicates{key,keyData,type,value,caseSensitive}},name,owner{... on Team{teamAlias:alias,id}},passingChecks,serviceCount,totalChecks},errors{message,path}}} +mutation ScorecardCreate($input:ScorecardInput!){scorecardCreate(input: $input){scorecard{id,aliases,affectsOverallServiceLevels,description,filter{id,name,connective,htmlUrl,predicates{caseSensitive,key,keyData,type,value}},href,name,owner{... on Team{teamAlias:alias,id}},passingChecks,serviceCount,servicesReport{levelCounts{level{alias,description,id,index,name},serviceCount}},slug,totalChecks},errors{message,path}}} {{ end }} {{- define "scorecard_create_request_vars" }} @@ -19,7 +19,7 @@ mutation ScorecardCreate($input:ScorecardInput!){scorecardCreate(input: $input){ }{{ end }} {{- define "scorecard_update_request" }} -mutation ScorecardUpdate($input:ScorecardInput!$scorecard:IdentifierInput!){scorecardUpdate(scorecard: $scorecard, input: $input){scorecard{aliases,id,affectsOverallServiceLevels,description,filter{id,name,connective,htmlUrl,predicates{key,keyData,type,value,caseSensitive}},name,owner{... on Team{teamAlias:alias,id}},passingChecks,serviceCount,totalChecks},errors{message,path}}} +mutation ScorecardUpdate($input:ScorecardInput!$scorecard:IdentifierInput!){scorecardUpdate(scorecard: $scorecard, input: $input){scorecard{id,aliases,affectsOverallServiceLevels,description,filter{id,name,connective,htmlUrl,predicates{caseSensitive,key,keyData,type,value}},href,name,owner{... on Team{teamAlias:alias,id}},passingChecks,serviceCount,servicesReport{levelCounts{level{alias,description,id,index,name},serviceCount}},slug,totalChecks},errors{message,path}}} {{ end }} {{- define "scorecard_update_request_vars" }} @@ -43,7 +43,7 @@ mutation ScorecardDelete($input:IdentifierInput!){scorecardDelete(input: $input) }{{ end }} {{- define "scorecard_get_request" }} -query ScorecardGet($input:IdentifierInput!){account{scorecard(input: $input){aliases,id,affectsOverallServiceLevels,description,filter{id,name,connective,htmlUrl,predicates{key,keyData,type,value,caseSensitive}},name,owner{... on Team{teamAlias:alias,id}},passingChecks,serviceCount,totalChecks}}} +query ScorecardGet($input:IdentifierInput!){account{scorecard(input: $input){id,aliases,affectsOverallServiceLevels,description,filter{id,name,connective,htmlUrl,predicates{caseSensitive,key,keyData,type,value}},href,name,owner{... on Team{teamAlias:alias,id}},passingChecks,serviceCount,servicesReport{levelCounts{level{alias,description,id,index,name},serviceCount}},slug,totalChecks}}} {{ end }} {{- define "scorecard_get_request_vars" }} @@ -54,7 +54,7 @@ query ScorecardGet($input:IdentifierInput!){account{scorecard(input: $input){ali "data":{"account":{"scorecard":{"aliases":["existing_scorecard"],"id":"Z2lkOi8vMTIzNDU2Nzg5MTAK","description":"hello there!","filter":{"connective":null,"htmlUrl":"https://app.opslevel.com/filters/123456123","id":"Z2lkOi8vMTIzNDU2MTIzCg==","name":"some filter","predicates":[]},"name":"fetched scorecard","owner":{"id":"Z2lkOi8vMTIzNDU2Nzg5Cg=="},"passingChecks":10,"serviceCount":20,"totalChecks":30}}} }{{ end }} -{{- define "scorecard_list_query" }}query ScorecardsList($after:String!$first:Int!){account{scorecards(after: $after, first: $first){nodes{aliases,id,affectsOverallServiceLevels,description,filter{id,name,connective,htmlUrl,predicates{key,keyData,type,value,caseSensitive}},name,owner{... on Team{teamAlias:alias,id}},passingChecks,serviceCount,totalChecks},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}{{ end }} +{{- define "scorecard_list_query" }}query ScorecardsList($after:String!$first:Int!){account{scorecards(after: $after, first: $first){nodes{id,aliases,affectsOverallServiceLevels,description,filter{id,name,connective,htmlUrl,predicates{caseSensitive,key,keyData,type,value}},href,name,owner{... on Team{teamAlias:alias,id}},passingChecks,serviceCount,servicesReport{levelCounts{level{alias,description,id,index,name},serviceCount}},slug,totalChecks},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}{{ end }} {{- define "scorecard_1_response" }} "id":"Z2lkOi8vMTExMTExMTEK", diff --git a/tier.go b/tier.go index 4fee46c4..d04b525a 100644 --- a/tier.go +++ b/tier.go @@ -1,13 +1,5 @@ package opslevel -type Tier struct { - Alias string - Description string - Id ID - Index int - Name string -} - func (client *Client) ListTiers() ([]Tier, error) { var q struct { Account struct { diff --git a/tools.go b/tools.go index a3380177..6f9759fc 100644 --- a/tools.go +++ b/tools.go @@ -1,15 +1,5 @@ package opslevel -type Tool struct { - Category ToolCategory - CategoryAlias string `json:",omitempty"` - DisplayName string - Environment string `json:",omitempty"` - Id ID `json:",omitempty"` - Url string - Service ServiceId -} - type ToolConnection struct { Nodes []Tool PageInfo PageInfo @@ -20,7 +10,7 @@ func (client *Client) CreateTool(input ToolCreateInput) (*Tool, error) { var m struct { Payload struct { Tool Tool - Errors []OpsLevelErrors + Errors []Error } `graphql:"toolCreate(input: $input)"` } v := PayloadVariables{ @@ -34,7 +24,7 @@ func (client *Client) UpdateTool(input ToolUpdateInput) (*Tool, error) { var m struct { Payload struct { Tool Tool - Errors []OpsLevelErrors + Errors []Error } `graphql:"toolUpdate(input: $input)"` } v := PayloadVariables{ @@ -47,7 +37,7 @@ func (client *Client) UpdateTool(input ToolUpdateInput) (*Tool, error) { func (client *Client) DeleteTool(id ID) error { var m struct { Payload struct { - Errors []OpsLevelErrors + Errors []Error } `graphql:"toolDelete(input: $input)"` } v := PayloadVariables{ diff --git a/tools_test.go b/tools_test.go index 9cdfe598..6cdee30c 100644 --- a/tools_test.go +++ b/tools_test.go @@ -11,7 +11,7 @@ func TestCreateTool(t *testing.T) { // Arrange toolCreateInput := autopilot.Register[ol.ToolCreateInput]("tool_create_input", ol.NewExampleOf[ol.ToolCreateInput]()) testRequest := autopilot.NewTestRequest( - `mutation ToolCreate($input:ToolCreateInput!){toolCreate(input: $input){tool{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},errors{message,path}}}`, + `mutation ToolCreate($input:ToolCreateInput!){toolCreate(input: $input){tool{category,categoryAlias,displayName,environment,id,service{id,aliases},url},errors{message,path}}}`, `{ "input": {{ template "tool_create_input" }}}`, `{"data": { "toolCreate": { "tool": {{ template "tool_1" }}, "errors": [] }}}`, ) @@ -30,7 +30,7 @@ func TestUpdateTool(t *testing.T) { // Arrange toolUpdateInput := autopilot.Register[ol.ToolUpdateInput]("tool_update_input", ol.NewExampleOf[ol.ToolUpdateInput]()) testRequest := autopilot.NewTestRequest( - `mutation ToolUpdate($input:ToolUpdateInput!){toolUpdate(input: $input){tool{category,categoryAlias,displayName,environment,id,url,service{id,aliases}},errors{message,path}}}`, + `mutation ToolUpdate($input:ToolUpdateInput!){toolUpdate(input: $input){tool{category,categoryAlias,displayName,environment,id,service{id,aliases},url},errors{message,path}}}`, `{ "input": {{ template "tool_update_input" }} }`, `{"data": { "toolUpdate": { "tool": {{ template "tool_1_update" }}, "errors": [] }}}`, ) diff --git a/union.go b/union.go new file mode 100644 index 00000000..ccbc7632 --- /dev/null +++ b/union.go @@ -0,0 +1,56 @@ +// Code generated by gen.go; DO NOT EDIT. + +package opslevel + +// CheckOwner represents the owner a check can belong to. +type CheckOwner struct { + Team TeamId `graphql:"... on Team"` + // User UserId `graphql:"... on User"` // TODO: will this be public? +} + +// CodeIssueProjectResource represents resource linked to the CodeIssueProject. Can be either Service or Repository. +type CodeIssueProjectResource struct { + Repository Repository `graphql:"... on Repository"` + Service Service `graphql:"... on Service"` +} + +// ContactOwner represents the owner of this contact. +type ContactOwner struct { + Team TeamId `graphql:"... on Team"` + User UserId `graphql:"... on User"` +} + +// CustomActionsAssociatedObject represents the object that an event was triggered on. +type CustomActionsAssociatedObject struct { + Service Service `graphql:"... on Service"` +} + +// EntityOwner represents the Group or Team owning the entity. +type EntityOwner struct { + OnTeam EntityOwnerTeam `graphql:"... on Team"` +} + +// RelationshipResource represents a resource that can have relationships to other resources. +type RelationshipResource struct { + Domain DomainId `graphql:"... on Domain"` + InfrastructureResource InfrastructureResource `graphql:"... on InfrastructureResource"` + Service Service `graphql:"... on Service"` + System SystemId `graphql:"... on System"` +} + +// ServiceDocumentSource represents the source of a document. +type ServiceDocumentSource struct { + IntegrationId `graphql:"... on ApiDocIntegration"` + ServiceRepository `graphql:"... on ServiceRepository"` +} + +// TagOwner represents a resource that a tag can be applied to. +type TagOwner struct { + Domain DomainId `graphql:"... on Domain"` + InfrastructureResource InfrastructureResource `graphql:"... on InfrastructureResource"` + Repository Repository `graphql:"... on Repository"` + Service Service `graphql:"... on Service"` + System SystemId `graphql:"... on System"` + Team TeamId `graphql:"... on Team"` + User UserId `graphql:"... on User"` +} diff --git a/user.go b/user.go index d8af4ab9..f3dbae2c 100644 --- a/user.go +++ b/user.go @@ -5,20 +5,6 @@ import ( "slices" ) -type UserId struct { - Id ID - Email string -} - -type User struct { - UserId - HTMLUrl string - Name string - Role UserRole - // We cannot have this here because its breaks a TON of queries - // Teams *TeamIdConnection -} - type UserConnection struct { Nodes []User PageInfo PageInfo @@ -116,7 +102,7 @@ func (client *Client) InviteUser(email string, input UserInput, sendInvite bool) var m struct { Payload struct { User User - Errors []OpsLevelErrors + Errors []Error } `graphql:"userInvite(email: $email input: $input, forceSendInvite: $forceSendInvite)"` } v := PayloadVariables{ @@ -173,7 +159,7 @@ func (client *Client) UpdateUser(user string, input UserInput) (*User, error) { var m struct { Payload struct { User User - Errors []OpsLevelErrors + Errors []Error } `graphql:"userUpdate(user: $user input: $input)"` } v := PayloadVariables{ @@ -187,7 +173,7 @@ func (client *Client) UpdateUser(user string, input UserInput) (*User, error) { func (client *Client) DeleteUser(user string) error { var m struct { Payload struct { - Errors []OpsLevelErrors + Errors []Error } `graphql:"userDelete(user: $user)"` } v := PayloadVariables{