admin endpoints polish and lint removal (#834)

This commit is contained in:
Michael Quigley 2025-02-03 13:10:13 -05:00
parent 14d03b88f7
commit 62d8086aed
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
46 changed files with 2224 additions and 456 deletions

View File

@ -3,7 +3,6 @@ package main
import ( import (
"github.com/openziti/zrok/environment" "github.com/openziti/zrok/environment"
"github.com/openziti/zrok/rest_client_zrok/admin" "github.com/openziti/zrok/rest_client_zrok/admin"
"github.com/openziti/zrok/rest_model_zrok"
"github.com/openziti/zrok/sdk/golang/sdk" "github.com/openziti/zrok/sdk/golang/sdk"
"github.com/openziti/zrok/tui" "github.com/openziti/zrok/tui"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
@ -52,12 +51,10 @@ func (cmd *adminCreateFrontendCommand) run(_ *cobra.Command, args []string) {
permissionMode = sdk.ClosedPermissionMode permissionMode = sdk.ClosedPermissionMode
} }
req := admin.NewCreateFrontendParams() req := admin.NewCreateFrontendParams()
req.Body = &rest_model_zrok.CreateFrontendRequest{ req.Body.ZID = zId
ZID: zId, req.Body.PublicName = publicName
PublicName: publicName, req.Body.URLTemplate = urlTemplate
URLTemplate: urlTemplate, req.Body.PermissionMode = string(permissionMode)
PermissionMode: string(permissionMode),
}
resp, err := zrok.Admin.CreateFrontend(req, mustGetAdminAuth()) resp, err := zrok.Admin.CreateFrontend(req, mustGetAdminAuth())
if err != nil { if err != nil {

View File

@ -3,7 +3,6 @@ package main
import ( import (
"github.com/openziti/zrok/environment" "github.com/openziti/zrok/environment"
"github.com/openziti/zrok/rest_client_zrok/admin" "github.com/openziti/zrok/rest_client_zrok/admin"
"github.com/openziti/zrok/rest_model_zrok"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )
@ -41,7 +40,7 @@ func (cmd *adminDeleteFrontendCommand) run(_ *cobra.Command, args []string) {
} }
req := admin.NewDeleteFrontendParams() req := admin.NewDeleteFrontendParams()
req.Body = &rest_model_zrok.DeleteFrontendRequest{FrontendToken: feToken} req.Body.FrontendToken = feToken
_, err = zrok.Admin.DeleteFrontend(req, mustGetAdminAuth()) _, err = zrok.Admin.DeleteFrontend(req, mustGetAdminAuth())
if err != nil { if err != nil {

View File

@ -3,7 +3,6 @@ package main
import ( import (
"github.com/openziti/zrok/environment" "github.com/openziti/zrok/environment"
"github.com/openziti/zrok/rest_client_zrok/admin" "github.com/openziti/zrok/rest_client_zrok/admin"
"github.com/openziti/zrok/rest_model_zrok"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )
@ -49,11 +48,9 @@ func (cmd *adminUpdateFrontendCommand) run(_ *cobra.Command, args []string) {
} }
req := admin.NewUpdateFrontendParams() req := admin.NewUpdateFrontendParams()
req.Body = &rest_model_zrok.UpdateFrontendRequest{ req.Body.FrontendToken = feToken
FrontendToken: feToken, req.Body.PublicName = cmd.newPublicName
PublicName: cmd.newPublicName, req.Body.URLTemplate = cmd.newUrlTemplate
URLTemplate: cmd.newUrlTemplate,
}
_, err = zrok.Admin.UpdateFrontend(req, mustGetAdminAuth()) _, err = zrok.Admin.UpdateFrontend(req, mustGetAdminAuth())
if err != nil { if err != nil {

View File

@ -88,5 +88,5 @@ func (h *createFrontendHandler) Handle(params admin.CreateFrontendParams, princi
logrus.Infof("created global frontend '%v' with public name '%v'", fe.Token, *fe.PublicName) logrus.Infof("created global frontend '%v' with public name '%v'", fe.Token, *fe.PublicName)
return admin.NewCreateFrontendCreated().WithPayload(&rest_model_zrok.CreateFrontendResponse{Token: feToken}) return admin.NewCreateFrontendCreated().WithPayload(&admin.CreateFrontendCreatedBody{Token: feToken})
} }

View File

@ -32,9 +32,9 @@ func (h *listFrontendsHandler) Handle(params admin.ListFrontendsParams, principa
return admin.NewListFrontendsInternalServerError() return admin.NewListFrontendsInternalServerError()
} }
var frontends rest_model_zrok.PublicFrontendList var frontends []*admin.ListFrontendsOKBodyItems0
for _, sfe := range sfes { for _, sfe := range sfes {
frontend := &rest_model_zrok.PublicFrontend{ frontend := &admin.ListFrontendsOKBodyItems0{
Token: sfe.Token, Token: sfe.Token,
ZID: sfe.ZId, ZID: sfe.ZId,
CreatedAt: sfe.CreatedAt.UnixMilli(), CreatedAt: sfe.CreatedAt.UnixMilli(),

View File

@ -14,8 +14,6 @@ import (
"github.com/go-openapi/runtime" "github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client" cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt" "github.com/go-openapi/strfmt"
"github.com/openziti/zrok/rest_model_zrok"
) )
// NewCreateFrontendParams creates a new CreateFrontendParams object, // NewCreateFrontendParams creates a new CreateFrontendParams object,
@ -64,7 +62,7 @@ CreateFrontendParams contains all the parameters to send to the API endpoint
type CreateFrontendParams struct { type CreateFrontendParams struct {
// Body. // Body.
Body *rest_model_zrok.CreateFrontendRequest Body CreateFrontendBody
timeout time.Duration timeout time.Duration
Context context.Context Context context.Context
@ -120,13 +118,13 @@ func (o *CreateFrontendParams) SetHTTPClient(client *http.Client) {
} }
// WithBody adds the body to the create frontend params // WithBody adds the body to the create frontend params
func (o *CreateFrontendParams) WithBody(body *rest_model_zrok.CreateFrontendRequest) *CreateFrontendParams { func (o *CreateFrontendParams) WithBody(body CreateFrontendBody) *CreateFrontendParams {
o.SetBody(body) o.SetBody(body)
return o return o
} }
// SetBody adds the body to the create frontend params // SetBody adds the body to the create frontend params
func (o *CreateFrontendParams) SetBody(body *rest_model_zrok.CreateFrontendRequest) { func (o *CreateFrontendParams) SetBody(body CreateFrontendBody) {
o.Body = body o.Body = body
} }
@ -137,10 +135,8 @@ func (o *CreateFrontendParams) WriteToRequest(r runtime.ClientRequest, reg strfm
return err return err
} }
var res []error var res []error
if o.Body != nil { if err := r.SetBodyParam(o.Body); err != nil {
if err := r.SetBodyParam(o.Body); err != nil { return err
return err
}
} }
if len(res) > 0 { if len(res) > 0 {

View File

@ -6,13 +6,16 @@ package admin
// Editing this file might prove futile when you re-run the swagger generate command // Editing this file might prove futile when you re-run the swagger generate command
import ( import (
"context"
"encoding/json"
"fmt" "fmt"
"io" "io"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime" "github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt" "github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/openziti/zrok/rest_model_zrok" "github.com/go-openapi/validate"
) )
// CreateFrontendReader is a Reader for the CreateFrontend structure. // CreateFrontendReader is a Reader for the CreateFrontend structure.
@ -69,7 +72,7 @@ CreateFrontendCreated describes a response with status code 201, with default he
frontend created frontend created
*/ */
type CreateFrontendCreated struct { type CreateFrontendCreated struct {
Payload *rest_model_zrok.CreateFrontendResponse Payload *CreateFrontendCreatedBody
} }
// IsSuccess returns true when this create frontend created response has a 2xx status code // IsSuccess returns true when this create frontend created response has a 2xx status code
@ -110,13 +113,13 @@ func (o *CreateFrontendCreated) String() string {
return fmt.Sprintf("[POST /frontend][%d] createFrontendCreated %+v", 201, o.Payload) return fmt.Sprintf("[POST /frontend][%d] createFrontendCreated %+v", 201, o.Payload)
} }
func (o *CreateFrontendCreated) GetPayload() *rest_model_zrok.CreateFrontendResponse { func (o *CreateFrontendCreated) GetPayload() *CreateFrontendCreatedBody {
return o.Payload return o.Payload
} }
func (o *CreateFrontendCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { func (o *CreateFrontendCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(rest_model_zrok.CreateFrontendResponse) o.Payload = new(CreateFrontendCreatedBody)
// response payload // response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
@ -349,3 +352,140 @@ func (o *CreateFrontendInternalServerError) readResponse(response runtime.Client
return nil return nil
} }
/*
CreateFrontendBody create frontend body
swagger:model CreateFrontendBody
*/
type CreateFrontendBody struct {
// permission mode
// Enum: [open closed]
PermissionMode string `json:"permissionMode,omitempty"`
// public name
PublicName string `json:"public_name,omitempty"`
// url template
URLTemplate string `json:"url_template,omitempty"`
// z Id
ZID string `json:"zId,omitempty"`
}
// Validate validates this create frontend body
func (o *CreateFrontendBody) Validate(formats strfmt.Registry) error {
var res []error
if err := o.validatePermissionMode(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
var createFrontendBodyTypePermissionModePropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["open","closed"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
createFrontendBodyTypePermissionModePropEnum = append(createFrontendBodyTypePermissionModePropEnum, v)
}
}
const (
// CreateFrontendBodyPermissionModeOpen captures enum value "open"
CreateFrontendBodyPermissionModeOpen string = "open"
// CreateFrontendBodyPermissionModeClosed captures enum value "closed"
CreateFrontendBodyPermissionModeClosed string = "closed"
)
// prop value enum
func (o *CreateFrontendBody) validatePermissionModeEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, createFrontendBodyTypePermissionModePropEnum, true); err != nil {
return err
}
return nil
}
func (o *CreateFrontendBody) validatePermissionMode(formats strfmt.Registry) error {
if swag.IsZero(o.PermissionMode) { // not required
return nil
}
// value enum
if err := o.validatePermissionModeEnum("body"+"."+"permissionMode", "body", o.PermissionMode); err != nil {
return err
}
return nil
}
// ContextValidate validates this create frontend body based on context it is used
func (o *CreateFrontendBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (o *CreateFrontendBody) MarshalBinary() ([]byte, error) {
if o == nil {
return nil, nil
}
return swag.WriteJSON(o)
}
// UnmarshalBinary interface implementation
func (o *CreateFrontendBody) UnmarshalBinary(b []byte) error {
var res CreateFrontendBody
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*o = res
return nil
}
/*
CreateFrontendCreatedBody create frontend created body
swagger:model CreateFrontendCreatedBody
*/
type CreateFrontendCreatedBody struct {
// token
Token string `json:"token,omitempty"`
}
// Validate validates this create frontend created body
func (o *CreateFrontendCreatedBody) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this create frontend created body based on context it is used
func (o *CreateFrontendCreatedBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (o *CreateFrontendCreatedBody) MarshalBinary() ([]byte, error) {
if o == nil {
return nil, nil
}
return swag.WriteJSON(o)
}
// UnmarshalBinary interface implementation
func (o *CreateFrontendCreatedBody) UnmarshalBinary(b []byte) error {
var res CreateFrontendCreatedBody
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*o = res
return nil
}

View File

@ -14,8 +14,6 @@ import (
"github.com/go-openapi/runtime" "github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client" cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt" "github.com/go-openapi/strfmt"
"github.com/openziti/zrok/rest_model_zrok"
) )
// NewDeleteFrontendParams creates a new DeleteFrontendParams object, // NewDeleteFrontendParams creates a new DeleteFrontendParams object,
@ -64,7 +62,7 @@ DeleteFrontendParams contains all the parameters to send to the API endpoint
type DeleteFrontendParams struct { type DeleteFrontendParams struct {
// Body. // Body.
Body *rest_model_zrok.DeleteFrontendRequest Body DeleteFrontendBody
timeout time.Duration timeout time.Duration
Context context.Context Context context.Context
@ -120,13 +118,13 @@ func (o *DeleteFrontendParams) SetHTTPClient(client *http.Client) {
} }
// WithBody adds the body to the delete frontend params // WithBody adds the body to the delete frontend params
func (o *DeleteFrontendParams) WithBody(body *rest_model_zrok.DeleteFrontendRequest) *DeleteFrontendParams { func (o *DeleteFrontendParams) WithBody(body DeleteFrontendBody) *DeleteFrontendParams {
o.SetBody(body) o.SetBody(body)
return o return o
} }
// SetBody adds the body to the delete frontend params // SetBody adds the body to the delete frontend params
func (o *DeleteFrontendParams) SetBody(body *rest_model_zrok.DeleteFrontendRequest) { func (o *DeleteFrontendParams) SetBody(body DeleteFrontendBody) {
o.Body = body o.Body = body
} }
@ -137,10 +135,8 @@ func (o *DeleteFrontendParams) WriteToRequest(r runtime.ClientRequest, reg strfm
return err return err
} }
var res []error var res []error
if o.Body != nil { if err := r.SetBodyParam(o.Body); err != nil {
if err := r.SetBodyParam(o.Body); err != nil { return err
return err
}
} }
if len(res) > 0 { if len(res) > 0 {

View File

@ -6,10 +6,12 @@ package admin
// Editing this file might prove futile when you re-run the swagger generate command // Editing this file might prove futile when you re-run the swagger generate command
import ( import (
"context"
"fmt" "fmt"
"github.com/go-openapi/runtime" "github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt" "github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
) )
// DeleteFrontendReader is a Reader for the DeleteFrontend structure. // DeleteFrontendReader is a Reader for the DeleteFrontend structure.
@ -272,3 +274,41 @@ func (o *DeleteFrontendInternalServerError) readResponse(response runtime.Client
return nil return nil
} }
/*
DeleteFrontendBody delete frontend body
swagger:model DeleteFrontendBody
*/
type DeleteFrontendBody struct {
// frontend token
FrontendToken string `json:"frontendToken,omitempty"`
}
// Validate validates this delete frontend body
func (o *DeleteFrontendBody) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this delete frontend body based on context it is used
func (o *DeleteFrontendBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (o *DeleteFrontendBody) MarshalBinary() ([]byte, error) {
if o == nil {
return nil, nil
}
return swag.WriteJSON(o)
}
// UnmarshalBinary interface implementation
func (o *DeleteFrontendBody) UnmarshalBinary(b []byte) error {
var res DeleteFrontendBody
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*o = res
return nil
}

View File

@ -6,13 +6,13 @@ package admin
// Editing this file might prove futile when you re-run the swagger generate command // Editing this file might prove futile when you re-run the swagger generate command
import ( import (
"context"
"fmt" "fmt"
"io" "io"
"github.com/go-openapi/runtime" "github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt" "github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/openziti/zrok/rest_model_zrok"
) )
// ListFrontendsReader is a Reader for the ListFrontends structure. // ListFrontendsReader is a Reader for the ListFrontends structure.
@ -57,7 +57,7 @@ ListFrontendsOK describes a response with status code 200, with default header v
ok ok
*/ */
type ListFrontendsOK struct { type ListFrontendsOK struct {
Payload rest_model_zrok.PublicFrontendList Payload []*ListFrontendsOKBodyItems0
} }
// IsSuccess returns true when this list frontends o k response has a 2xx status code // IsSuccess returns true when this list frontends o k response has a 2xx status code
@ -98,7 +98,7 @@ func (o *ListFrontendsOK) String() string {
return fmt.Sprintf("[GET /frontends][%d] listFrontendsOK %+v", 200, o.Payload) return fmt.Sprintf("[GET /frontends][%d] listFrontendsOK %+v", 200, o.Payload)
} }
func (o *ListFrontendsOK) GetPayload() rest_model_zrok.PublicFrontendList { func (o *ListFrontendsOK) GetPayload() []*ListFrontendsOKBodyItems0 {
return o.Payload return o.Payload
} }
@ -223,3 +223,56 @@ func (o *ListFrontendsInternalServerError) readResponse(response runtime.ClientR
return nil return nil
} }
/*
ListFrontendsOKBodyItems0 list frontends o k body items0
swagger:model ListFrontendsOKBodyItems0
*/
type ListFrontendsOKBodyItems0 struct {
// created at
CreatedAt int64 `json:"createdAt,omitempty"`
// public name
PublicName string `json:"publicName,omitempty"`
// token
Token string `json:"token,omitempty"`
// updated at
UpdatedAt int64 `json:"updatedAt,omitempty"`
// url template
URLTemplate string `json:"urlTemplate,omitempty"`
// z Id
ZID string `json:"zId,omitempty"`
}
// Validate validates this list frontends o k body items0
func (o *ListFrontendsOKBodyItems0) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this list frontends o k body items0 based on context it is used
func (o *ListFrontendsOKBodyItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (o *ListFrontendsOKBodyItems0) MarshalBinary() ([]byte, error) {
if o == nil {
return nil, nil
}
return swag.WriteJSON(o)
}
// UnmarshalBinary interface implementation
func (o *ListFrontendsOKBodyItems0) UnmarshalBinary(b []byte) error {
var res ListFrontendsOKBodyItems0
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*o = res
return nil
}

View File

@ -14,8 +14,6 @@ import (
"github.com/go-openapi/runtime" "github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client" cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt" "github.com/go-openapi/strfmt"
"github.com/openziti/zrok/rest_model_zrok"
) )
// NewUpdateFrontendParams creates a new UpdateFrontendParams object, // NewUpdateFrontendParams creates a new UpdateFrontendParams object,
@ -64,7 +62,7 @@ UpdateFrontendParams contains all the parameters to send to the API endpoint
type UpdateFrontendParams struct { type UpdateFrontendParams struct {
// Body. // Body.
Body *rest_model_zrok.UpdateFrontendRequest Body UpdateFrontendBody
timeout time.Duration timeout time.Duration
Context context.Context Context context.Context
@ -120,13 +118,13 @@ func (o *UpdateFrontendParams) SetHTTPClient(client *http.Client) {
} }
// WithBody adds the body to the update frontend params // WithBody adds the body to the update frontend params
func (o *UpdateFrontendParams) WithBody(body *rest_model_zrok.UpdateFrontendRequest) *UpdateFrontendParams { func (o *UpdateFrontendParams) WithBody(body UpdateFrontendBody) *UpdateFrontendParams {
o.SetBody(body) o.SetBody(body)
return o return o
} }
// SetBody adds the body to the update frontend params // SetBody adds the body to the update frontend params
func (o *UpdateFrontendParams) SetBody(body *rest_model_zrok.UpdateFrontendRequest) { func (o *UpdateFrontendParams) SetBody(body UpdateFrontendBody) {
o.Body = body o.Body = body
} }
@ -137,10 +135,8 @@ func (o *UpdateFrontendParams) WriteToRequest(r runtime.ClientRequest, reg strfm
return err return err
} }
var res []error var res []error
if o.Body != nil { if err := r.SetBodyParam(o.Body); err != nil {
if err := r.SetBodyParam(o.Body); err != nil { return err
return err
}
} }
if len(res) > 0 { if len(res) > 0 {

View File

@ -6,10 +6,12 @@ package admin
// Editing this file might prove futile when you re-run the swagger generate command // Editing this file might prove futile when you re-run the swagger generate command
import ( import (
"context"
"fmt" "fmt"
"github.com/go-openapi/runtime" "github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt" "github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
) )
// UpdateFrontendReader is a Reader for the UpdateFrontend structure. // UpdateFrontendReader is a Reader for the UpdateFrontend structure.
@ -272,3 +274,47 @@ func (o *UpdateFrontendInternalServerError) readResponse(response runtime.Client
return nil return nil
} }
/*
UpdateFrontendBody update frontend body
swagger:model UpdateFrontendBody
*/
type UpdateFrontendBody struct {
// frontend token
FrontendToken string `json:"frontendToken,omitempty"`
// public name
PublicName string `json:"publicName,omitempty"`
// url template
URLTemplate string `json:"urlTemplate,omitempty"`
}
// Validate validates this update frontend body
func (o *UpdateFrontendBody) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this update frontend body based on context it is used
func (o *UpdateFrontendBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (o *UpdateFrontendBody) MarshalBinary() ([]byte, error) {
if o == nil {
return nil, nil
}
return swag.WriteJSON(o)
}
// UnmarshalBinary interface implementation
func (o *UpdateFrontendBody) UnmarshalBinary(b []byte) error {
var res UpdateFrontendBody
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*o = res
return nil
}

View File

@ -415,7 +415,25 @@ func init() {
"name": "body", "name": "body",
"in": "body", "in": "body",
"schema": { "schema": {
"$ref": "#/definitions/createFrontendRequest" "type": "object",
"properties": {
"permissionMode": {
"type": "string",
"enum": [
"open",
"closed"
]
},
"public_name": {
"type": "string"
},
"url_template": {
"type": "string"
},
"zId": {
"type": "string"
}
}
} }
} }
], ],
@ -423,7 +441,12 @@ func init() {
"201": { "201": {
"description": "frontend created", "description": "frontend created",
"schema": { "schema": {
"$ref": "#/definitions/createFrontendResponse" "type": "object",
"properties": {
"token": {
"type": "string"
}
}
} }
}, },
"400": { "400": {
@ -455,7 +478,12 @@ func init() {
"name": "body", "name": "body",
"in": "body", "in": "body",
"schema": { "schema": {
"$ref": "#/definitions/deleteFrontendRequest" "type": "object",
"properties": {
"frontendToken": {
"type": "string"
}
}
} }
} }
], ],
@ -489,7 +517,18 @@ func init() {
"name": "body", "name": "body",
"in": "body", "in": "body",
"schema": { "schema": {
"$ref": "#/definitions/updateFrontendRequest" "type": "object",
"properties": {
"frontendToken": {
"type": "string"
},
"publicName": {
"type": "string"
},
"urlTemplate": {
"type": "string"
}
}
} }
} }
], ],
@ -524,7 +563,30 @@ func init() {
"200": { "200": {
"description": "ok", "description": "ok",
"schema": { "schema": {
"$ref": "#/definitions/publicFrontendList" "type": "array",
"items": {
"type": "object",
"properties": {
"createdAt": {
"type": "integer"
},
"publicName": {
"type": "string"
},
"token": {
"type": "string"
},
"updatedAt": {
"type": "integer"
},
"urlTemplate": {
"type": "string"
},
"zId": {
"type": "string"
}
}
}
} }
}, },
"401": { "401": {
@ -1779,43 +1841,6 @@ func init() {
} }
} }
}, },
"createFrontendRequest": {
"type": "object",
"properties": {
"permissionMode": {
"type": "string",
"enum": [
"open",
"closed"
]
},
"public_name": {
"type": "string"
},
"url_template": {
"type": "string"
},
"zId": {
"type": "string"
}
}
},
"createFrontendResponse": {
"type": "object",
"properties": {
"token": {
"type": "string"
}
}
},
"deleteFrontendRequest": {
"type": "object",
"properties": {
"frontendToken": {
"type": "string"
}
}
},
"disableRequest": { "disableRequest": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -2026,35 +2051,6 @@ func init() {
} }
} }
}, },
"publicFrontend": {
"type": "object",
"properties": {
"createdAt": {
"type": "integer"
},
"publicName": {
"type": "string"
},
"token": {
"type": "string"
},
"updatedAt": {
"type": "integer"
},
"urlTemplate": {
"type": "string"
},
"zId": {
"type": "string"
}
}
},
"publicFrontendList": {
"type": "array",
"items": {
"$ref": "#/definitions/publicFrontend"
}
},
"share": { "share": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -2242,20 +2238,6 @@ func init() {
} }
} }
}, },
"updateFrontendRequest": {
"type": "object",
"properties": {
"frontendToken": {
"type": "string"
},
"publicName": {
"type": "string"
},
"urlTemplate": {
"type": "string"
}
}
},
"updateShareRequest": { "updateShareRequest": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -2689,7 +2671,25 @@ func init() {
"name": "body", "name": "body",
"in": "body", "in": "body",
"schema": { "schema": {
"$ref": "#/definitions/createFrontendRequest" "type": "object",
"properties": {
"permissionMode": {
"type": "string",
"enum": [
"open",
"closed"
]
},
"public_name": {
"type": "string"
},
"url_template": {
"type": "string"
},
"zId": {
"type": "string"
}
}
} }
} }
], ],
@ -2697,7 +2697,12 @@ func init() {
"201": { "201": {
"description": "frontend created", "description": "frontend created",
"schema": { "schema": {
"$ref": "#/definitions/createFrontendResponse" "type": "object",
"properties": {
"token": {
"type": "string"
}
}
} }
}, },
"400": { "400": {
@ -2729,7 +2734,12 @@ func init() {
"name": "body", "name": "body",
"in": "body", "in": "body",
"schema": { "schema": {
"$ref": "#/definitions/deleteFrontendRequest" "type": "object",
"properties": {
"frontendToken": {
"type": "string"
}
}
} }
} }
], ],
@ -2763,7 +2773,18 @@ func init() {
"name": "body", "name": "body",
"in": "body", "in": "body",
"schema": { "schema": {
"$ref": "#/definitions/updateFrontendRequest" "type": "object",
"properties": {
"frontendToken": {
"type": "string"
},
"publicName": {
"type": "string"
},
"urlTemplate": {
"type": "string"
}
}
} }
} }
], ],
@ -2798,7 +2819,10 @@ func init() {
"200": { "200": {
"description": "ok", "description": "ok",
"schema": { "schema": {
"$ref": "#/definitions/publicFrontendList" "type": "array",
"items": {
"$ref": "#/definitions/ListFrontendsOKBodyItems0"
}
} }
}, },
"401": { "401": {
@ -3966,6 +3990,29 @@ func init() {
} }
}, },
"definitions": { "definitions": {
"ListFrontendsOKBodyItems0": {
"type": "object",
"properties": {
"createdAt": {
"type": "integer"
},
"publicName": {
"type": "string"
},
"token": {
"type": "string"
},
"updatedAt": {
"type": "integer"
},
"urlTemplate": {
"type": "string"
},
"zId": {
"type": "string"
}
}
},
"MembersItems0": { "MembersItems0": {
"properties": { "properties": {
"admin": { "admin": {
@ -4055,43 +4102,6 @@ func init() {
} }
} }
}, },
"createFrontendRequest": {
"type": "object",
"properties": {
"permissionMode": {
"type": "string",
"enum": [
"open",
"closed"
]
},
"public_name": {
"type": "string"
},
"url_template": {
"type": "string"
},
"zId": {
"type": "string"
}
}
},
"createFrontendResponse": {
"type": "object",
"properties": {
"token": {
"type": "string"
}
}
},
"deleteFrontendRequest": {
"type": "object",
"properties": {
"frontendToken": {
"type": "string"
}
}
},
"disableRequest": { "disableRequest": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -4302,35 +4312,6 @@ func init() {
} }
} }
}, },
"publicFrontend": {
"type": "object",
"properties": {
"createdAt": {
"type": "integer"
},
"publicName": {
"type": "string"
},
"token": {
"type": "string"
},
"updatedAt": {
"type": "integer"
},
"urlTemplate": {
"type": "string"
},
"zId": {
"type": "string"
}
}
},
"publicFrontendList": {
"type": "array",
"items": {
"$ref": "#/definitions/publicFrontend"
}
},
"share": { "share": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -4518,20 +4499,6 @@ func init() {
} }
} }
}, },
"updateFrontendRequest": {
"type": "object",
"properties": {
"frontendToken": {
"type": "string"
},
"publicName": {
"type": "string"
},
"urlTemplate": {
"type": "string"
}
}
},
"updateShareRequest": { "updateShareRequest": {
"type": "object", "type": "object",
"properties": { "properties": {

View File

@ -6,9 +6,15 @@ package admin
// Editing this file might prove futile when you re-run the generate command // Editing this file might prove futile when you re-run the generate command
import ( import (
"context"
"encoding/json"
"net/http" "net/http"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime/middleware" "github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
"github.com/openziti/zrok/rest_model_zrok" "github.com/openziti/zrok/rest_model_zrok"
) )
@ -69,3 +75,138 @@ func (o *CreateFrontend) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
o.Context.Respond(rw, r, route.Produces, route, res) o.Context.Respond(rw, r, route.Produces, route, res)
} }
// CreateFrontendBody create frontend body
//
// swagger:model CreateFrontendBody
type CreateFrontendBody struct {
// permission mode
// Enum: [open closed]
PermissionMode string `json:"permissionMode,omitempty"`
// public name
PublicName string `json:"public_name,omitempty"`
// url template
URLTemplate string `json:"url_template,omitempty"`
// z Id
ZID string `json:"zId,omitempty"`
}
// Validate validates this create frontend body
func (o *CreateFrontendBody) Validate(formats strfmt.Registry) error {
var res []error
if err := o.validatePermissionMode(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
var createFrontendBodyTypePermissionModePropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["open","closed"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
createFrontendBodyTypePermissionModePropEnum = append(createFrontendBodyTypePermissionModePropEnum, v)
}
}
const (
// CreateFrontendBodyPermissionModeOpen captures enum value "open"
CreateFrontendBodyPermissionModeOpen string = "open"
// CreateFrontendBodyPermissionModeClosed captures enum value "closed"
CreateFrontendBodyPermissionModeClosed string = "closed"
)
// prop value enum
func (o *CreateFrontendBody) validatePermissionModeEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, createFrontendBodyTypePermissionModePropEnum, true); err != nil {
return err
}
return nil
}
func (o *CreateFrontendBody) validatePermissionMode(formats strfmt.Registry) error {
if swag.IsZero(o.PermissionMode) { // not required
return nil
}
// value enum
if err := o.validatePermissionModeEnum("body"+"."+"permissionMode", "body", o.PermissionMode); err != nil {
return err
}
return nil
}
// ContextValidate validates this create frontend body based on context it is used
func (o *CreateFrontendBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (o *CreateFrontendBody) MarshalBinary() ([]byte, error) {
if o == nil {
return nil, nil
}
return swag.WriteJSON(o)
}
// UnmarshalBinary interface implementation
func (o *CreateFrontendBody) UnmarshalBinary(b []byte) error {
var res CreateFrontendBody
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*o = res
return nil
}
// CreateFrontendCreatedBody create frontend created body
//
// swagger:model CreateFrontendCreatedBody
type CreateFrontendCreatedBody struct {
// token
Token string `json:"token,omitempty"`
}
// Validate validates this create frontend created body
func (o *CreateFrontendCreatedBody) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this create frontend created body based on context it is used
func (o *CreateFrontendCreatedBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (o *CreateFrontendCreatedBody) MarshalBinary() ([]byte, error) {
if o == nil {
return nil, nil
}
return swag.WriteJSON(o)
}
// UnmarshalBinary interface implementation
func (o *CreateFrontendCreatedBody) UnmarshalBinary(b []byte) error {
var res CreateFrontendCreatedBody
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*o = res
return nil
}

View File

@ -12,8 +12,6 @@ import (
"github.com/go-openapi/runtime" "github.com/go-openapi/runtime"
"github.com/go-openapi/runtime/middleware" "github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
"github.com/openziti/zrok/rest_model_zrok"
) )
// NewCreateFrontendParams creates a new CreateFrontendParams object // NewCreateFrontendParams creates a new CreateFrontendParams object
@ -36,7 +34,7 @@ type CreateFrontendParams struct {
/* /*
In: body In: body
*/ */
Body *rest_model_zrok.CreateFrontendRequest Body CreateFrontendBody
} }
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface // BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
@ -50,7 +48,7 @@ func (o *CreateFrontendParams) BindRequest(r *http.Request, route *middleware.Ma
if runtime.HasBody(r) { if runtime.HasBody(r) {
defer r.Body.Close() defer r.Body.Close()
var body rest_model_zrok.CreateFrontendRequest var body CreateFrontendBody
if err := route.Consumer.Consume(r.Body, &body); err != nil { if err := route.Consumer.Consume(r.Body, &body); err != nil {
res = append(res, errors.NewParseError("body", "body", "", err)) res = append(res, errors.NewParseError("body", "body", "", err))
} else { } else {
@ -65,7 +63,7 @@ func (o *CreateFrontendParams) BindRequest(r *http.Request, route *middleware.Ma
} }
if len(res) == 0 { if len(res) == 0 {
o.Body = &body o.Body = body
} }
} }
} }

View File

@ -9,8 +9,6 @@ import (
"net/http" "net/http"
"github.com/go-openapi/runtime" "github.com/go-openapi/runtime"
"github.com/openziti/zrok/rest_model_zrok"
) )
// CreateFrontendCreatedCode is the HTTP code returned for type CreateFrontendCreated // CreateFrontendCreatedCode is the HTTP code returned for type CreateFrontendCreated
@ -26,7 +24,7 @@ type CreateFrontendCreated struct {
/* /*
In: Body In: Body
*/ */
Payload *rest_model_zrok.CreateFrontendResponse `json:"body,omitempty"` Payload *CreateFrontendCreatedBody `json:"body,omitempty"`
} }
// NewCreateFrontendCreated creates CreateFrontendCreated with default headers values // NewCreateFrontendCreated creates CreateFrontendCreated with default headers values
@ -36,13 +34,13 @@ func NewCreateFrontendCreated() *CreateFrontendCreated {
} }
// WithPayload adds the payload to the create frontend created response // WithPayload adds the payload to the create frontend created response
func (o *CreateFrontendCreated) WithPayload(payload *rest_model_zrok.CreateFrontendResponse) *CreateFrontendCreated { func (o *CreateFrontendCreated) WithPayload(payload *CreateFrontendCreatedBody) *CreateFrontendCreated {
o.Payload = payload o.Payload = payload
return o return o
} }
// SetPayload sets the payload to the create frontend created response // SetPayload sets the payload to the create frontend created response
func (o *CreateFrontendCreated) SetPayload(payload *rest_model_zrok.CreateFrontendResponse) { func (o *CreateFrontendCreated) SetPayload(payload *CreateFrontendCreatedBody) {
o.Payload = payload o.Payload = payload
} }

View File

@ -6,9 +6,12 @@ package admin
// Editing this file might prove futile when you re-run the generate command // Editing this file might prove futile when you re-run the generate command
import ( import (
"context"
"net/http" "net/http"
"github.com/go-openapi/runtime/middleware" "github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/openziti/zrok/rest_model_zrok" "github.com/openziti/zrok/rest_model_zrok"
) )
@ -69,3 +72,40 @@ func (o *DeleteFrontend) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
o.Context.Respond(rw, r, route.Produces, route, res) o.Context.Respond(rw, r, route.Produces, route, res)
} }
// DeleteFrontendBody delete frontend body
//
// swagger:model DeleteFrontendBody
type DeleteFrontendBody struct {
// frontend token
FrontendToken string `json:"frontendToken,omitempty"`
}
// Validate validates this delete frontend body
func (o *DeleteFrontendBody) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this delete frontend body based on context it is used
func (o *DeleteFrontendBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (o *DeleteFrontendBody) MarshalBinary() ([]byte, error) {
if o == nil {
return nil, nil
}
return swag.WriteJSON(o)
}
// UnmarshalBinary interface implementation
func (o *DeleteFrontendBody) UnmarshalBinary(b []byte) error {
var res DeleteFrontendBody
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*o = res
return nil
}

View File

@ -12,8 +12,6 @@ import (
"github.com/go-openapi/runtime" "github.com/go-openapi/runtime"
"github.com/go-openapi/runtime/middleware" "github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
"github.com/openziti/zrok/rest_model_zrok"
) )
// NewDeleteFrontendParams creates a new DeleteFrontendParams object // NewDeleteFrontendParams creates a new DeleteFrontendParams object
@ -36,7 +34,7 @@ type DeleteFrontendParams struct {
/* /*
In: body In: body
*/ */
Body *rest_model_zrok.DeleteFrontendRequest Body DeleteFrontendBody
} }
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface // BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
@ -50,7 +48,7 @@ func (o *DeleteFrontendParams) BindRequest(r *http.Request, route *middleware.Ma
if runtime.HasBody(r) { if runtime.HasBody(r) {
defer r.Body.Close() defer r.Body.Close()
var body rest_model_zrok.DeleteFrontendRequest var body DeleteFrontendBody
if err := route.Consumer.Consume(r.Body, &body); err != nil { if err := route.Consumer.Consume(r.Body, &body); err != nil {
res = append(res, errors.NewParseError("body", "body", "", err)) res = append(res, errors.NewParseError("body", "body", "", err))
} else { } else {
@ -65,7 +63,7 @@ func (o *DeleteFrontendParams) BindRequest(r *http.Request, route *middleware.Ma
} }
if len(res) == 0 { if len(res) == 0 {
o.Body = &body o.Body = body
} }
} }
} }

View File

@ -6,9 +6,12 @@ package admin
// Editing this file might prove futile when you re-run the generate command // Editing this file might prove futile when you re-run the generate command
import ( import (
"context"
"net/http" "net/http"
"github.com/go-openapi/runtime/middleware" "github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/openziti/zrok/rest_model_zrok" "github.com/openziti/zrok/rest_model_zrok"
) )
@ -69,3 +72,55 @@ func (o *ListFrontends) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
o.Context.Respond(rw, r, route.Produces, route, res) o.Context.Respond(rw, r, route.Produces, route, res)
} }
// ListFrontendsOKBodyItems0 list frontends o k body items0
//
// swagger:model ListFrontendsOKBodyItems0
type ListFrontendsOKBodyItems0 struct {
// created at
CreatedAt int64 `json:"createdAt,omitempty"`
// public name
PublicName string `json:"publicName,omitempty"`
// token
Token string `json:"token,omitempty"`
// updated at
UpdatedAt int64 `json:"updatedAt,omitempty"`
// url template
URLTemplate string `json:"urlTemplate,omitempty"`
// z Id
ZID string `json:"zId,omitempty"`
}
// Validate validates this list frontends o k body items0
func (o *ListFrontendsOKBodyItems0) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this list frontends o k body items0 based on context it is used
func (o *ListFrontendsOKBodyItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (o *ListFrontendsOKBodyItems0) MarshalBinary() ([]byte, error) {
if o == nil {
return nil, nil
}
return swag.WriteJSON(o)
}
// UnmarshalBinary interface implementation
func (o *ListFrontendsOKBodyItems0) UnmarshalBinary(b []byte) error {
var res ListFrontendsOKBodyItems0
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*o = res
return nil
}

View File

@ -9,8 +9,6 @@ import (
"net/http" "net/http"
"github.com/go-openapi/runtime" "github.com/go-openapi/runtime"
"github.com/openziti/zrok/rest_model_zrok"
) )
// ListFrontendsOKCode is the HTTP code returned for type ListFrontendsOK // ListFrontendsOKCode is the HTTP code returned for type ListFrontendsOK
@ -26,7 +24,7 @@ type ListFrontendsOK struct {
/* /*
In: Body In: Body
*/ */
Payload rest_model_zrok.PublicFrontendList `json:"body,omitempty"` Payload []*ListFrontendsOKBodyItems0 `json:"body,omitempty"`
} }
// NewListFrontendsOK creates ListFrontendsOK with default headers values // NewListFrontendsOK creates ListFrontendsOK with default headers values
@ -36,13 +34,13 @@ func NewListFrontendsOK() *ListFrontendsOK {
} }
// WithPayload adds the payload to the list frontends o k response // WithPayload adds the payload to the list frontends o k response
func (o *ListFrontendsOK) WithPayload(payload rest_model_zrok.PublicFrontendList) *ListFrontendsOK { func (o *ListFrontendsOK) WithPayload(payload []*ListFrontendsOKBodyItems0) *ListFrontendsOK {
o.Payload = payload o.Payload = payload
return o return o
} }
// SetPayload sets the payload to the list frontends o k response // SetPayload sets the payload to the list frontends o k response
func (o *ListFrontendsOK) SetPayload(payload rest_model_zrok.PublicFrontendList) { func (o *ListFrontendsOK) SetPayload(payload []*ListFrontendsOKBodyItems0) {
o.Payload = payload o.Payload = payload
} }
@ -53,7 +51,7 @@ func (o *ListFrontendsOK) WriteResponse(rw http.ResponseWriter, producer runtime
payload := o.Payload payload := o.Payload
if payload == nil { if payload == nil {
// return empty array // return empty array
payload = rest_model_zrok.PublicFrontendList{} payload = make([]*ListFrontendsOKBodyItems0, 0, 50)
} }
if err := producer.Produce(rw, payload); err != nil { if err := producer.Produce(rw, payload); err != nil {

View File

@ -6,9 +6,12 @@ package admin
// Editing this file might prove futile when you re-run the generate command // Editing this file might prove futile when you re-run the generate command
import ( import (
"context"
"net/http" "net/http"
"github.com/go-openapi/runtime/middleware" "github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/openziti/zrok/rest_model_zrok" "github.com/openziti/zrok/rest_model_zrok"
) )
@ -69,3 +72,46 @@ func (o *UpdateFrontend) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
o.Context.Respond(rw, r, route.Produces, route, res) o.Context.Respond(rw, r, route.Produces, route, res)
} }
// UpdateFrontendBody update frontend body
//
// swagger:model UpdateFrontendBody
type UpdateFrontendBody struct {
// frontend token
FrontendToken string `json:"frontendToken,omitempty"`
// public name
PublicName string `json:"publicName,omitempty"`
// url template
URLTemplate string `json:"urlTemplate,omitempty"`
}
// Validate validates this update frontend body
func (o *UpdateFrontendBody) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this update frontend body based on context it is used
func (o *UpdateFrontendBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (o *UpdateFrontendBody) MarshalBinary() ([]byte, error) {
if o == nil {
return nil, nil
}
return swag.WriteJSON(o)
}
// UnmarshalBinary interface implementation
func (o *UpdateFrontendBody) UnmarshalBinary(b []byte) error {
var res UpdateFrontendBody
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*o = res
return nil
}

View File

@ -12,8 +12,6 @@ import (
"github.com/go-openapi/runtime" "github.com/go-openapi/runtime"
"github.com/go-openapi/runtime/middleware" "github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/validate" "github.com/go-openapi/validate"
"github.com/openziti/zrok/rest_model_zrok"
) )
// NewUpdateFrontendParams creates a new UpdateFrontendParams object // NewUpdateFrontendParams creates a new UpdateFrontendParams object
@ -36,7 +34,7 @@ type UpdateFrontendParams struct {
/* /*
In: body In: body
*/ */
Body *rest_model_zrok.UpdateFrontendRequest Body UpdateFrontendBody
} }
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface // BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
@ -50,7 +48,7 @@ func (o *UpdateFrontendParams) BindRequest(r *http.Request, route *middleware.Ma
if runtime.HasBody(r) { if runtime.HasBody(r) {
defer r.Body.Close() defer r.Body.Close()
var body rest_model_zrok.UpdateFrontendRequest var body UpdateFrontendBody
if err := route.Consumer.Consume(r.Body, &body); err != nil { if err := route.Consumer.Consume(r.Body, &body); err != nil {
res = append(res, errors.NewParseError("body", "body", "", err)) res = append(res, errors.NewParseError("body", "body", "", err))
} else { } else {
@ -65,7 +63,7 @@ func (o *UpdateFrontendParams) BindRequest(r *http.Request, route *middleware.Ma
} }
if len(res) == 0 { if len(res) == 0 {
o.Body = &body o.Body = body
} }
} }
} }

View File

@ -13,7 +13,6 @@ model/authUser.ts
model/changePasswordRequest.ts model/changePasswordRequest.ts
model/configuration.ts model/configuration.ts
model/createFrontendRequest.ts model/createFrontendRequest.ts
model/createFrontendResponse.ts
model/createIdentity201Response.ts model/createIdentity201Response.ts
model/createIdentityRequest.ts model/createIdentityRequest.ts
model/createOrganizationRequest.ts model/createOrganizationRequest.ts
@ -28,6 +27,7 @@ model/getSparklines200Response.ts
model/getSparklinesRequest.ts model/getSparklinesRequest.ts
model/inviteRequest.ts model/inviteRequest.ts
model/inviteTokenGenerateRequest.ts model/inviteTokenGenerateRequest.ts
model/listFrontends200ResponseInner.ts
model/listMemberships200Response.ts model/listMemberships200Response.ts
model/listMemberships200ResponseMembershipsInner.ts model/listMemberships200ResponseMembershipsInner.ts
model/listOrganizationMembers200Response.ts model/listOrganizationMembers200Response.ts
@ -41,7 +41,6 @@ model/models.ts
model/overview.ts model/overview.ts
model/passwordRequirements.ts model/passwordRequirements.ts
model/principal.ts model/principal.ts
model/publicFrontend.ts
model/regenerateToken200Response.ts model/regenerateToken200Response.ts
model/regenerateTokenRequest.ts model/regenerateTokenRequest.ts
model/registerRequest.ts model/registerRequest.ts

View File

@ -17,16 +17,15 @@ import http from 'http';
/* tslint:disable:no-unused-locals */ /* tslint:disable:no-unused-locals */
import { AddOrganizationMemberRequest } from '../model/addOrganizationMemberRequest'; import { AddOrganizationMemberRequest } from '../model/addOrganizationMemberRequest';
import { CreateFrontendRequest } from '../model/createFrontendRequest'; import { CreateFrontendRequest } from '../model/createFrontendRequest';
import { CreateFrontendResponse } from '../model/createFrontendResponse';
import { CreateIdentity201Response } from '../model/createIdentity201Response'; import { CreateIdentity201Response } from '../model/createIdentity201Response';
import { CreateIdentityRequest } from '../model/createIdentityRequest'; import { CreateIdentityRequest } from '../model/createIdentityRequest';
import { CreateOrganizationRequest } from '../model/createOrganizationRequest'; import { CreateOrganizationRequest } from '../model/createOrganizationRequest';
import { DeleteFrontendRequest } from '../model/deleteFrontendRequest'; import { DeleteFrontendRequest } from '../model/deleteFrontendRequest';
import { InviteTokenGenerateRequest } from '../model/inviteTokenGenerateRequest'; import { InviteTokenGenerateRequest } from '../model/inviteTokenGenerateRequest';
import { ListFrontends200ResponseInner } from '../model/listFrontends200ResponseInner';
import { ListOrganizationMembers200Response } from '../model/listOrganizationMembers200Response'; import { ListOrganizationMembers200Response } from '../model/listOrganizationMembers200Response';
import { ListOrganizations200Response } from '../model/listOrganizations200Response'; import { ListOrganizations200Response } from '../model/listOrganizations200Response';
import { LoginRequest } from '../model/loginRequest'; import { LoginRequest } from '../model/loginRequest';
import { PublicFrontend } from '../model/publicFrontend';
import { RegenerateToken200Response } from '../model/regenerateToken200Response'; import { RegenerateToken200Response } from '../model/regenerateToken200Response';
import { RemoveOrganizationMemberRequest } from '../model/removeOrganizationMemberRequest'; import { RemoveOrganizationMemberRequest } from '../model/removeOrganizationMemberRequest';
import { UpdateFrontendRequest } from '../model/updateFrontendRequest'; import { UpdateFrontendRequest } from '../model/updateFrontendRequest';
@ -232,7 +231,7 @@ export class AdminApi {
* *
* @param body * @param body
*/ */
public async createFrontend (body?: CreateFrontendRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateFrontendResponse; }> { public async createFrontend (body?: CreateFrontendRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: RegenerateToken200Response; }> {
const localVarPath = this.basePath + '/frontend'; const localVarPath = this.basePath + '/frontend';
let localVarQueryParameters: any = {}; let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders); let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
@ -278,13 +277,13 @@ export class AdminApi {
localVarRequestOptions.form = localVarFormParams; localVarRequestOptions.form = localVarFormParams;
} }
} }
return new Promise<{ response: http.IncomingMessage; body: CreateFrontendResponse; }>((resolve, reject) => { return new Promise<{ response: http.IncomingMessage; body: RegenerateToken200Response; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => { localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) { if (error) {
reject(error); reject(error);
} else { } else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = ObjectSerializer.deserialize(body, "CreateFrontendResponse"); body = ObjectSerializer.deserialize(body, "RegenerateToken200Response");
resolve({ response: response, body: body }); resolve({ response: response, body: body });
} else { } else {
reject(new HttpError(response, body, response.statusCode)); reject(new HttpError(response, body, response.statusCode));
@ -661,7 +660,7 @@ export class AdminApi {
/** /**
* *
*/ */
public async listFrontends (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<PublicFrontend>; }> { public async listFrontends (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<ListFrontends200ResponseInner>; }> {
const localVarPath = this.basePath + '/frontends'; const localVarPath = this.basePath + '/frontends';
let localVarQueryParameters: any = {}; let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders); let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
@ -706,13 +705,13 @@ export class AdminApi {
localVarRequestOptions.form = localVarFormParams; localVarRequestOptions.form = localVarFormParams;
} }
} }
return new Promise<{ response: http.IncomingMessage; body: Array<PublicFrontend>; }>((resolve, reject) => { return new Promise<{ response: http.IncomingMessage; body: Array<ListFrontends200ResponseInner>; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => { localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) { if (error) {
reject(error); reject(error);
} else { } else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = ObjectSerializer.deserialize(body, "Array<PublicFrontend>"); body = ObjectSerializer.deserialize(body, "Array<ListFrontends200ResponseInner>");
resolve({ response: response, body: body }); resolve({ response: response, body: body });
} else { } else {
reject(new HttpError(response, body, response.statusCode)); reject(new HttpError(response, body, response.statusCode));

View File

@ -0,0 +1,61 @@
/**
* zrok
* zrok client access
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { RequestFile } from './models';
export class ListFrontends200ResponseInner {
'token'?: string;
'zId'?: string;
'urlTemplate'?: string;
'publicName'?: string;
'createdAt'?: number;
'updatedAt'?: number;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "token",
"baseName": "token",
"type": "string"
},
{
"name": "zId",
"baseName": "zId",
"type": "string"
},
{
"name": "urlTemplate",
"baseName": "urlTemplate",
"type": "string"
},
{
"name": "publicName",
"baseName": "publicName",
"type": "string"
},
{
"name": "createdAt",
"baseName": "createdAt",
"type": "number"
},
{
"name": "updatedAt",
"baseName": "updatedAt",
"type": "number"
} ];
static getAttributeTypeMap() {
return ListFrontends200ResponseInner.attributeTypeMap;
}
}

View File

@ -7,7 +7,6 @@ export * from './authUser';
export * from './changePasswordRequest'; export * from './changePasswordRequest';
export * from './configuration'; export * from './configuration';
export * from './createFrontendRequest'; export * from './createFrontendRequest';
export * from './createFrontendResponse';
export * from './createIdentity201Response'; export * from './createIdentity201Response';
export * from './createIdentityRequest'; export * from './createIdentityRequest';
export * from './createOrganizationRequest'; export * from './createOrganizationRequest';
@ -22,6 +21,7 @@ export * from './getSparklines200Response';
export * from './getSparklinesRequest'; export * from './getSparklinesRequest';
export * from './inviteRequest'; export * from './inviteRequest';
export * from './inviteTokenGenerateRequest'; export * from './inviteTokenGenerateRequest';
export * from './listFrontends200ResponseInner';
export * from './listMemberships200Response'; export * from './listMemberships200Response';
export * from './listMemberships200ResponseMembershipsInner'; export * from './listMemberships200ResponseMembershipsInner';
export * from './listOrganizationMembers200Response'; export * from './listOrganizationMembers200Response';
@ -34,7 +34,6 @@ export * from './metricsSample';
export * from './overview'; export * from './overview';
export * from './passwordRequirements'; export * from './passwordRequirements';
export * from './principal'; export * from './principal';
export * from './publicFrontend';
export * from './regenerateToken200Response'; export * from './regenerateToken200Response';
export * from './regenerateTokenRequest'; export * from './regenerateTokenRequest';
export * from './registerRequest'; export * from './registerRequest';
@ -69,7 +68,6 @@ import { AuthUser } from './authUser';
import { ChangePasswordRequest } from './changePasswordRequest'; import { ChangePasswordRequest } from './changePasswordRequest';
import { Configuration } from './configuration'; import { Configuration } from './configuration';
import { CreateFrontendRequest } from './createFrontendRequest'; import { CreateFrontendRequest } from './createFrontendRequest';
import { CreateFrontendResponse } from './createFrontendResponse';
import { CreateIdentity201Response } from './createIdentity201Response'; import { CreateIdentity201Response } from './createIdentity201Response';
import { CreateIdentityRequest } from './createIdentityRequest'; import { CreateIdentityRequest } from './createIdentityRequest';
import { CreateOrganizationRequest } from './createOrganizationRequest'; import { CreateOrganizationRequest } from './createOrganizationRequest';
@ -84,6 +82,7 @@ import { GetSparklines200Response } from './getSparklines200Response';
import { GetSparklinesRequest } from './getSparklinesRequest'; import { GetSparklinesRequest } from './getSparklinesRequest';
import { InviteRequest } from './inviteRequest'; import { InviteRequest } from './inviteRequest';
import { InviteTokenGenerateRequest } from './inviteTokenGenerateRequest'; import { InviteTokenGenerateRequest } from './inviteTokenGenerateRequest';
import { ListFrontends200ResponseInner } from './listFrontends200ResponseInner';
import { ListMemberships200Response } from './listMemberships200Response'; import { ListMemberships200Response } from './listMemberships200Response';
import { ListMemberships200ResponseMembershipsInner } from './listMemberships200ResponseMembershipsInner'; import { ListMemberships200ResponseMembershipsInner } from './listMemberships200ResponseMembershipsInner';
import { ListOrganizationMembers200Response } from './listOrganizationMembers200Response'; import { ListOrganizationMembers200Response } from './listOrganizationMembers200Response';
@ -96,7 +95,6 @@ import { MetricsSample } from './metricsSample';
import { Overview } from './overview'; import { Overview } from './overview';
import { PasswordRequirements } from './passwordRequirements'; import { PasswordRequirements } from './passwordRequirements';
import { Principal } from './principal'; import { Principal } from './principal';
import { PublicFrontend } from './publicFrontend';
import { RegenerateToken200Response } from './regenerateToken200Response'; import { RegenerateToken200Response } from './regenerateToken200Response';
import { RegenerateTokenRequest } from './regenerateTokenRequest'; import { RegenerateTokenRequest } from './regenerateTokenRequest';
import { RegisterRequest } from './registerRequest'; import { RegisterRequest } from './registerRequest';
@ -139,7 +137,6 @@ let typeMap: {[index: string]: any} = {
"ChangePasswordRequest": ChangePasswordRequest, "ChangePasswordRequest": ChangePasswordRequest,
"Configuration": Configuration, "Configuration": Configuration,
"CreateFrontendRequest": CreateFrontendRequest, "CreateFrontendRequest": CreateFrontendRequest,
"CreateFrontendResponse": CreateFrontendResponse,
"CreateIdentity201Response": CreateIdentity201Response, "CreateIdentity201Response": CreateIdentity201Response,
"CreateIdentityRequest": CreateIdentityRequest, "CreateIdentityRequest": CreateIdentityRequest,
"CreateOrganizationRequest": CreateOrganizationRequest, "CreateOrganizationRequest": CreateOrganizationRequest,
@ -154,6 +151,7 @@ let typeMap: {[index: string]: any} = {
"GetSparklinesRequest": GetSparklinesRequest, "GetSparklinesRequest": GetSparklinesRequest,
"InviteRequest": InviteRequest, "InviteRequest": InviteRequest,
"InviteTokenGenerateRequest": InviteTokenGenerateRequest, "InviteTokenGenerateRequest": InviteTokenGenerateRequest,
"ListFrontends200ResponseInner": ListFrontends200ResponseInner,
"ListMemberships200Response": ListMemberships200Response, "ListMemberships200Response": ListMemberships200Response,
"ListMemberships200ResponseMembershipsInner": ListMemberships200ResponseMembershipsInner, "ListMemberships200ResponseMembershipsInner": ListMemberships200ResponseMembershipsInner,
"ListOrganizationMembers200Response": ListOrganizationMembers200Response, "ListOrganizationMembers200Response": ListOrganizationMembers200Response,
@ -166,7 +164,6 @@ let typeMap: {[index: string]: any} = {
"Overview": Overview, "Overview": Overview,
"PasswordRequirements": PasswordRequirements, "PasswordRequirements": PasswordRequirements,
"Principal": Principal, "Principal": Principal,
"PublicFrontend": PublicFrontend,
"RegenerateToken200Response": RegenerateToken200Response, "RegenerateToken200Response": RegenerateToken200Response,
"RegenerateTokenRequest": RegenerateTokenRequest, "RegenerateTokenRequest": RegenerateTokenRequest,
"RegisterRequest": RegisterRequest, "RegisterRequest": RegisterRequest,

View File

@ -30,9 +30,6 @@ from zrok_api.models.account_body import AccountBody
from zrok_api.models.auth_user import AuthUser from zrok_api.models.auth_user import AuthUser
from zrok_api.models.change_password_body import ChangePasswordBody from zrok_api.models.change_password_body import ChangePasswordBody
from zrok_api.models.configuration import Configuration from zrok_api.models.configuration import Configuration
from zrok_api.models.create_frontend_request import CreateFrontendRequest
from zrok_api.models.create_frontend_response import CreateFrontendResponse
from zrok_api.models.delete_frontend_request import DeleteFrontendRequest
from zrok_api.models.disable_request import DisableRequest from zrok_api.models.disable_request import DisableRequest
from zrok_api.models.enable_request import EnableRequest from zrok_api.models.enable_request import EnableRequest
from zrok_api.models.enable_response import EnableResponse from zrok_api.models.enable_response import EnableResponse
@ -41,18 +38,22 @@ from zrok_api.models.environment_and_resources import EnvironmentAndResources
from zrok_api.models.environments import Environments from zrok_api.models.environments import Environments
from zrok_api.models.error_message import ErrorMessage from zrok_api.models.error_message import ErrorMessage
from zrok_api.models.frontend import Frontend from zrok_api.models.frontend import Frontend
from zrok_api.models.frontend_body import FrontendBody
from zrok_api.models.frontend_body1 import FrontendBody1
from zrok_api.models.frontend_body2 import FrontendBody2
from zrok_api.models.frontends import Frontends from zrok_api.models.frontends import Frontends
from zrok_api.models.grants_body import GrantsBody from zrok_api.models.grants_body import GrantsBody
from zrok_api.models.identity_body import IdentityBody from zrok_api.models.identity_body import IdentityBody
from zrok_api.models.inline_response200 import InlineResponse200 from zrok_api.models.inline_response200 import InlineResponse200
from zrok_api.models.inline_response2001 import InlineResponse2001 from zrok_api.models.inline_response2001 import InlineResponse2001
from zrok_api.models.inline_response2002 import InlineResponse2002 from zrok_api.models.inline_response2002 import InlineResponse2002
from zrok_api.models.inline_response2002_members import InlineResponse2002Members
from zrok_api.models.inline_response2003 import InlineResponse2003 from zrok_api.models.inline_response2003 import InlineResponse2003
from zrok_api.models.inline_response2003_organizations import InlineResponse2003Organizations from zrok_api.models.inline_response2003_members import InlineResponse2003Members
from zrok_api.models.inline_response2004 import InlineResponse2004 from zrok_api.models.inline_response2004 import InlineResponse2004
from zrok_api.models.inline_response2004_memberships import InlineResponse2004Memberships from zrok_api.models.inline_response2004_organizations import InlineResponse2004Organizations
from zrok_api.models.inline_response2005 import InlineResponse2005 from zrok_api.models.inline_response2005 import InlineResponse2005
from zrok_api.models.inline_response2005_memberships import InlineResponse2005Memberships
from zrok_api.models.inline_response2006 import InlineResponse2006
from zrok_api.models.inline_response201 import InlineResponse201 from zrok_api.models.inline_response201 import InlineResponse201
from zrok_api.models.invite_body import InviteBody from zrok_api.models.invite_body import InviteBody
from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest
@ -67,8 +68,6 @@ from zrok_api.models.organization_remove_body import OrganizationRemoveBody
from zrok_api.models.overview import Overview from zrok_api.models.overview import Overview
from zrok_api.models.password_requirements import PasswordRequirements from zrok_api.models.password_requirements import PasswordRequirements
from zrok_api.models.principal import Principal from zrok_api.models.principal import Principal
from zrok_api.models.public_frontend import PublicFrontend
from zrok_api.models.public_frontend_list import PublicFrontendList
from zrok_api.models.regenerate_token_body import RegenerateTokenBody from zrok_api.models.regenerate_token_body import RegenerateTokenBody
from zrok_api.models.register_body import RegisterBody from zrok_api.models.register_body import RegisterBody
from zrok_api.models.reset_password_body import ResetPasswordBody from zrok_api.models.reset_password_body import ResetPasswordBody
@ -82,7 +81,6 @@ from zrok_api.models.spark_data_sample import SparkDataSample
from zrok_api.models.sparklines_body import SparklinesBody from zrok_api.models.sparklines_body import SparklinesBody
from zrok_api.models.unaccess_request import UnaccessRequest from zrok_api.models.unaccess_request import UnaccessRequest
from zrok_api.models.unshare_request import UnshareRequest from zrok_api.models.unshare_request import UnshareRequest
from zrok_api.models.update_frontend_request import UpdateFrontendRequest
from zrok_api.models.update_share_request import UpdateShareRequest from zrok_api.models.update_share_request import UpdateShareRequest
from zrok_api.models.verify_body import VerifyBody from zrok_api.models.verify_body import VerifyBody
from zrok_api.models.version import Version from zrok_api.models.version import Version

View File

@ -223,8 +223,8 @@ class AdminApi(object):
>>> result = thread.get() >>> result = thread.get()
:param async_req bool :param async_req bool
:param CreateFrontendRequest body: :param FrontendBody body:
:return: CreateFrontendResponse :return: VerifyBody
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
""" """
@ -244,8 +244,8 @@ class AdminApi(object):
>>> result = thread.get() >>> result = thread.get()
:param async_req bool :param async_req bool
:param CreateFrontendRequest body: :param FrontendBody body:
:return: CreateFrontendResponse :return: VerifyBody
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
""" """
@ -299,7 +299,7 @@ class AdminApi(object):
body=body_params, body=body_params,
post_params=form_params, post_params=form_params,
files=local_var_files, files=local_var_files,
response_type='CreateFrontendResponse', # noqa: E501 response_type='VerifyBody', # noqa: E501
auth_settings=auth_settings, auth_settings=auth_settings,
async_req=params.get('async_req'), async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'), _return_http_data_only=params.get('_return_http_data_only'),
@ -502,7 +502,7 @@ class AdminApi(object):
>>> result = thread.get() >>> result = thread.get()
:param async_req bool :param async_req bool
:param DeleteFrontendRequest body: :param FrontendBody1 body:
:return: None :return: None
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
@ -523,7 +523,7 @@ class AdminApi(object):
>>> result = thread.get() >>> result = thread.get()
:param async_req bool :param async_req bool
:param DeleteFrontendRequest body: :param FrontendBody1 body:
:return: None :return: None
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
@ -858,7 +858,7 @@ class AdminApi(object):
>>> result = thread.get() >>> result = thread.get()
:param async_req bool :param async_req bool
:return: PublicFrontendList :return: list[InlineResponse2002]
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
""" """
@ -878,7 +878,7 @@ class AdminApi(object):
>>> result = thread.get() >>> result = thread.get()
:param async_req bool :param async_req bool
:return: PublicFrontendList :return: list[InlineResponse2002]
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
""" """
@ -926,7 +926,7 @@ class AdminApi(object):
body=body_params, body=body_params,
post_params=form_params, post_params=form_params,
files=local_var_files, files=local_var_files,
response_type='PublicFrontendList', # noqa: E501 response_type='list[InlineResponse2002]', # noqa: E501
auth_settings=auth_settings, auth_settings=auth_settings,
async_req=params.get('async_req'), async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'), _return_http_data_only=params.get('_return_http_data_only'),
@ -944,7 +944,7 @@ class AdminApi(object):
:param async_req bool :param async_req bool
:param OrganizationListBody body: :param OrganizationListBody body:
:return: InlineResponse2002 :return: InlineResponse2003
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
""" """
@ -965,7 +965,7 @@ class AdminApi(object):
:param async_req bool :param async_req bool
:param OrganizationListBody body: :param OrganizationListBody body:
:return: InlineResponse2002 :return: InlineResponse2003
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
""" """
@ -1019,7 +1019,7 @@ class AdminApi(object):
body=body_params, body=body_params,
post_params=form_params, post_params=form_params,
files=local_var_files, files=local_var_files,
response_type='InlineResponse2002', # noqa: E501 response_type='InlineResponse2003', # noqa: E501
auth_settings=auth_settings, auth_settings=auth_settings,
async_req=params.get('async_req'), async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'), _return_http_data_only=params.get('_return_http_data_only'),
@ -1036,7 +1036,7 @@ class AdminApi(object):
>>> result = thread.get() >>> result = thread.get()
:param async_req bool :param async_req bool
:return: InlineResponse2003 :return: InlineResponse2004
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
""" """
@ -1056,7 +1056,7 @@ class AdminApi(object):
>>> result = thread.get() >>> result = thread.get()
:param async_req bool :param async_req bool
:return: InlineResponse2003 :return: InlineResponse2004
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
""" """
@ -1104,7 +1104,7 @@ class AdminApi(object):
body=body_params, body=body_params,
post_params=form_params, post_params=form_params,
files=local_var_files, files=local_var_files,
response_type='InlineResponse2003', # noqa: E501 response_type='InlineResponse2004', # noqa: E501
auth_settings=auth_settings, auth_settings=auth_settings,
async_req=params.get('async_req'), async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'), _return_http_data_only=params.get('_return_http_data_only'),
@ -1210,7 +1210,7 @@ class AdminApi(object):
>>> result = thread.get() >>> result = thread.get()
:param async_req bool :param async_req bool
:param UpdateFrontendRequest body: :param FrontendBody2 body:
:return: None :return: None
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
@ -1231,7 +1231,7 @@ class AdminApi(object):
>>> result = thread.get() >>> result = thread.get()
:param async_req bool :param async_req bool
:param UpdateFrontendRequest body: :param FrontendBody2 body:
:return: None :return: None
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.

View File

@ -774,7 +774,7 @@ class MetadataApi(object):
:param async_req bool :param async_req bool
:param SparklinesBody body: :param SparklinesBody body:
:return: InlineResponse2005 :return: InlineResponse2006
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
""" """
@ -795,7 +795,7 @@ class MetadataApi(object):
:param async_req bool :param async_req bool
:param SparklinesBody body: :param SparklinesBody body:
:return: InlineResponse2005 :return: InlineResponse2006
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
""" """
@ -849,7 +849,7 @@ class MetadataApi(object):
body=body_params, body=body_params,
post_params=form_params, post_params=form_params,
files=local_var_files, files=local_var_files,
response_type='InlineResponse2005', # noqa: E501 response_type='InlineResponse2006', # noqa: E501
auth_settings=auth_settings, auth_settings=auth_settings,
async_req=params.get('async_req'), async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'), _return_http_data_only=params.get('_return_http_data_only'),
@ -866,7 +866,7 @@ class MetadataApi(object):
>>> result = thread.get() >>> result = thread.get()
:param async_req bool :param async_req bool
:return: InlineResponse2004 :return: InlineResponse2005
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
""" """
@ -886,7 +886,7 @@ class MetadataApi(object):
>>> result = thread.get() >>> result = thread.get()
:param async_req bool :param async_req bool
:return: InlineResponse2004 :return: InlineResponse2005
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
""" """
@ -934,7 +934,7 @@ class MetadataApi(object):
body=body_params, body=body_params,
post_params=form_params, post_params=form_params,
files=local_var_files, files=local_var_files,
response_type='InlineResponse2004', # noqa: E501 response_type='InlineResponse2005', # noqa: E501
auth_settings=auth_settings, auth_settings=auth_settings,
async_req=params.get('async_req'), async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'), _return_http_data_only=params.get('_return_http_data_only'),
@ -952,7 +952,7 @@ class MetadataApi(object):
:param async_req bool :param async_req bool
:param str organization_token: (required) :param str organization_token: (required)
:return: InlineResponse2002 :return: InlineResponse2003
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
""" """
@ -973,7 +973,7 @@ class MetadataApi(object):
:param async_req bool :param async_req bool
:param str organization_token: (required) :param str organization_token: (required)
:return: InlineResponse2002 :return: InlineResponse2003
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
""" """
@ -1027,7 +1027,7 @@ class MetadataApi(object):
body=body_params, body=body_params,
post_params=form_params, post_params=form_params,
files=local_var_files, files=local_var_files,
response_type='InlineResponse2002', # noqa: E501 response_type='InlineResponse2003', # noqa: E501
auth_settings=auth_settings, auth_settings=auth_settings,
async_req=params.get('async_req'), async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'), _return_http_data_only=params.get('_return_http_data_only'),

View File

@ -20,9 +20,6 @@ from zrok_api.models.account_body import AccountBody
from zrok_api.models.auth_user import AuthUser from zrok_api.models.auth_user import AuthUser
from zrok_api.models.change_password_body import ChangePasswordBody from zrok_api.models.change_password_body import ChangePasswordBody
from zrok_api.models.configuration import Configuration from zrok_api.models.configuration import Configuration
from zrok_api.models.create_frontend_request import CreateFrontendRequest
from zrok_api.models.create_frontend_response import CreateFrontendResponse
from zrok_api.models.delete_frontend_request import DeleteFrontendRequest
from zrok_api.models.disable_request import DisableRequest from zrok_api.models.disable_request import DisableRequest
from zrok_api.models.enable_request import EnableRequest from zrok_api.models.enable_request import EnableRequest
from zrok_api.models.enable_response import EnableResponse from zrok_api.models.enable_response import EnableResponse
@ -31,18 +28,22 @@ from zrok_api.models.environment_and_resources import EnvironmentAndResources
from zrok_api.models.environments import Environments from zrok_api.models.environments import Environments
from zrok_api.models.error_message import ErrorMessage from zrok_api.models.error_message import ErrorMessage
from zrok_api.models.frontend import Frontend from zrok_api.models.frontend import Frontend
from zrok_api.models.frontend_body import FrontendBody
from zrok_api.models.frontend_body1 import FrontendBody1
from zrok_api.models.frontend_body2 import FrontendBody2
from zrok_api.models.frontends import Frontends from zrok_api.models.frontends import Frontends
from zrok_api.models.grants_body import GrantsBody from zrok_api.models.grants_body import GrantsBody
from zrok_api.models.identity_body import IdentityBody from zrok_api.models.identity_body import IdentityBody
from zrok_api.models.inline_response200 import InlineResponse200 from zrok_api.models.inline_response200 import InlineResponse200
from zrok_api.models.inline_response2001 import InlineResponse2001 from zrok_api.models.inline_response2001 import InlineResponse2001
from zrok_api.models.inline_response2002 import InlineResponse2002 from zrok_api.models.inline_response2002 import InlineResponse2002
from zrok_api.models.inline_response2002_members import InlineResponse2002Members
from zrok_api.models.inline_response2003 import InlineResponse2003 from zrok_api.models.inline_response2003 import InlineResponse2003
from zrok_api.models.inline_response2003_organizations import InlineResponse2003Organizations from zrok_api.models.inline_response2003_members import InlineResponse2003Members
from zrok_api.models.inline_response2004 import InlineResponse2004 from zrok_api.models.inline_response2004 import InlineResponse2004
from zrok_api.models.inline_response2004_memberships import InlineResponse2004Memberships from zrok_api.models.inline_response2004_organizations import InlineResponse2004Organizations
from zrok_api.models.inline_response2005 import InlineResponse2005 from zrok_api.models.inline_response2005 import InlineResponse2005
from zrok_api.models.inline_response2005_memberships import InlineResponse2005Memberships
from zrok_api.models.inline_response2006 import InlineResponse2006
from zrok_api.models.inline_response201 import InlineResponse201 from zrok_api.models.inline_response201 import InlineResponse201
from zrok_api.models.invite_body import InviteBody from zrok_api.models.invite_body import InviteBody
from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest
@ -57,8 +58,6 @@ from zrok_api.models.organization_remove_body import OrganizationRemoveBody
from zrok_api.models.overview import Overview from zrok_api.models.overview import Overview
from zrok_api.models.password_requirements import PasswordRequirements from zrok_api.models.password_requirements import PasswordRequirements
from zrok_api.models.principal import Principal from zrok_api.models.principal import Principal
from zrok_api.models.public_frontend import PublicFrontend
from zrok_api.models.public_frontend_list import PublicFrontendList
from zrok_api.models.regenerate_token_body import RegenerateTokenBody from zrok_api.models.regenerate_token_body import RegenerateTokenBody
from zrok_api.models.register_body import RegisterBody from zrok_api.models.register_body import RegisterBody
from zrok_api.models.reset_password_body import ResetPasswordBody from zrok_api.models.reset_password_body import ResetPasswordBody
@ -72,7 +71,6 @@ from zrok_api.models.spark_data_sample import SparkDataSample
from zrok_api.models.sparklines_body import SparklinesBody from zrok_api.models.sparklines_body import SparklinesBody
from zrok_api.models.unaccess_request import UnaccessRequest from zrok_api.models.unaccess_request import UnaccessRequest
from zrok_api.models.unshare_request import UnshareRequest from zrok_api.models.unshare_request import UnshareRequest
from zrok_api.models.update_frontend_request import UpdateFrontendRequest
from zrok_api.models.update_share_request import UpdateShareRequest from zrok_api.models.update_share_request import UpdateShareRequest
from zrok_api.models.verify_body import VerifyBody from zrok_api.models.verify_body import VerifyBody
from zrok_api.models.version import Version from zrok_api.models.version import Version

View File

@ -0,0 +1,194 @@
# coding: utf-8
"""
zrok
zrok client access # noqa: E501
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class FrontendBody(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'z_id': 'str',
'url_template': 'str',
'public_name': 'str',
'permission_mode': 'str'
}
attribute_map = {
'z_id': 'zId',
'url_template': 'url_template',
'public_name': 'public_name',
'permission_mode': 'permissionMode'
}
def __init__(self, z_id=None, url_template=None, public_name=None, permission_mode=None): # noqa: E501
"""FrontendBody - a model defined in Swagger""" # noqa: E501
self._z_id = None
self._url_template = None
self._public_name = None
self._permission_mode = None
self.discriminator = None
if z_id is not None:
self.z_id = z_id
if url_template is not None:
self.url_template = url_template
if public_name is not None:
self.public_name = public_name
if permission_mode is not None:
self.permission_mode = permission_mode
@property
def z_id(self):
"""Gets the z_id of this FrontendBody. # noqa: E501
:return: The z_id of this FrontendBody. # noqa: E501
:rtype: str
"""
return self._z_id
@z_id.setter
def z_id(self, z_id):
"""Sets the z_id of this FrontendBody.
:param z_id: The z_id of this FrontendBody. # noqa: E501
:type: str
"""
self._z_id = z_id
@property
def url_template(self):
"""Gets the url_template of this FrontendBody. # noqa: E501
:return: The url_template of this FrontendBody. # noqa: E501
:rtype: str
"""
return self._url_template
@url_template.setter
def url_template(self, url_template):
"""Sets the url_template of this FrontendBody.
:param url_template: The url_template of this FrontendBody. # noqa: E501
:type: str
"""
self._url_template = url_template
@property
def public_name(self):
"""Gets the public_name of this FrontendBody. # noqa: E501
:return: The public_name of this FrontendBody. # noqa: E501
:rtype: str
"""
return self._public_name
@public_name.setter
def public_name(self, public_name):
"""Sets the public_name of this FrontendBody.
:param public_name: The public_name of this FrontendBody. # noqa: E501
:type: str
"""
self._public_name = public_name
@property
def permission_mode(self):
"""Gets the permission_mode of this FrontendBody. # noqa: E501
:return: The permission_mode of this FrontendBody. # noqa: E501
:rtype: str
"""
return self._permission_mode
@permission_mode.setter
def permission_mode(self, permission_mode):
"""Sets the permission_mode of this FrontendBody.
:param permission_mode: The permission_mode of this FrontendBody. # noqa: E501
:type: str
"""
allowed_values = ["open", "closed"] # noqa: E501
if permission_mode not in allowed_values:
raise ValueError(
"Invalid value for `permission_mode` ({0}), must be one of {1}" # noqa: E501
.format(permission_mode, allowed_values)
)
self._permission_mode = permission_mode
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
if issubclass(FrontendBody, dict):
for key, value in self.items():
result[key] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, FrontendBody):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -0,0 +1,110 @@
# coding: utf-8
"""
zrok
zrok client access # noqa: E501
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class FrontendBody1(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'frontend_token': 'str'
}
attribute_map = {
'frontend_token': 'frontendToken'
}
def __init__(self, frontend_token=None): # noqa: E501
"""FrontendBody1 - a model defined in Swagger""" # noqa: E501
self._frontend_token = None
self.discriminator = None
if frontend_token is not None:
self.frontend_token = frontend_token
@property
def frontend_token(self):
"""Gets the frontend_token of this FrontendBody1. # noqa: E501
:return: The frontend_token of this FrontendBody1. # noqa: E501
:rtype: str
"""
return self._frontend_token
@frontend_token.setter
def frontend_token(self, frontend_token):
"""Sets the frontend_token of this FrontendBody1.
:param frontend_token: The frontend_token of this FrontendBody1. # noqa: E501
:type: str
"""
self._frontend_token = frontend_token
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
if issubclass(FrontendBody1, dict):
for key, value in self.items():
result[key] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, FrontendBody1):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -0,0 +1,162 @@
# coding: utf-8
"""
zrok
zrok client access # noqa: E501
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class FrontendBody2(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'frontend_token': 'str',
'public_name': 'str',
'url_template': 'str'
}
attribute_map = {
'frontend_token': 'frontendToken',
'public_name': 'publicName',
'url_template': 'urlTemplate'
}
def __init__(self, frontend_token=None, public_name=None, url_template=None): # noqa: E501
"""FrontendBody2 - a model defined in Swagger""" # noqa: E501
self._frontend_token = None
self._public_name = None
self._url_template = None
self.discriminator = None
if frontend_token is not None:
self.frontend_token = frontend_token
if public_name is not None:
self.public_name = public_name
if url_template is not None:
self.url_template = url_template
@property
def frontend_token(self):
"""Gets the frontend_token of this FrontendBody2. # noqa: E501
:return: The frontend_token of this FrontendBody2. # noqa: E501
:rtype: str
"""
return self._frontend_token
@frontend_token.setter
def frontend_token(self, frontend_token):
"""Sets the frontend_token of this FrontendBody2.
:param frontend_token: The frontend_token of this FrontendBody2. # noqa: E501
:type: str
"""
self._frontend_token = frontend_token
@property
def public_name(self):
"""Gets the public_name of this FrontendBody2. # noqa: E501
:return: The public_name of this FrontendBody2. # noqa: E501
:rtype: str
"""
return self._public_name
@public_name.setter
def public_name(self, public_name):
"""Sets the public_name of this FrontendBody2.
:param public_name: The public_name of this FrontendBody2. # noqa: E501
:type: str
"""
self._public_name = public_name
@property
def url_template(self):
"""Gets the url_template of this FrontendBody2. # noqa: E501
:return: The url_template of this FrontendBody2. # noqa: E501
:rtype: str
"""
return self._url_template
@url_template.setter
def url_template(self, url_template):
"""Sets the url_template of this FrontendBody2.
:param url_template: The url_template of this FrontendBody2. # noqa: E501
:type: str
"""
self._url_template = url_template
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
if issubclass(FrontendBody2, dict):
for key, value in self.items():
result[key] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, FrontendBody2):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -28,40 +28,170 @@ class InlineResponse2002(object):
and the value is json key in definition. and the value is json key in definition.
""" """
swagger_types = { swagger_types = {
'members': 'list[InlineResponse2002Members]' 'token': 'str',
'z_id': 'str',
'url_template': 'str',
'public_name': 'str',
'created_at': 'int',
'updated_at': 'int'
} }
attribute_map = { attribute_map = {
'members': 'members' 'token': 'token',
'z_id': 'zId',
'url_template': 'urlTemplate',
'public_name': 'publicName',
'created_at': 'createdAt',
'updated_at': 'updatedAt'
} }
def __init__(self, members=None): # noqa: E501 def __init__(self, token=None, z_id=None, url_template=None, public_name=None, created_at=None, updated_at=None): # noqa: E501
"""InlineResponse2002 - a model defined in Swagger""" # noqa: E501 """InlineResponse2002 - a model defined in Swagger""" # noqa: E501
self._members = None self._token = None
self._z_id = None
self._url_template = None
self._public_name = None
self._created_at = None
self._updated_at = None
self.discriminator = None self.discriminator = None
if members is not None: if token is not None:
self.members = members self.token = token
if z_id is not None:
self.z_id = z_id
if url_template is not None:
self.url_template = url_template
if public_name is not None:
self.public_name = public_name
if created_at is not None:
self.created_at = created_at
if updated_at is not None:
self.updated_at = updated_at
@property @property
def members(self): def token(self):
"""Gets the members of this InlineResponse2002. # noqa: E501 """Gets the token of this InlineResponse2002. # noqa: E501
:return: The members of this InlineResponse2002. # noqa: E501 :return: The token of this InlineResponse2002. # noqa: E501
:rtype: list[InlineResponse2002Members] :rtype: str
""" """
return self._members return self._token
@members.setter @token.setter
def members(self, members): def token(self, token):
"""Sets the members of this InlineResponse2002. """Sets the token of this InlineResponse2002.
:param members: The members of this InlineResponse2002. # noqa: E501 :param token: The token of this InlineResponse2002. # noqa: E501
:type: list[InlineResponse2002Members] :type: str
""" """
self._members = members self._token = token
@property
def z_id(self):
"""Gets the z_id of this InlineResponse2002. # noqa: E501
:return: The z_id of this InlineResponse2002. # noqa: E501
:rtype: str
"""
return self._z_id
@z_id.setter
def z_id(self, z_id):
"""Sets the z_id of this InlineResponse2002.
:param z_id: The z_id of this InlineResponse2002. # noqa: E501
:type: str
"""
self._z_id = z_id
@property
def url_template(self):
"""Gets the url_template of this InlineResponse2002. # noqa: E501
:return: The url_template of this InlineResponse2002. # noqa: E501
:rtype: str
"""
return self._url_template
@url_template.setter
def url_template(self, url_template):
"""Sets the url_template of this InlineResponse2002.
:param url_template: The url_template of this InlineResponse2002. # noqa: E501
:type: str
"""
self._url_template = url_template
@property
def public_name(self):
"""Gets the public_name of this InlineResponse2002. # noqa: E501
:return: The public_name of this InlineResponse2002. # noqa: E501
:rtype: str
"""
return self._public_name
@public_name.setter
def public_name(self, public_name):
"""Sets the public_name of this InlineResponse2002.
:param public_name: The public_name of this InlineResponse2002. # noqa: E501
:type: str
"""
self._public_name = public_name
@property
def created_at(self):
"""Gets the created_at of this InlineResponse2002. # noqa: E501
:return: The created_at of this InlineResponse2002. # noqa: E501
:rtype: int
"""
return self._created_at
@created_at.setter
def created_at(self, created_at):
"""Sets the created_at of this InlineResponse2002.
:param created_at: The created_at of this InlineResponse2002. # noqa: E501
:type: int
"""
self._created_at = created_at
@property
def updated_at(self):
"""Gets the updated_at of this InlineResponse2002. # noqa: E501
:return: The updated_at of this InlineResponse2002. # noqa: E501
:rtype: int
"""
return self._updated_at
@updated_at.setter
def updated_at(self, updated_at):
"""Sets the updated_at of this InlineResponse2002.
:param updated_at: The updated_at of this InlineResponse2002. # noqa: E501
:type: int
"""
self._updated_at = updated_at
def to_dict(self): def to_dict(self):
"""Returns the model properties as a dict""" """Returns the model properties as a dict"""

View File

@ -28,40 +28,40 @@ class InlineResponse2003(object):
and the value is json key in definition. and the value is json key in definition.
""" """
swagger_types = { swagger_types = {
'organizations': 'list[InlineResponse2003Organizations]' 'members': 'list[InlineResponse2003Members]'
} }
attribute_map = { attribute_map = {
'organizations': 'organizations' 'members': 'members'
} }
def __init__(self, organizations=None): # noqa: E501 def __init__(self, members=None): # noqa: E501
"""InlineResponse2003 - a model defined in Swagger""" # noqa: E501 """InlineResponse2003 - a model defined in Swagger""" # noqa: E501
self._organizations = None self._members = None
self.discriminator = None self.discriminator = None
if organizations is not None: if members is not None:
self.organizations = organizations self.members = members
@property @property
def organizations(self): def members(self):
"""Gets the organizations of this InlineResponse2003. # noqa: E501 """Gets the members of this InlineResponse2003. # noqa: E501
:return: The organizations of this InlineResponse2003. # noqa: E501 :return: The members of this InlineResponse2003. # noqa: E501
:rtype: list[InlineResponse2003Organizations] :rtype: list[InlineResponse2003Members]
""" """
return self._organizations return self._members
@organizations.setter @members.setter
def organizations(self, organizations): def members(self, members):
"""Sets the organizations of this InlineResponse2003. """Sets the members of this InlineResponse2003.
:param organizations: The organizations of this InlineResponse2003. # noqa: E501 :param members: The members of this InlineResponse2003. # noqa: E501
:type: list[InlineResponse2003Organizations] :type: list[InlineResponse2003Members]
""" """
self._organizations = organizations self._members = members
def to_dict(self): def to_dict(self):
"""Returns the model properties as a dict""" """Returns the model properties as a dict"""

View File

@ -0,0 +1,136 @@
# coding: utf-8
"""
zrok
zrok client access # noqa: E501
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class InlineResponse2003Members(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'email': 'str',
'admin': 'bool'
}
attribute_map = {
'email': 'email',
'admin': 'admin'
}
def __init__(self, email=None, admin=None): # noqa: E501
"""InlineResponse2003Members - a model defined in Swagger""" # noqa: E501
self._email = None
self._admin = None
self.discriminator = None
if email is not None:
self.email = email
if admin is not None:
self.admin = admin
@property
def email(self):
"""Gets the email of this InlineResponse2003Members. # noqa: E501
:return: The email of this InlineResponse2003Members. # noqa: E501
:rtype: str
"""
return self._email
@email.setter
def email(self, email):
"""Sets the email of this InlineResponse2003Members.
:param email: The email of this InlineResponse2003Members. # noqa: E501
:type: str
"""
self._email = email
@property
def admin(self):
"""Gets the admin of this InlineResponse2003Members. # noqa: E501
:return: The admin of this InlineResponse2003Members. # noqa: E501
:rtype: bool
"""
return self._admin
@admin.setter
def admin(self, admin):
"""Sets the admin of this InlineResponse2003Members.
:param admin: The admin of this InlineResponse2003Members. # noqa: E501
:type: bool
"""
self._admin = admin
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
if issubclass(InlineResponse2003Members, dict):
for key, value in self.items():
result[key] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, InlineResponse2003Members):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -28,40 +28,40 @@ class InlineResponse2004(object):
and the value is json key in definition. and the value is json key in definition.
""" """
swagger_types = { swagger_types = {
'memberships': 'list[InlineResponse2004Memberships]' 'organizations': 'list[InlineResponse2004Organizations]'
} }
attribute_map = { attribute_map = {
'memberships': 'memberships' 'organizations': 'organizations'
} }
def __init__(self, memberships=None): # noqa: E501 def __init__(self, organizations=None): # noqa: E501
"""InlineResponse2004 - a model defined in Swagger""" # noqa: E501 """InlineResponse2004 - a model defined in Swagger""" # noqa: E501
self._memberships = None self._organizations = None
self.discriminator = None self.discriminator = None
if memberships is not None: if organizations is not None:
self.memberships = memberships self.organizations = organizations
@property @property
def memberships(self): def organizations(self):
"""Gets the memberships of this InlineResponse2004. # noqa: E501 """Gets the organizations of this InlineResponse2004. # noqa: E501
:return: The memberships of this InlineResponse2004. # noqa: E501 :return: The organizations of this InlineResponse2004. # noqa: E501
:rtype: list[InlineResponse2004Memberships] :rtype: list[InlineResponse2004Organizations]
""" """
return self._memberships return self._organizations
@memberships.setter @organizations.setter
def memberships(self, memberships): def organizations(self, organizations):
"""Sets the memberships of this InlineResponse2004. """Sets the organizations of this InlineResponse2004.
:param memberships: The memberships of this InlineResponse2004. # noqa: E501 :param organizations: The organizations of this InlineResponse2004. # noqa: E501
:type: list[InlineResponse2004Memberships] :type: list[InlineResponse2004Organizations]
""" """
self._memberships = memberships self._organizations = organizations
def to_dict(self): def to_dict(self):
"""Returns the model properties as a dict""" """Returns the model properties as a dict"""

View File

@ -0,0 +1,136 @@
# coding: utf-8
"""
zrok
zrok client access # noqa: E501
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class InlineResponse2004Organizations(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'token': 'str',
'description': 'str'
}
attribute_map = {
'token': 'token',
'description': 'description'
}
def __init__(self, token=None, description=None): # noqa: E501
"""InlineResponse2004Organizations - a model defined in Swagger""" # noqa: E501
self._token = None
self._description = None
self.discriminator = None
if token is not None:
self.token = token
if description is not None:
self.description = description
@property
def token(self):
"""Gets the token of this InlineResponse2004Organizations. # noqa: E501
:return: The token of this InlineResponse2004Organizations. # noqa: E501
:rtype: str
"""
return self._token
@token.setter
def token(self, token):
"""Sets the token of this InlineResponse2004Organizations.
:param token: The token of this InlineResponse2004Organizations. # noqa: E501
:type: str
"""
self._token = token
@property
def description(self):
"""Gets the description of this InlineResponse2004Organizations. # noqa: E501
:return: The description of this InlineResponse2004Organizations. # noqa: E501
:rtype: str
"""
return self._description
@description.setter
def description(self, description):
"""Sets the description of this InlineResponse2004Organizations.
:param description: The description of this InlineResponse2004Organizations. # noqa: E501
:type: str
"""
self._description = description
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
if issubclass(InlineResponse2004Organizations, dict):
for key, value in self.items():
result[key] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, InlineResponse2004Organizations):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -28,40 +28,40 @@ class InlineResponse2005(object):
and the value is json key in definition. and the value is json key in definition.
""" """
swagger_types = { swagger_types = {
'sparklines': 'list[Metrics]' 'memberships': 'list[InlineResponse2005Memberships]'
} }
attribute_map = { attribute_map = {
'sparklines': 'sparklines' 'memberships': 'memberships'
} }
def __init__(self, sparklines=None): # noqa: E501 def __init__(self, memberships=None): # noqa: E501
"""InlineResponse2005 - a model defined in Swagger""" # noqa: E501 """InlineResponse2005 - a model defined in Swagger""" # noqa: E501
self._sparklines = None self._memberships = None
self.discriminator = None self.discriminator = None
if sparklines is not None: if memberships is not None:
self.sparklines = sparklines self.memberships = memberships
@property @property
def sparklines(self): def memberships(self):
"""Gets the sparklines of this InlineResponse2005. # noqa: E501 """Gets the memberships of this InlineResponse2005. # noqa: E501
:return: The sparklines of this InlineResponse2005. # noqa: E501 :return: The memberships of this InlineResponse2005. # noqa: E501
:rtype: list[Metrics] :rtype: list[InlineResponse2005Memberships]
""" """
return self._sparklines return self._memberships
@sparklines.setter @memberships.setter
def sparklines(self, sparklines): def memberships(self, memberships):
"""Sets the sparklines of this InlineResponse2005. """Sets the memberships of this InlineResponse2005.
:param sparklines: The sparklines of this InlineResponse2005. # noqa: E501 :param memberships: The memberships of this InlineResponse2005. # noqa: E501
:type: list[Metrics] :type: list[InlineResponse2005Memberships]
""" """
self._sparklines = sparklines self._memberships = memberships
def to_dict(self): def to_dict(self):
"""Returns the model properties as a dict""" """Returns the model properties as a dict"""

View File

@ -0,0 +1,162 @@
# coding: utf-8
"""
zrok
zrok client access # noqa: E501
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class InlineResponse2005Memberships(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'token': 'str',
'description': 'str',
'admin': 'bool'
}
attribute_map = {
'token': 'token',
'description': 'description',
'admin': 'admin'
}
def __init__(self, token=None, description=None, admin=None): # noqa: E501
"""InlineResponse2005Memberships - a model defined in Swagger""" # noqa: E501
self._token = None
self._description = None
self._admin = None
self.discriminator = None
if token is not None:
self.token = token
if description is not None:
self.description = description
if admin is not None:
self.admin = admin
@property
def token(self):
"""Gets the token of this InlineResponse2005Memberships. # noqa: E501
:return: The token of this InlineResponse2005Memberships. # noqa: E501
:rtype: str
"""
return self._token
@token.setter
def token(self, token):
"""Sets the token of this InlineResponse2005Memberships.
:param token: The token of this InlineResponse2005Memberships. # noqa: E501
:type: str
"""
self._token = token
@property
def description(self):
"""Gets the description of this InlineResponse2005Memberships. # noqa: E501
:return: The description of this InlineResponse2005Memberships. # noqa: E501
:rtype: str
"""
return self._description
@description.setter
def description(self, description):
"""Sets the description of this InlineResponse2005Memberships.
:param description: The description of this InlineResponse2005Memberships. # noqa: E501
:type: str
"""
self._description = description
@property
def admin(self):
"""Gets the admin of this InlineResponse2005Memberships. # noqa: E501
:return: The admin of this InlineResponse2005Memberships. # noqa: E501
:rtype: bool
"""
return self._admin
@admin.setter
def admin(self, admin):
"""Sets the admin of this InlineResponse2005Memberships.
:param admin: The admin of this InlineResponse2005Memberships. # noqa: E501
:type: bool
"""
self._admin = admin
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
if issubclass(InlineResponse2005Memberships, dict):
for key, value in self.items():
result[key] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, InlineResponse2005Memberships):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -0,0 +1,110 @@
# coding: utf-8
"""
zrok
zrok client access # noqa: E501
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class InlineResponse2006(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'sparklines': 'list[Metrics]'
}
attribute_map = {
'sparklines': 'sparklines'
}
def __init__(self, sparklines=None): # noqa: E501
"""InlineResponse2006 - a model defined in Swagger""" # noqa: E501
self._sparklines = None
self.discriminator = None
if sparklines is not None:
self.sparklines = sparklines
@property
def sparklines(self):
"""Gets the sparklines of this InlineResponse2006. # noqa: E501
:return: The sparklines of this InlineResponse2006. # noqa: E501
:rtype: list[Metrics]
"""
return self._sparklines
@sparklines.setter
def sparklines(self, sparklines):
"""Sets the sparklines of this InlineResponse2006.
:param sparklines: The sparklines of this InlineResponse2006. # noqa: E501
:type: list[Metrics]
"""
self._sparklines = sparklines
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
if issubclass(InlineResponse2006, dict):
for key, value in self.items():
result[key] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, InlineResponse2006):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@ -263,12 +263,25 @@ paths:
- name: body - name: body
in: body in: body
schema: schema:
$ref: "#/definitions/createFrontendRequest" type: object
properties:
zId:
type: string
url_template:
type: string
public_name:
type: string
permissionMode:
type: string
enum: [ "open", "closed" ]
responses: responses:
201: 201:
description: frontend created description: frontend created
schema: schema:
$ref: "#/definitions/createFrontendResponse" type: object
properties:
token:
type: string
400: 400:
description: bad request description: bad request
401: 401:
@ -287,7 +300,14 @@ paths:
- name: body - name: body
in: body in: body
schema: schema:
$ref: "#/definitions/updateFrontendRequest" type: object
properties:
frontendToken:
type: string
publicName:
type: string
urlTemplate:
type: string
responses: responses:
200: 200:
description: frontend updated description: frontend updated
@ -307,7 +327,10 @@ paths:
- name: body - name: body
in: body in: body
schema: schema:
$ref: "#/definitions/deleteFrontendRequest" type: object
properties:
frontendToken:
type: string
responses: responses:
200: 200:
description: frontend deleted description: frontend deleted
@ -329,7 +352,22 @@ paths:
200: 200:
description: ok description: ok
schema: schema:
$ref: "#/definitions/publicFrontendList" type: array
items:
type: object
properties:
token:
type: string
zId:
type: string
urlTemplate:
type: string
publicName:
type: string
createdAt:
type: integer
updatedAt:
type: integer
401: 401:
description: unauthorized description: unauthorized
500: 500:
@ -1106,31 +1144,6 @@ definitions:
passwordRequirements: passwordRequirements:
$ref: "#/definitions/passwordRequirements" $ref: "#/definitions/passwordRequirements"
createFrontendRequest:
type: object
properties:
zId:
type: string
url_template:
type: string
public_name:
type: string
permissionMode:
type: string
enum: ["open", "closed"]
createFrontendResponse:
type: object
properties:
token:
type: string
deleteFrontendRequest:
type: object
properties:
frontendToken:
type: string
disableRequest: disableRequest:
type: object type: object
properties: properties:
@ -1282,27 +1295,6 @@ definitions:
admin: admin:
type: boolean type: boolean
publicFrontend:
type: object
properties:
token:
type: string
zId:
type: string
urlTemplate:
type: string
publicName:
type: string
createdAt:
type: integer
updatedAt:
type: integer
publicFrontendList:
type: array
items:
$ref: "#/definitions/publicFrontend"
share: share:
type: object type: object
properties: properties:
@ -1423,16 +1415,6 @@ definitions:
reserved: reserved:
type: boolean type: boolean
updateFrontendRequest:
type: object
properties:
frontendToken:
type: string
publicName:
type: string
urlTemplate:
type: string
updateShareRequest: updateShareRequest:
type: object type: object
properties: properties:

View File

@ -11,7 +11,6 @@ models/AddOrganizationMemberRequest.ts
models/AuthUser.ts models/AuthUser.ts
models/ChangePasswordRequest.ts models/ChangePasswordRequest.ts
models/CreateFrontendRequest.ts models/CreateFrontendRequest.ts
models/CreateFrontendResponse.ts
models/CreateIdentity201Response.ts models/CreateIdentity201Response.ts
models/CreateIdentityRequest.ts models/CreateIdentityRequest.ts
models/CreateOrganizationRequest.ts models/CreateOrganizationRequest.ts
@ -26,6 +25,7 @@ models/GetSparklines200Response.ts
models/GetSparklinesRequest.ts models/GetSparklinesRequest.ts
models/InviteRequest.ts models/InviteRequest.ts
models/InviteTokenGenerateRequest.ts models/InviteTokenGenerateRequest.ts
models/ListFrontends200ResponseInner.ts
models/ListMemberships200Response.ts models/ListMemberships200Response.ts
models/ListMemberships200ResponseMembershipsInner.ts models/ListMemberships200ResponseMembershipsInner.ts
models/ListOrganizationMembers200Response.ts models/ListOrganizationMembers200Response.ts
@ -39,7 +39,6 @@ models/ModelConfiguration.ts
models/Overview.ts models/Overview.ts
models/PasswordRequirements.ts models/PasswordRequirements.ts
models/Principal.ts models/Principal.ts
models/PublicFrontend.ts
models/RegenerateToken200Response.ts models/RegenerateToken200Response.ts
models/RegenerateTokenRequest.ts models/RegenerateTokenRequest.ts
models/RegisterRequest.ts models/RegisterRequest.ts

View File

@ -17,16 +17,15 @@ import * as runtime from '../runtime';
import type { import type {
AddOrganizationMemberRequest, AddOrganizationMemberRequest,
CreateFrontendRequest, CreateFrontendRequest,
CreateFrontendResponse,
CreateIdentity201Response, CreateIdentity201Response,
CreateIdentityRequest, CreateIdentityRequest,
CreateOrganizationRequest, CreateOrganizationRequest,
DeleteFrontendRequest, DeleteFrontendRequest,
InviteTokenGenerateRequest, InviteTokenGenerateRequest,
ListFrontends200ResponseInner,
ListOrganizationMembers200Response, ListOrganizationMembers200Response,
ListOrganizations200Response, ListOrganizations200Response,
LoginRequest, LoginRequest,
PublicFrontend,
RegenerateToken200Response, RegenerateToken200Response,
RemoveOrganizationMemberRequest, RemoveOrganizationMemberRequest,
UpdateFrontendRequest, UpdateFrontendRequest,
@ -37,8 +36,6 @@ import {
AddOrganizationMemberRequestToJSON, AddOrganizationMemberRequestToJSON,
CreateFrontendRequestFromJSON, CreateFrontendRequestFromJSON,
CreateFrontendRequestToJSON, CreateFrontendRequestToJSON,
CreateFrontendResponseFromJSON,
CreateFrontendResponseToJSON,
CreateIdentity201ResponseFromJSON, CreateIdentity201ResponseFromJSON,
CreateIdentity201ResponseToJSON, CreateIdentity201ResponseToJSON,
CreateIdentityRequestFromJSON, CreateIdentityRequestFromJSON,
@ -49,14 +46,14 @@ import {
DeleteFrontendRequestToJSON, DeleteFrontendRequestToJSON,
InviteTokenGenerateRequestFromJSON, InviteTokenGenerateRequestFromJSON,
InviteTokenGenerateRequestToJSON, InviteTokenGenerateRequestToJSON,
ListFrontends200ResponseInnerFromJSON,
ListFrontends200ResponseInnerToJSON,
ListOrganizationMembers200ResponseFromJSON, ListOrganizationMembers200ResponseFromJSON,
ListOrganizationMembers200ResponseToJSON, ListOrganizationMembers200ResponseToJSON,
ListOrganizations200ResponseFromJSON, ListOrganizations200ResponseFromJSON,
ListOrganizations200ResponseToJSON, ListOrganizations200ResponseToJSON,
LoginRequestFromJSON, LoginRequestFromJSON,
LoginRequestToJSON, LoginRequestToJSON,
PublicFrontendFromJSON,
PublicFrontendToJSON,
RegenerateToken200ResponseFromJSON, RegenerateToken200ResponseFromJSON,
RegenerateToken200ResponseToJSON, RegenerateToken200ResponseToJSON,
RemoveOrganizationMemberRequestFromJSON, RemoveOrganizationMemberRequestFromJSON,
@ -183,7 +180,7 @@ export class AdminApi extends runtime.BaseAPI {
/** /**
*/ */
async createFrontendRaw(requestParameters: CreateFrontendOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateFrontendResponse>> { async createFrontendRaw(requestParameters: CreateFrontendOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RegenerateToken200Response>> {
const queryParameters: any = {}; const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {}; const headerParameters: runtime.HTTPHeaders = {};
@ -202,12 +199,12 @@ export class AdminApi extends runtime.BaseAPI {
body: CreateFrontendRequestToJSON(requestParameters['body']), body: CreateFrontendRequestToJSON(requestParameters['body']),
}, initOverrides); }, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => CreateFrontendResponseFromJSON(jsonValue)); return new runtime.JSONApiResponse(response, (jsonValue) => RegenerateToken200ResponseFromJSON(jsonValue));
} }
/** /**
*/ */
async createFrontend(requestParameters: CreateFrontendOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateFrontendResponse> { async createFrontend(requestParameters: CreateFrontendOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RegenerateToken200Response> {
const response = await this.createFrontendRaw(requestParameters, initOverrides); const response = await this.createFrontendRaw(requestParameters, initOverrides);
return await response.value(); return await response.value();
} }
@ -396,7 +393,7 @@ export class AdminApi extends runtime.BaseAPI {
/** /**
*/ */
async listFrontendsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PublicFrontend>>> { async listFrontendsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ListFrontends200ResponseInner>>> {
const queryParameters: any = {}; const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {}; const headerParameters: runtime.HTTPHeaders = {};
@ -412,12 +409,12 @@ export class AdminApi extends runtime.BaseAPI {
query: queryParameters, query: queryParameters,
}, initOverrides); }, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PublicFrontendFromJSON)); return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ListFrontends200ResponseInnerFromJSON));
} }
/** /**
*/ */
async listFrontends(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PublicFrontend>> { async listFrontends(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ListFrontends200ResponseInner>> {
const response = await this.listFrontendsRaw(initOverrides); const response = await this.listFrontendsRaw(initOverrides);
return await response.value(); return await response.value();
} }

View File

@ -0,0 +1,100 @@
/* tslint:disable */
/* eslint-disable */
/**
* zrok
* zrok client access
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
/**
*
* @export
* @interface ListFrontends200ResponseInner
*/
export interface ListFrontends200ResponseInner {
/**
*
* @type {string}
* @memberof ListFrontends200ResponseInner
*/
token?: string;
/**
*
* @type {string}
* @memberof ListFrontends200ResponseInner
*/
zId?: string;
/**
*
* @type {string}
* @memberof ListFrontends200ResponseInner
*/
urlTemplate?: string;
/**
*
* @type {string}
* @memberof ListFrontends200ResponseInner
*/
publicName?: string;
/**
*
* @type {number}
* @memberof ListFrontends200ResponseInner
*/
createdAt?: number;
/**
*
* @type {number}
* @memberof ListFrontends200ResponseInner
*/
updatedAt?: number;
}
/**
* Check if a given object implements the ListFrontends200ResponseInner interface.
*/
export function instanceOfListFrontends200ResponseInner(value: object): value is ListFrontends200ResponseInner {
return true;
}
export function ListFrontends200ResponseInnerFromJSON(json: any): ListFrontends200ResponseInner {
return ListFrontends200ResponseInnerFromJSONTyped(json, false);
}
export function ListFrontends200ResponseInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListFrontends200ResponseInner {
if (json == null) {
return json;
}
return {
'token': json['token'] == null ? undefined : json['token'],
'zId': json['zId'] == null ? undefined : json['zId'],
'urlTemplate': json['urlTemplate'] == null ? undefined : json['urlTemplate'],
'publicName': json['publicName'] == null ? undefined : json['publicName'],
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
'updatedAt': json['updatedAt'] == null ? undefined : json['updatedAt'],
};
}
export function ListFrontends200ResponseInnerToJSON(value?: ListFrontends200ResponseInner | null): any {
if (value == null) {
return value;
}
return {
'token': value['token'],
'zId': value['zId'],
'urlTemplate': value['urlTemplate'],
'publicName': value['publicName'],
'createdAt': value['createdAt'],
'updatedAt': value['updatedAt'],
};
}

View File

@ -6,7 +6,6 @@ export * from './AddOrganizationMemberRequest';
export * from './AuthUser'; export * from './AuthUser';
export * from './ChangePasswordRequest'; export * from './ChangePasswordRequest';
export * from './CreateFrontendRequest'; export * from './CreateFrontendRequest';
export * from './CreateFrontendResponse';
export * from './CreateIdentity201Response'; export * from './CreateIdentity201Response';
export * from './CreateIdentityRequest'; export * from './CreateIdentityRequest';
export * from './CreateOrganizationRequest'; export * from './CreateOrganizationRequest';
@ -21,6 +20,7 @@ export * from './GetSparklines200Response';
export * from './GetSparklinesRequest'; export * from './GetSparklinesRequest';
export * from './InviteRequest'; export * from './InviteRequest';
export * from './InviteTokenGenerateRequest'; export * from './InviteTokenGenerateRequest';
export * from './ListFrontends200ResponseInner';
export * from './ListMemberships200Response'; export * from './ListMemberships200Response';
export * from './ListMemberships200ResponseMembershipsInner'; export * from './ListMemberships200ResponseMembershipsInner';
export * from './ListOrganizationMembers200Response'; export * from './ListOrganizationMembers200Response';
@ -34,7 +34,6 @@ export * from './ModelConfiguration';
export * from './Overview'; export * from './Overview';
export * from './PasswordRequirements'; export * from './PasswordRequirements';
export * from './Principal'; export * from './Principal';
export * from './PublicFrontend';
export * from './RegenerateToken200Response'; export * from './RegenerateToken200Response';
export * from './RegenerateTokenRequest'; export * from './RegenerateTokenRequest';
export * from './RegisterRequest'; export * from './RegisterRequest';