Skip to content

Commit aa745b1

Browse files
chore: add Portals mocks (#306)
* chore: add Portals mocks * Bump .speakeasy/gen.yaml based on label * Update provider based on openapi.yaml changes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 974623c commit aa745b1

15 files changed

Lines changed: 3989 additions & 15 deletions

.speakeasy/gen.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ id: b81e5def-5b1e-4753-ae7c-0efccc2e6f61
33
management:
44
docChecksum: 7eabb20a25a55fce7663949e537878c2
55
docVersion: 3.14.0
6-
speakeasyVersion: 1.761.7
7-
generationVersion: 2.881.0
8-
releaseVersion: 0.32.0
9-
configChecksum: 24636138f7819160adba9d203b259449
6+
speakeasyVersion: 1.761.8
7+
generationVersion: 2.881.2
8+
releaseVersion: 0.32.1
9+
configChecksum: 596c17cad5c2bb72bee995b896290dd7
1010
persistentEdits:
11-
generation_id: 004a389b-4a9d-4b41-a1be-63f14d63cc86
12-
pristine_commit_hash: 351f06b99ce56b806d32d0b5043ac68f9d93cb31
13-
pristine_tree_hash: 3288d12a148458f27c7b36d7815799e6f97f30b4
11+
generation_id: 2e340798-37cf-4588-afee-1ad1c1d05d24
12+
pristine_commit_hash: e6057979c1627e07c535ac9a402cfb3a38787919
13+
pristine_tree_hash: 49038a928f05483c4e1b969740ac240c17491d98
1414
features:
1515
go:
1616
acceptHeaders: 2.81.2
@@ -19513,8 +19513,8 @@ trackedFiles:
1951319513
pristine_git_object: 33b5442d54701ed450506788e43c377c86ac57ec
1951419514
sdk.go:
1951519515
id: 8db9b9536b0a
19516-
last_write_checksum: sha1:58dd3879cabe8542d1d9db649d025b0e0c50491d
19517-
pristine_git_object: 3068019a4d9bc89e0c04dd3ca77b2c0d1270b92b
19516+
last_write_checksum: sha1:9df44674762b190dd1fcfd076b76757dcdc92ce7
19517+
pristine_git_object: b733ad53c577b8885fa80b8dd0a1d3ee11865f36
1951819518
services.go:
1951919519
id: a2c8604526d8
1952019520
last_write_checksum: sha1:a04a8bd903535356af56e8a61c8956fe2602bb3b

.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ generation:
2929
generateNewTests: false
3030
skipResponseBodyAssertions: false
3131
go:
32-
version: 0.32.0
32+
version: 0.32.1
3333
additionalDependencies: {}
3434
allowUnknownFieldsInWeakUnions: false
3535
baseErrorName: SDKBaseError

.speakeasy/workflow.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
speakeasyVersion: 1.761.7
1+
speakeasyVersion: 1.761.8
22
sources:
33
konnect:
44
sourceNamespace: konnect
@@ -13,7 +13,7 @@ targets:
1313
sourceRevisionDigest: sha256:c639a509989846db09eb72fa0384d9d4cc7717a96710ef0075f7e4f85d3e5bed
1414
sourceBlobDigest: sha256:1d37bad2d56ec14c07aa336eab140bce5c3865b8072372dbd43c751527fa0e1d
1515
codeSamplesNamespace: konnect-go-code-samples
16-
codeSamplesRevisionDigest: sha256:a79f7c3b21445538e17ed550eee5fcf0012a7457399c23ee3aa1aee74c807356
16+
codeSamplesRevisionDigest: sha256:015f653f8d4abf5c78a5a5a1688bed9b9dc5e4adf883032bfac7657ba55cf731
1717
workflow:
1818
workflowVersion: 1.0.0
1919
speakeasyVersion: latest

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ TYPES_TO_MOCK := \
196196
Consumers \
197197
ControlPlaneGroups \
198198
ControlPlanes \
199+
DCRProviders \
199200
DPCertificates \
200201
EventGatewayDataPlaneCertificates \
201202
EventGateways \
@@ -206,6 +207,10 @@ TYPES_TO_MOCK := \
206207
Me \
207208
Plugins \
208209
Portals \
210+
PortalAuthSettings \
211+
PortalDevelopers \
212+
PortalEmails \
213+
PortalTeamMembership \
209214
Routes \
210215
Services \
211216
SNIs \

dcrproviders_i.go

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Code generated by ifacemaker; DO NOT EDIT.
2+
3+
package sdkkonnectgo
4+
5+
import (
6+
"context"
7+
8+
"github.com/Kong/sdk-konnect-go/models/components"
9+
"github.com/Kong/sdk-konnect-go/models/operations"
10+
)
11+
12+
// DCRProvidersSDK is a generated interface.
13+
type DCRProvidersSDK interface {
14+
// CreateDcrProvider - Create DCR provider
15+
// Creates a DCR provider.
16+
CreateDcrProvider(ctx context.Context, request components.CreateDcrProviderRequest, opts ...operations.Option) (*operations.CreateDcrProviderResponse, error)
17+
// ListDcrProviders - List DCR Providers
18+
// Returns a paginated collection of DCR providers.
19+
ListDcrProviders(ctx context.Context, request operations.ListDcrProvidersRequest, opts ...operations.Option) (*operations.ListDcrProvidersResponse, error)
20+
// GetDcrProvider - Get a DCR provider
21+
// Returns a DCR provider.
22+
GetDcrProvider(ctx context.Context, dcrProviderID string, opts ...operations.Option) (*operations.GetDcrProviderResponse, error)
23+
// UpdateDcrProvider - Update DCR provider
24+
// Updates a DCR provider.
25+
UpdateDcrProvider(ctx context.Context, dcrProviderID string, updateDcrProviderRequest components.UpdateDcrProviderRequest, opts ...operations.Option) (*operations.UpdateDcrProviderResponse, error)
26+
// DeleteDcrProvider - Delete DCR provider
27+
// Deletes a DCR provider.
28+
DeleteDcrProvider(ctx context.Context, dcrProviderID string, opts ...operations.Option) (*operations.DeleteDcrProviderResponse, error)
29+
// VerifyDcrProvider - Verify DCR provider configuration
30+
// Verifies if a DCR provider is configured properly. Returns 200 for success, 4xx for failure.
31+
VerifyDcrProvider(ctx context.Context, dcrProviderID string, opts ...operations.Option) (*operations.VerifyDcrProviderResponse, error)
32+
}

portalauthsettings_i.go

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// Code generated by ifacemaker; DO NOT EDIT.
2+
3+
package sdkkonnectgo
4+
5+
import (
6+
"context"
7+
8+
"github.com/Kong/sdk-konnect-go/models/components"
9+
"github.com/Kong/sdk-konnect-go/models/operations"
10+
)
11+
12+
// PortalAuthSettingsSDK is a generated interface.
13+
type PortalAuthSettingsSDK interface {
14+
// GetPortalAuthenticationSettings - Get Auth Settings
15+
// Returns the developer authentication configuration for a portal, which determines how developers can log in and how they are assigned to teams.
16+
GetPortalAuthenticationSettings(ctx context.Context, portalID string, opts ...operations.Option) (*operations.GetPortalAuthenticationSettingsResponse, error)
17+
// UpdatePortalAuthenticationSettings - Update Auth Settings
18+
// Updates the developer authentication configuration for a portal. Developers can be allowed to login using basic auth (email & password) or use Single-Sign-On through an Identity Provider. Developers can be automatically assigned to teams by mapping claims from their IdP account.
19+
UpdatePortalAuthenticationSettings(ctx context.Context, portalID string, portalAuthenticationSettingsUpdateRequest *components.PortalAuthenticationSettingsUpdateRequest, opts ...operations.Option) (*operations.UpdatePortalAuthenticationSettingsResponse, error)
20+
// ListPortalTeamGroupMappings - List Team Group Mappings
21+
// **Pre-release Endpoint**
22+
// This endpoint is currently in beta and is subject to change.
23+
//
24+
// Lists mappings between Konnect portal teams and Identity Provider (IdP) groups. Returns a 400 error if an IdP has not yet been configured.
25+
ListPortalTeamGroupMappings(ctx context.Context, request operations.ListPortalTeamGroupMappingsRequest, opts ...operations.Option) (*operations.ListPortalTeamGroupMappingsResponse, error)
26+
// UpdatePortalTeamGroupMappings - Update Team Group Mappings
27+
// **Pre-release Endpoint**
28+
// This endpoint is currently in beta and is subject to change.
29+
//
30+
// Allows partial updates to the mappings between Konnect portal teams and Identity Provider (IdP) groups. The request body must be keyed on team ID. For a given team ID, the given group list is a complete replacement. To remove all mappings for a given team, provide an empty group list.
31+
// Returns a 400 error if an IdP has not yet been configured, or if a team ID in the request body is not found or is not a UUID.
32+
UpdatePortalTeamGroupMappings(ctx context.Context, portalID string, portalTeamGroupMappingsUpdateRequest *components.PortalTeamGroupMappingsUpdateRequest, opts ...operations.Option) (*operations.UpdatePortalTeamGroupMappingsResponse, error)
33+
// GetPortalIdentityProviders - List Identity Providers
34+
// Retrieves the identity providers available within the portal. This operation provides information about
35+
// various identity providers for SAML or OIDC authentication integrations.
36+
GetPortalIdentityProviders(ctx context.Context, portalID string, filter *operations.GetPortalIdentityProvidersQueryParamFilter, opts ...operations.Option) (*operations.GetPortalIdentityProvidersResponse, error)
37+
// CreatePortalIdentityProvider - Create Identity Provider
38+
// Creates a new identity provider. This operation allows the creation of a new identity provider for
39+
// authentication purposes.
40+
CreatePortalIdentityProvider(ctx context.Context, portalID string, createIdentityProvider components.CreateIdentityProvider, opts ...operations.Option) (*operations.CreatePortalIdentityProviderResponse, error)
41+
// GetPortalIdentityProvider - Get Identity Provider
42+
// Retrieves the configuration of a single identity provider. This operation returns information about a
43+
// specific identity provider's settings and authentication integration details.
44+
GetPortalIdentityProvider(ctx context.Context, portalID string, id string, opts ...operations.Option) (*operations.GetPortalIdentityProviderResponse, error)
45+
// UpdatePortalIdentityProvider - Update Identity Provider
46+
// Updates the configuration of an existing identity provider. This operation allows modifications to be made
47+
// to an existing identity provider's configuration.
48+
UpdatePortalIdentityProvider(ctx context.Context, request operations.UpdatePortalIdentityProviderRequest, opts ...operations.Option) (*operations.UpdatePortalIdentityProviderResponse, error)
49+
// DeletePortalIdentityProvider - Delete Identity Provider
50+
// Deletes an existing identity provider configuration. This operation removes a specific identity provider
51+
// from the portal.
52+
DeletePortalIdentityProvider(ctx context.Context, portalID string, id string, opts ...operations.Option) (*operations.DeletePortalIdentityProviderResponse, error)
53+
}

portaldevelopers_i.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Code generated by ifacemaker; DO NOT EDIT.
2+
3+
package sdkkonnectgo
4+
5+
import (
6+
"context"
7+
8+
"github.com/Kong/sdk-konnect-go/models/operations"
9+
)
10+
11+
// PortalDevelopersSDK is a generated interface.
12+
type PortalDevelopersSDK interface {
13+
// ListPortalDevelopers - List Developers
14+
// Lists the developers that have registered for this portal. Each developer can be registered to one portal and must be approved to login unless using the developer auto-approve setting.
15+
ListPortalDevelopers(ctx context.Context, request operations.ListPortalDevelopersRequest, opts ...operations.Option) (*operations.ListPortalDevelopersResponse, error)
16+
// GetDeveloper - Get a Developer
17+
// Returns information about a single developer in this portal. Each developer manages a set applications, providing them credentials to access registered APIs. Developer registration access can be limited to specific APIs using RBAC.
18+
GetDeveloper(ctx context.Context, portalID string, developerID string, opts ...operations.Option) (*operations.GetDeveloperResponse, error)
19+
// UpdateDeveloper - Update Developer
20+
// Updates the status of a particular developer. Approved developers have access to login to the portal. Revoked, rejected, or pending are not allowed to login. Even if a developer's status is no longer approved, they will still be able to using any existing credentials generated while they were approved, until each application registration is revoked or deleted.
21+
UpdateDeveloper(ctx context.Context, request operations.UpdateDeveloperRequest, opts ...operations.Option) (*operations.UpdateDeveloperResponse, error)
22+
// DeleteDeveloper - Delete Developer
23+
// Deletes a developer, which will discontinue their ability to login, view any non-public resources, and delete all applications owned by them. All credentials issued to the developer will no longer provide access to any APIs. A deleted developer's unique email must be re-registered and approved to gain access again.
24+
DeleteDeveloper(ctx context.Context, portalID string, developerID string, opts ...operations.Option) (*operations.DeleteDeveloperResponse, error)
25+
}

portalemails_i.go

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
// Code generated by ifacemaker; DO NOT EDIT.
2+
3+
package sdkkonnectgo
4+
5+
import (
6+
"context"
7+
8+
"github.com/Kong/sdk-konnect-go/models/components"
9+
"github.com/Kong/sdk-konnect-go/models/operations"
10+
)
11+
12+
// PortalEmailsSDK is a generated interface.
13+
type PortalEmailsSDK interface {
14+
// GetEmailConfig - Get the email config for the portal
15+
// Retrieve the email config for the portal
16+
GetEmailConfig(ctx context.Context, portalID string, opts ...operations.Option) (*operations.GetEmailConfigResponse, error)
17+
// CreatePortalEmailConfig - Create the email config for a portal
18+
// Create the email config for a portal
19+
CreatePortalEmailConfig(ctx context.Context, portalID string, postPortalEmailConfig components.PostPortalEmailConfig, opts ...operations.Option) (*operations.CreatePortalEmailConfigResponse, error)
20+
// UpdatePortalEmailConfig - Setup the email config for a portal
21+
// Setup the email config for a portal
22+
UpdatePortalEmailConfig(ctx context.Context, portalID string, patchPortalEmailConfig *components.PatchPortalEmailConfig, opts ...operations.Option) (*operations.UpdatePortalEmailConfigResponse, error)
23+
// DeletePortalEmailConfig - Delete portal email config
24+
// Delete portal email config
25+
DeletePortalEmailConfig(ctx context.Context, portalID string, opts ...operations.Option) (*operations.DeletePortalEmailConfigResponse, error)
26+
// GetEmailDelivery - Get the email delivery for the portal
27+
// Retrieve the email delivery for the portal
28+
//
29+
// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
30+
GetEmailDelivery(ctx context.Context, portalID string, opts ...operations.Option) (*operations.GetEmailDeliveryResponse, error)
31+
// UpdateEmailDelivery - Setup the email delivery for a portal
32+
// Setup the email delivery for a portal
33+
//
34+
// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
35+
UpdateEmailDelivery(ctx context.Context, portalID string, emailDeliveryUpdatePayload components.EmailDeliveryUpdatePayload, opts ...operations.Option) (*operations.UpdateEmailDeliveryResponse, error)
36+
// DeleteEmailDelivery - Delete email delivery
37+
// Delete email delivery
38+
//
39+
// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
40+
DeleteEmailDelivery(ctx context.Context, portalID string, opts ...operations.Option) (*operations.DeleteEmailDeliveryResponse, error)
41+
// ListPortalCustomEmailTemplates - List custom email templates for a portal
42+
// List custom email templates
43+
ListPortalCustomEmailTemplates(ctx context.Context, portalID string, opts ...operations.Option) (*operations.ListPortalCustomEmailTemplatesResponse, error)
44+
// GetPortalCustomEmailTemplate - Get custom email template used in a portal
45+
// Get custom email template
46+
GetPortalCustomEmailTemplate(ctx context.Context, portalID string, templateName components.EmailTemplateName, opts ...operations.Option) (*operations.GetPortalCustomEmailTemplateResponse, error)
47+
// UpdatePortalCustomEmailTemplate - Update custom email template for a portal
48+
// Update custom email template
49+
UpdatePortalCustomEmailTemplate(ctx context.Context, request operations.UpdatePortalCustomEmailTemplateRequest, opts ...operations.Option) (*operations.UpdatePortalCustomEmailTemplateResponse, error)
50+
// DeletePortalCustomEmailTemplate - Delete custom email template
51+
// Delete custom email template for a portal. This will revert to using the default template
52+
DeletePortalCustomEmailTemplate(ctx context.Context, portalID string, templateName components.EmailTemplateName, opts ...operations.Option) (*operations.DeletePortalCustomEmailTemplateResponse, error)
53+
// PostPortalCustomEmailTestSend - Send Test Email
54+
// Send a test email based on the portal's email template, using the content provided in the request.
55+
// The email will be sent to the Konnect user who triggered the test.
56+
PostPortalCustomEmailTestSend(ctx context.Context, request operations.PostPortalCustomEmailTestSendRequest, opts ...operations.Option) (*operations.PostPortalCustomEmailTestSendResponse, error)
57+
// ListEmailDomains - List email domains
58+
// List email domains
59+
ListEmailDomains(ctx context.Context, request operations.ListEmailDomainsRequest, opts ...operations.Option) (*operations.ListEmailDomainsResponse, error)
60+
// CreateEmailDomain - Create an email domain
61+
// Create an email domain
62+
CreateEmailDomain(ctx context.Context, request components.EmailDomainPayload, opts ...operations.Option) (*operations.CreateEmailDomainResponse, error)
63+
// GetEmailDomain - Get an email domain
64+
// Get an email domain
65+
GetEmailDomain(ctx context.Context, emailDomain string, opts ...operations.Option) (*operations.GetEmailDomainResponse, error)
66+
// DeleteEmailDomain - Delete an email domain
67+
// Delete an email domain
68+
DeleteEmailDomain(ctx context.Context, emailDomain string, opts ...operations.Option) (*operations.DeleteEmailDomainResponse, error)
69+
// ListDefaultEmailTemplates - List default email templates
70+
// List default email templates
71+
ListDefaultEmailTemplates(ctx context.Context, opts ...operations.Option) (*operations.ListDefaultEmailTemplatesResponse, error)
72+
// GetDefaultEmailTemplate - Get default email template
73+
// Get default email template
74+
GetDefaultEmailTemplate(ctx context.Context, templateName components.EmailTemplateName, opts ...operations.Option) (*operations.GetDefaultEmailTemplateResponse, error)
75+
// ListEmailTemplateVariables - List email template variables
76+
// List email template variables
77+
ListEmailTemplateVariables(ctx context.Context, opts ...operations.Option) (*operations.ListEmailTemplateVariablesResponse, error)
78+
}

portalteammembership_i.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Code generated by ifacemaker; DO NOT EDIT.
2+
3+
package sdkkonnectgo
4+
5+
import (
6+
"context"
7+
8+
"github.com/Kong/sdk-konnect-go/models/operations"
9+
)
10+
11+
// PortalTeamMembershipSDK is a generated interface.
12+
type PortalTeamMembershipSDK interface {
13+
// ListPortalDeveloperTeams - List Developer Teams
14+
// Lists the teams to which a developer belongs. Each team a developer is a member of grants them various roles that provide permissions to perform actions on certain resources.
15+
ListPortalDeveloperTeams(ctx context.Context, request operations.ListPortalDeveloperTeamsRequest, opts ...operations.Option) (*operations.ListPortalDeveloperTeamsResponse, error)
16+
// ListPortalTeamDevelopers - List Team Developers
17+
// List a team's developers.
18+
ListPortalTeamDevelopers(ctx context.Context, request operations.ListPortalTeamDevelopersRequest, opts ...operations.Option) (*operations.ListPortalTeamDevelopersResponse, error)
19+
// AddDeveloperToPortalTeam - Add Developer to Team
20+
// Adds a developer to a team. This associates them with all of the roles that have been assigned to the team, providing specific permissions to perform actions on resources.
21+
AddDeveloperToPortalTeam(ctx context.Context, request operations.AddDeveloperToPortalTeamRequest, opts ...operations.Option) (*operations.AddDeveloperToPortalTeamResponse, error)
22+
// RemoveDeveloperFromPortalTeam - Remove Developer from Team
23+
// Removes a developer from a team. This removes the association of the team's roles from the developer.
24+
RemoveDeveloperFromPortalTeam(ctx context.Context, request operations.RemoveDeveloperFromPortalTeamRequest, opts ...operations.Option) (*operations.RemoveDeveloperFromPortalTeamResponse, error)
25+
}

sdk.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
package sdkkonnectgo
44

5-
// Generated from OpenAPI doc version 3.14.0 and generator version 2.881.0
5+
// Generated from OpenAPI doc version 3.14.0 and generator version 2.881.2
66

77
import (
88
"context"
@@ -469,9 +469,9 @@ func WithTimeout(timeout time.Duration) SDKOption {
469469
// New creates a new instance of the SDK with the provided options
470470
func New(opts ...SDKOption) *SDK {
471471
sdk := &SDK{
472-
SDKVersion: "0.32.0",
472+
SDKVersion: "0.32.1",
473473
sdkConfiguration: config.SDKConfiguration{
474-
UserAgent: "speakeasy-sdk/go 0.32.0 2.881.0 3.14.0 github.com/Kong/sdk-konnect-go",
474+
UserAgent: "speakeasy-sdk/go 0.32.1 2.881.2 3.14.0 github.com/Kong/sdk-konnect-go",
475475
ServerList: ServerList,
476476
},
477477
hooks: hooks.New(),

0 commit comments

Comments
 (0)