diff --git a/.release-please-manifest.json b/.release-please-manifest.json index aaf968a..5547f83 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.3" + ".": "0.1.1" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index c57d3dc..4f2abc7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 111 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-988164042da1361feb3d28364c6f14fee775ceab496b9d79d048141c0fa6da19.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-27f7bd641de1e4657ad8ce84a456fe0c5e8f1e14779bf1f567a4bc8667eba4da.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 844e944..7574da1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.1.1 (2025-02-14) + +Full Changelog: [v0.1.0-alpha.3...v0.1.1](https://github.com/gitpod-io/gitpod-sdk-go/compare/v0.1.0-alpha.3...v0.1.1) + +### Features + +* **api:** manual updates ([#28](https://github.com/gitpod-io/gitpod-sdk-go/issues/28)) ([7fd8f6c](https://github.com/gitpod-io/gitpod-sdk-go/commit/7fd8f6c7ef83ba84bbca6e5e9cf052ccf0c6cc4c)) + ## 0.1.0-alpha.3 (2025-02-13) Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/gitpod-io/gitpod-sdk-go/compare/v0.1.0-alpha.2...v0.1.0-alpha.3) diff --git a/README.md b/README.md index 4c35e17..c8899c0 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Or to pin the version: ```sh -go get -u 'github.com/gitpod-io/gitpod-sdk-go@v0.1.0-alpha.3' +go get -u 'github.com/gitpod-io/gitpod-sdk-go@v0.1.1' ``` diff --git a/account.go b/account.go index 7a5e8a2..2e2d199 100644 --- a/account.go +++ b/account.go @@ -179,9 +179,6 @@ type Account struct { CreatedAt time.Time `json:"createdAt,required" format:"date-time"` Email string `json:"email,required"` Name string `json:"name,required"` - // public_email_provider is true if the email for the Account matches a known - // public email provider - PublicEmailProvider bool `json:"publicEmailProvider,required"` // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, @@ -276,8 +273,11 @@ type Account struct { Memberships []AccountMembership `json:"memberships"` // organization_id is the ID of the organization the account is owned by if it's // created through custom SSO - OrganizationID string `json:"organizationId,nullable"` - JSON accountJSON `json:"-"` + OrganizationID string `json:"organizationId,nullable"` + // public_email_provider is true if the email for the Account matches a known + // public email provider + PublicEmailProvider bool `json:"publicEmailProvider"` + JSON accountJSON `json:"-"` } // accountJSON contains the JSON metadata for the struct [Account] @@ -286,12 +286,12 @@ type accountJSON struct { CreatedAt apijson.Field Email apijson.Field Name apijson.Field - PublicEmailProvider apijson.Field UpdatedAt apijson.Field AvatarURL apijson.Field Joinables apijson.Field Memberships apijson.Field OrganizationID apijson.Field + PublicEmailProvider apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -307,26 +307,26 @@ func (r accountJSON) RawJSON() string { type AccountMembership struct { // organization_id is the id of the organization the user is a member of OrganizationID string `json:"organizationId,required" format:"uuid"` - // organization_name is the member count of the organization the user is a member - // of - OrganizationMemberCount int64 `json:"organizationMemberCount,required"` // organization_name is the name of the organization the user is a member of OrganizationName string `json:"organizationName,required"` // user_id is the ID the user has in the organization UserID string `json:"userId,required" format:"uuid"` // user_role is the role the user has in the organization UserRole shared.OrganizationRole `json:"userRole,required"` - JSON accountMembershipJSON `json:"-"` + // organization_name is the member count of the organization the user is a member + // of + OrganizationMemberCount int64 `json:"organizationMemberCount"` + JSON accountMembershipJSON `json:"-"` } // accountMembershipJSON contains the JSON metadata for the struct // [AccountMembership] type accountMembershipJSON struct { OrganizationID apijson.Field - OrganizationMemberCount apijson.Field OrganizationName apijson.Field UserID apijson.Field UserRole apijson.Field + OrganizationMemberCount apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -342,20 +342,20 @@ func (r accountMembershipJSON) RawJSON() string { type JoinableOrganization struct { // organization_id is the id of the organization the user can join OrganizationID string `json:"organizationId,required" format:"uuid"` + // organization_name is the name of the organization the user can join + OrganizationName string `json:"organizationName,required"` // organization_member_count is the member count of the organization the user can // join - OrganizationMemberCount int64 `json:"organizationMemberCount,required"` - // organization_name is the name of the organization the user can join - OrganizationName string `json:"organizationName,required"` - JSON joinableOrganizationJSON `json:"-"` + OrganizationMemberCount int64 `json:"organizationMemberCount"` + JSON joinableOrganizationJSON `json:"-"` } // joinableOrganizationJSON contains the JSON metadata for the struct // [JoinableOrganization] type joinableOrganizationJSON struct { OrganizationID apijson.Field - OrganizationMemberCount apijson.Field OrganizationName apijson.Field + OrganizationMemberCount apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -369,18 +369,19 @@ func (r joinableOrganizationJSON) RawJSON() string { } type LoginProvider struct { - // login_url is the URL to redirect the browser agent to for login - LoginURL string `json:"loginUrl,required"` // provider is the provider used by this login method, e.g. "github", "google", // "custom" - Provider string `json:"provider,required"` + Provider string `json:"provider,required"` + // login_url is the URL to redirect the browser agent to for login, when provider + // is "custom" + LoginURL string `json:"loginUrl"` JSON loginProviderJSON `json:"-"` } // loginProviderJSON contains the JSON metadata for the struct [LoginProvider] type loginProviderJSON struct { - LoginURL apijson.Field Provider apijson.Field + LoginURL apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/editor.go b/editor.go index 0ac0064..3f43458 100644 --- a/editor.go +++ b/editor.go @@ -74,25 +74,25 @@ func (r *EditorService) ResolveURL(ctx context.Context, body EditorResolveURLPar } type Editor struct { - ID string `json:"id,required"` - Alias string `json:"alias,required"` - IconURL string `json:"iconUrl,required"` + ID string `json:"id,required" format:"uuid"` InstallationInstructions string `json:"installationInstructions,required"` Name string `json:"name,required"` - ShortDescription string `json:"shortDescription,required"` URLTemplate string `json:"urlTemplate,required"` + Alias string `json:"alias"` + IconURL string `json:"iconUrl"` + ShortDescription string `json:"shortDescription"` JSON editorJSON `json:"-"` } // editorJSON contains the JSON metadata for the struct [Editor] type editorJSON struct { ID apijson.Field - Alias apijson.Field - IconURL apijson.Field InstallationInstructions apijson.Field Name apijson.Field - ShortDescription apijson.Field URLTemplate apijson.Field + Alias apijson.Field + IconURL apijson.Field + ShortDescription apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/environment.go b/environment.go index b81ea1f..10851d6 100644 --- a/environment.go +++ b/environment.go @@ -1107,7 +1107,7 @@ func (r environmentSpecDevcontainerJSON) RawJSON() string { // machine is the machine spec of the environment type EnvironmentSpecMachine struct { // Class denotes the class of the environment we ought to start - Class string `json:"class" format:"uuid"` + Class string `json:"class"` Session string `json:"session"` JSON environmentSpecMachineJSON `json:"-"` } @@ -1388,7 +1388,7 @@ func (r EnvironmentSpecDevcontainerParam) MarshalJSON() (data []byte, err error) // machine is the machine spec of the environment type EnvironmentSpecMachineParam struct { // Class denotes the class of the environment we ought to start - Class param.Field[string] `json:"class" format:"uuid"` + Class param.Field[string] `json:"class"` Session param.Field[string] `json:"session"` } diff --git a/internal/version.go b/internal/version.go index 2d1d85e..969450e 100644 --- a/internal/version.go +++ b/internal/version.go @@ -2,4 +2,4 @@ package internal -const PackageVersion = "0.1.0-alpha.3" // x-release-please-version +const PackageVersion = "0.1.1" // x-release-please-version diff --git a/organizationdomainverification.go b/organizationdomainverification.go index aec5222..4e31234 100644 --- a/organizationdomainverification.go +++ b/organizationdomainverification.go @@ -183,7 +183,7 @@ type DomainVerification struct { // Joda Time's // [`ISODateTimeFormat.dateTime()`]() // to obtain a formatter capable of generating timestamps in this format. - VerifiedAt time.Time `json:"verifiedAt,required" format:"date-time"` + VerifiedAt time.Time `json:"verifiedAt" format:"date-time"` JSON domainVerificationJSON `json:"-"` } diff --git a/organizationssoconfiguration.go b/organizationssoconfiguration.go index 5bf4c79..156cbbd 100644 --- a/organizationssoconfiguration.go +++ b/organizationssoconfiguration.go @@ -108,9 +108,6 @@ func (r ProviderType) IsKnown() bool { type SSOConfiguration struct { // id is the unique identifier of the SSO configuration ID string `json:"id,required" format:"uuid"` - // client_id is the client ID of the OIDC application set on the IdP - ClientID string `json:"clientId,required"` - EmailDomain string `json:"emailDomain,required"` // issuer_url is the URL of the IdP issuer IssuerURL string `json:"issuerUrl,required"` OrganizationID string `json:"organizationId,required" format:"uuid"` @@ -119,21 +116,24 @@ type SSOConfiguration struct { // state is the state of the SSO configuration State SSOConfigurationState `json:"state,required"` // claims are key/value pairs that defines a mapping of claims issued by the IdP. - Claims map[string]string `json:"claims"` - JSON ssoConfigurationJSON `json:"-"` + Claims map[string]string `json:"claims"` + // client_id is the client ID of the OIDC application set on the IdP + ClientID string `json:"clientId"` + EmailDomain string `json:"emailDomain"` + JSON ssoConfigurationJSON `json:"-"` } // ssoConfigurationJSON contains the JSON metadata for the struct // [SSOConfiguration] type ssoConfigurationJSON struct { ID apijson.Field - ClientID apijson.Field - EmailDomain apijson.Field IssuerURL apijson.Field OrganizationID apijson.Field ProviderType apijson.Field State apijson.Field Claims apijson.Field + ClientID apijson.Field + EmailDomain apijson.Field raw string ExtraFields map[string]apijson.Field } diff --git a/secret.go b/secret.go index 6d64c98..49c9ea6 100644 --- a/secret.go +++ b/secret.go @@ -95,7 +95,7 @@ func (r *SecretService) UpdateValue(ctx context.Context, body SecretUpdateValueP type Secret struct { ID string `json:"id" format:"uuid"` // secret will be mounted as a registry secret - ContainerRegistryBasicAuthHost string `json:"containerRegistryBasicAuthHost"` + ContainerRegistryBasicAuthHost string `json:"containerRegistryBasicAuthHost" format:"uri"` // A Timestamp represents a point in time independent of any time zone or local // calendar, encoded as a count of seconds and fractions of seconds at nanosecond // resolution. The count is relative to an epoch at UTC midnight on January 1, @@ -359,12 +359,8 @@ type SecretUpdateValueResponse = interface{} type SecretNewParams struct { // secret will be mounted as a docker config in the environment VM, mount will have - // the docker host value must be a valid registry hostname with optional port: - // - // ``` - // this.matches('^[a-zA-Z0-9][a-zA-Z0-9.-]*[a-zA-Z0-9](:[0-9]+)?$') - // ``` - ContainerRegistryBasicAuthHost param.Field[string] `json:"containerRegistryBasicAuthHost"` + // the docker registry host + ContainerRegistryBasicAuthHost param.Field[string] `json:"containerRegistryBasicAuthHost" format:"uri"` // secret will be created as an Environment Variable with the same name as the // secret EnvironmentVariable param.Field[bool] `json:"environmentVariable"` diff --git a/secret_test.go b/secret_test.go index 302e111..14ccb17 100644 --- a/secret_test.go +++ b/secret_test.go @@ -27,7 +27,7 @@ func TestSecretNewWithOptionalParams(t *testing.T) { option.WithBearerToken("My Bearer Token"), ) _, err := client.Secrets.New(context.TODO(), gitpod.SecretNewParams{ - ContainerRegistryBasicAuthHost: gitpod.F("containerRegistryBasicAuthHost"), + ContainerRegistryBasicAuthHost: gitpod.F("https://example.com"), EnvironmentVariable: gitpod.F(true), FilePath: gitpod.F("filePath"), Name: gitpod.F("name"),