From cf575579558409476ccff8bece94cc017469d500 Mon Sep 17 00:00:00 2001 From: Kyle Rockman Date: Wed, 14 May 2025 14:29:16 -0500 Subject: [PATCH 1/4] Add default value to documentation on fields based on schema --- .changes/unreleased/Docs-20250514-143029.yaml | 3 + input.go | 68 +++++++++---------- 2 files changed, 37 insertions(+), 34 deletions(-) create mode 100644 .changes/unreleased/Docs-20250514-143029.yaml diff --git a/.changes/unreleased/Docs-20250514-143029.yaml b/.changes/unreleased/Docs-20250514-143029.yaml new file mode 100644 index 00000000..e42f18f8 --- /dev/null +++ b/.changes/unreleased/Docs-20250514-143029.yaml @@ -0,0 +1,3 @@ +kind: Docs +body: Update docs on input types to include their default value +time: 2025-05-14T14:30:29.248975-05:00 diff --git a/input.go b/input.go index 068e0806..254e443e 100644 --- a/input.go +++ b/input.go @@ -82,10 +82,10 @@ type CategoryUpdateInput struct { // 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) + AlertSourceType *AlertSourceTypeEnum `json:"alertSourceType,omitempty" yaml:"alertSourceType,omitempty" example:"custom"` // 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) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional Default: false) 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) @@ -96,7 +96,7 @@ type CheckAlertSourceUsageCreateInput struct { // 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) + AlertSourceType *AlertSourceTypeEnum `json:"alertSourceType,omitempty" yaml:"alertSourceType,omitempty" example:"custom"` // 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) @@ -113,7 +113,7 @@ 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) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional Default: false) 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) @@ -157,7 +157,7 @@ type CheckCopyInput struct { 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) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional Default: false) 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) @@ -197,7 +197,7 @@ type CheckDeleteInput struct { 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) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional Default: false) 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) @@ -224,7 +224,7 @@ type CheckHasDocumentationCreateInput struct { 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) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional Default: false) 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) @@ -252,7 +252,7 @@ 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) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional Default: false) 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) @@ -278,7 +278,7 @@ type CheckHasRecentDeployUpdateInput struct { 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) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional Default: false) 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) @@ -307,7 +307,7 @@ type CheckManualUpdateInput struct { 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) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional Default: false) 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) @@ -343,9 +343,9 @@ type CheckPackageVersionUpdateInput struct { // 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) + 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 Default: false) 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) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional Default: false) 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) @@ -353,13 +353,13 @@ type CheckRepositoryFileCreateInput struct { Name string `json:"name" yaml:"name" example:"example_value"` // The display name of the check (Required) Notes *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) + 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 Default: false) } // 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) + 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 Default: false) 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) @@ -370,15 +370,15 @@ type CheckRepositoryFileUpdateInput struct { Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The display name of the check (Optional) Notes *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) + 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 Default: false) } // 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) + 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 Default: false) 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) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional Default: false) 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) @@ -391,7 +391,7 @@ type CheckRepositoryGrepCreateInput struct { // 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) + 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 Default: false) 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) @@ -408,7 +408,7 @@ type CheckRepositoryGrepUpdateInput struct { 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) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional Default: false) 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) @@ -433,7 +433,7 @@ type CheckRepositoryIntegratedUpdateInput struct { 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) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional Default: false) 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) @@ -462,7 +462,7 @@ type CheckRepositorySearchUpdateInput struct { 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) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional Default: false) 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) @@ -487,7 +487,7 @@ type CheckServiceConfigurationUpdateInput struct { 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) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional Default: false) 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) @@ -513,7 +513,7 @@ 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) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional Default: false) 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) @@ -546,7 +546,7 @@ 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) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional Default: false) 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) @@ -578,7 +578,7 @@ type CheckServicePropertyUpdateInput struct { 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) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional Default: false) 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) @@ -614,7 +614,7 @@ type CheckToPromoteInput struct { 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) + Enabled *Nullable[bool] `json:"enabled,omitempty" yaml:"enabled,omitempty" example:"false"` // Whether the check is enabled or not (Optional Default: false) 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) @@ -924,7 +924,7 @@ type OctopusDeployIntegrationInput struct { 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) + Type *BasicTypeEnum `json:"type,omitempty" yaml:"type,omitempty" example:"does_not_equal"` // Type of operation to be applied to value on the field (Optional Default: equals) } // PredicateInput A condition that should be satisfied @@ -941,7 +941,7 @@ type PredicateUpdateInput struct { // 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) + 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 Default: true) 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) @@ -954,7 +954,7 @@ 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) 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) + RunValidation *Nullable[bool] `json:"runValidation,omitempty" yaml:"runValidation,omitempty" example:"false"` // Validate the property value against the schema. On by default (Optional Default: true) Value JsonString `json:"value" yaml:"value" example:"JSON_TBD"` // The value of the property (Required) } @@ -998,7 +998,7 @@ type ServiceCreateInput struct { 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) + SkipAliasesValidation *Nullable[bool] `json:"skipAliasesValidation,omitempty" yaml:"skipAliasesValidation,omitempty" example:"false"` // Allows for the creation of a service with invalid aliases (Optional Default: false) 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) } @@ -1063,7 +1063,7 @@ type ServiceUpdateInput struct { 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) + SkipAliasesValidation *Nullable[bool] `json:"skipAliasesValidation,omitempty" yaml:"skipAliasesValidation,omitempty" example:"false"` // Allows updating a service with invalid aliases (Optional Default: false) 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) } @@ -1110,7 +1110,7 @@ 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) + Type *TaggableResource `json:"type,omitempty" yaml:"type,omitempty" example:"Domain"` // The type of resource `alias` refers to, if `alias` is provided (Optional Default: Service) } // TagCreateInput Specifies the input fields used to create a tag @@ -1118,7 +1118,7 @@ type TagCreateInput struct { Alias *string `json:"alias,omitempty" yaml:"alias,omitempty" example:"example_value"` // The alias of the resource that this tag will be added to (Optional) Id *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) + Type *TaggableResource `json:"type,omitempty" yaml:"type,omitempty" example:"Domain"` // The type of resource `alias` refers to, if `alias` is provided (Optional Default: Service) Value string `json:"value" yaml:"value" example:"example_value"` // The tag's value (Required) } @@ -1250,7 +1250,7 @@ type UserInput struct { 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) + Type *BasicTypeEnum `json:"type,omitempty" yaml:"type,omitempty" example:"does_not_equal"` // The operation applied to value on the field (Optional Default: equals) } // UsersInviteInput Specifies the input fields used in the `usersInvite` mutation From 32505c7796a237374c67a6e55928c036f73e47f9 Mon Sep 17 00:00:00 2001 From: Kyle Rockman Date: Wed, 14 May 2025 14:42:56 -0500 Subject: [PATCH 2/4] Add alert source APIs --- .../unreleased/Feature-20250514-144247.yaml | 3 ++ alert_source.go | 28 +++++++++++++++++++ input.go | 22 ++++++++++++++- 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Feature-20250514-144247.yaml diff --git a/.changes/unreleased/Feature-20250514-144247.yaml b/.changes/unreleased/Feature-20250514-144247.yaml new file mode 100644 index 00000000..54435772 --- /dev/null +++ b/.changes/unreleased/Feature-20250514-144247.yaml @@ -0,0 +1,3 @@ +kind: Feature +body: Add `client.CreateOrUpdateAlertSource` and `client.UpdateAlertSourceStatus` to interface with the new generic alert source APIs +time: 2025-05-14T14:42:47.635522-05:00 diff --git a/alert_source.go b/alert_source.go index c67e4b44..a857b50b 100644 --- a/alert_source.go +++ b/alert_source.go @@ -12,6 +12,20 @@ func NewAlertSource(kind AlertSourceTypeEnum, id string) *AlertSourceExternalIde return &output } +func (client *Client) CreateOrUpdateAlertSource(input AlertSourceInput) (*AlertSource, error) { + var m struct { + Payload struct { + AlertSource AlertSource + Errors []Error + } `graphql:"alertSourceUpsert(input: $input)"` + } + v := PayloadVariables{ + "input": input, + } + err := client.Mutate(&m, v, WithName("AlertSourceUpsert")) + return &m.Payload.AlertSource, HandleErrors(err, m.Payload.Errors) +} + func (client *Client) CreateAlertSourceService(input AlertSourceServiceCreateInput) (*AlertSourceService, error) { var m struct { Payload AlertSourceServiceCreatePayload `graphql:"alertSourceServiceCreate(input: $input)"` @@ -51,6 +65,20 @@ func (client *Client) GetAlertSource(id ID) (*AlertSource, error) { return &q.Account.AlertSource, HandleErrors(err, nil) } +func (client *Client) UpdateAlertSourceStatus(input AlertSourceStatusUpdateInput) (*AlertSource, error) { + var m struct { + Payload struct { + AlertSource AlertSource + Errors []Error + } `graphql:"alertSourceStatusUpdate(input: $input)"` + } + v := PayloadVariables{ + "input": input, + } + err := client.Mutate(&m, v, WithName("AlertSourceStatusUpdate")) + return &m.Payload.AlertSource, HandleErrors(err, m.Payload.Errors) +} + func (client *Client) DeleteAlertSourceService(id ID) error { var m struct { Payload BasePayload `graphql:"alertSourceServiceDelete(input: $input)"` diff --git a/input.go b/input.go index 254e443e..c50d2523 100644 --- a/input.go +++ b/input.go @@ -6,7 +6,15 @@ import "github.com/relvacode/iso8601" // 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) + Type AlertSourceTypeEnum `json:"type" yaml:"type" example:"custom"` // The type of the alert (Required) +} + +// AlertSourceInput Input fields for the mutations to manage Alert Sources +type AlertSourceInput struct { + Description *Nullable[string] `json:"description,omitempty" yaml:"description,omitempty" example:"example_value"` // The description of the alert source (Optional) + Identifier ExternalResourceIdentifierInput `json:"identifier" yaml:"identifier"` // The alert source identifier (Required) + Name *Nullable[string] `json:"name,omitempty" yaml:"name,omitempty" example:"example_value"` // The name of the alert source (Optional) + Url *Nullable[string] `json:"url,omitempty" yaml:"url,omitempty" example:"example_value"` // The url of the alert source (Optional) } // AlertSourceServiceCreateInput Specifies the input used for attaching an alert source to a service @@ -21,6 +29,12 @@ type AlertSourceServiceDeleteInput struct { Id ID `json:"id" yaml:"id" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the alert source service to be deleted (Required) } +// AlertSourceStatusUpdateInput Specifies the input fields used in the `alertSourceStatusUpdate` mutation +type AlertSourceStatusUpdateInput struct { + AlertSource ExternalResourceIdentifierInput `json:"alertSource" yaml:"alertSource"` // The alert source to be updated (Required) + Status AlertSourceStatusTypeEnum `json:"status" yaml:"status" example:"alert"` // The new status of the alert source (Required) +} + // 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) @@ -792,6 +806,12 @@ type EventIntegrationUpdateInput struct { Name string `json:"name" yaml:"name" example:"example_value"` // The name of the event integration (Required) } +// ExternalResourceIdentifierInput Specifies the input fields to locate resouce created via API in OpsLevel +type ExternalResourceIdentifierInput struct { + ExternalId string `json:"externalId" yaml:"externalId" example:"Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk"` // The id of the resource in your system (Required) + Integration IdentifierInput `json:"integration" yaml:"integration"` // The integration identifier (Required) +} + // 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) From b4b42a3a062e2a9fb1cf7a0862f29110d1718625 Mon Sep 17 00:00:00 2001 From: Kyle Rockman Date: Wed, 14 May 2025 14:51:21 -0500 Subject: [PATCH 3/4] Add support for custom actions triggering --- .changes/unreleased/Feature-20250514-145109.yaml | 3 +++ actions.go | 11 +++++++++++ input.go | 7 +++++++ 3 files changed, 21 insertions(+) create mode 100644 .changes/unreleased/Feature-20250514-145109.yaml diff --git a/.changes/unreleased/Feature-20250514-145109.yaml b/.changes/unreleased/Feature-20250514-145109.yaml new file mode 100644 index 00000000..e646f447 --- /dev/null +++ b/.changes/unreleased/Feature-20250514-145109.yaml @@ -0,0 +1,3 @@ +kind: Feature +body: Add `client.InvokeAction` to support triggering actions via the API +time: 2025-05-14T14:51:09.396768-05:00 diff --git a/actions.go b/actions.go index a2e8c9bc..ebf7badb 100644 --- a/actions.go +++ b/actions.go @@ -216,3 +216,14 @@ func (client *Client) DeleteTriggerDefinition(input string) error { err := client.Mutate(&m, v, WithName("TriggerDefinitionDelete")) return HandleErrors(err, m.Payload.Errors) } + +func (client *Client) InvokeAction(input CustomActionsTriggerInvokeInput) error { + var m struct { + Payload BasePayload `graphql:"customActionsTriggerInvoke(input: $input)"` + } + v := PayloadVariables{ + "input": input, + } + err := client.Mutate(&m, v, WithName("CustomActionsTriggerInvoke")) + return HandleErrors(err, m.Payload.Errors) +} diff --git a/input.go b/input.go index c50d2523..64c39573 100644 --- a/input.go +++ b/input.go @@ -758,6 +758,13 @@ type CustomActionsTriggerDefinitionUpdateInput struct { 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) } +// CustomActionsTriggerInvokeInput Inputs that specify the trigger definition to invoke, the user that invoked it, and what object it is invoked on +type CustomActionsTriggerInvokeInput struct { + ManualInputs JSON `json:"manualInputs,omitempty" yaml:"manualInputs,omitempty" example:"{\"name\":\"my-big-query\",\"engine\":\"BigQuery\",\"endpoint\":\"https://google.com\",\"replica\":false}"` // Additional details provided for a specific invocation of this Custom Action (Optional Default: "{}") + TargetObject *IdentifierInput `json:"targetObject,omitempty" yaml:"targetObject,omitempty"` // The identifier of the object to perform the custom action on (Optional) + TriggerDefinition IdentifierInput `json:"triggerDefinition" yaml:"triggerDefinition"` // The trigger definition to invoke (Required) +} + // CustomActionsWebhookActionCreateInput Specifies the input fields used in the `customActionsWebhookActionCreate` mutation type CustomActionsWebhookActionCreateInput struct { Async *bool `json:"async,omitempty" yaml:"async,omitempty" example:"false"` // Whether the action expects an additional, asynchronous response upon completion (Required Default: false) From b00ccce4188c602faba81bbe88c80bfbaa4725f4 Mon Sep 17 00:00:00 2001 From: Kyle Rockman Date: Wed, 14 May 2025 16:42:48 -0500 Subject: [PATCH 4/4] Deprecations --- input.go | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/input.go b/input.go index 64c39573..f3c955cf 100644 --- a/input.go +++ b/input.go @@ -697,7 +697,6 @@ type ContactCreateInput struct { 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) } @@ -1021,7 +1020,6 @@ type ServiceCreateInput struct { 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) @@ -1044,11 +1042,8 @@ type ServiceDependencyCreateInput struct { // 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) + DestinationIdentifier *IdentifierInput `json:"destinationIdentifier,omitempty" yaml:"destinationIdentifier,omitempty"` // The ID or alias identifier of the service that is depended upon (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 @@ -1086,7 +1081,6 @@ type ServiceUpdateInput struct { 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) @@ -1177,9 +1171,8 @@ type TagUpdateInput struct { // 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) + Group *IdentifierInput `json:"group,omitempty" yaml:"group,omitempty"` // The group this team belongs to (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) @@ -1205,9 +1198,8 @@ type TeamMembershipDeleteInput struct { // 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) + 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 @@ -1226,11 +1218,10 @@ type TeamPropertyDefinitionsAssignInput struct { // TeamUpdateInput Specifies the input fields used to update a team type TeamUpdateInput struct { + Members *[]TeamMembershipUserInput `json:"members,omitempty" yaml:"members,omitempty" example:"[]"` // A set of emails that identify users in OpsLevel (Optional) Alias *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 *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)