mirror of
https://github.com/openziti/zrok.git
synced 2025-06-19 17:27:54 +02:00
verify endpoint polish (#834)
This commit is contained in:
parent
d9b32e14c9
commit
14d03b88f7
@ -2,20 +2,18 @@ package controller
|
||||
|
||||
import (
|
||||
"github.com/go-openapi/runtime/middleware"
|
||||
"github.com/openziti/zrok/rest_model_zrok"
|
||||
"github.com/openziti/zrok/rest_server_zrok/operations/account"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
type verifyHandler struct {
|
||||
}
|
||||
type verifyHandler struct{}
|
||||
|
||||
func newVerifyHandler() *verifyHandler {
|
||||
return &verifyHandler{}
|
||||
}
|
||||
|
||||
func (self *verifyHandler) Handle(params account.VerifyParams) middleware.Responder {
|
||||
if params.Body != nil {
|
||||
func (h *verifyHandler) Handle(params account.VerifyParams) middleware.Responder {
|
||||
if params.Body.Token != "" {
|
||||
logrus.Debugf("received verify request for token '%v'", params.Body.Token)
|
||||
tx, err := str.Begin()
|
||||
if err != nil {
|
||||
@ -30,7 +28,7 @@ func (self *verifyHandler) Handle(params account.VerifyParams) middleware.Respon
|
||||
return account.NewVerifyNotFound()
|
||||
}
|
||||
|
||||
return account.NewVerifyOK().WithPayload(&rest_model_zrok.VerifyResponse{Email: ar.Email})
|
||||
return account.NewVerifyOK().WithPayload(&account.VerifyOKBody{Email: ar.Email})
|
||||
}
|
||||
logrus.Error("empty verification request")
|
||||
return account.NewVerifyInternalServerError()
|
||||
|
@ -14,8 +14,6 @@ import (
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"github.com/openziti/zrok/rest_model_zrok"
|
||||
)
|
||||
|
||||
// NewVerifyParams creates a new VerifyParams object,
|
||||
@ -64,7 +62,7 @@ VerifyParams contains all the parameters to send to the API endpoint
|
||||
type VerifyParams struct {
|
||||
|
||||
// Body.
|
||||
Body *rest_model_zrok.VerifyRequest
|
||||
Body VerifyBody
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
@ -120,13 +118,13 @@ func (o *VerifyParams) SetHTTPClient(client *http.Client) {
|
||||
}
|
||||
|
||||
// WithBody adds the body to the verify params
|
||||
func (o *VerifyParams) WithBody(body *rest_model_zrok.VerifyRequest) *VerifyParams {
|
||||
func (o *VerifyParams) WithBody(body VerifyBody) *VerifyParams {
|
||||
o.SetBody(body)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetBody adds the body to the verify params
|
||||
func (o *VerifyParams) SetBody(body *rest_model_zrok.VerifyRequest) {
|
||||
func (o *VerifyParams) SetBody(body VerifyBody) {
|
||||
o.Body = body
|
||||
}
|
||||
|
||||
@ -137,10 +135,8 @@ func (o *VerifyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regist
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.Body != nil {
|
||||
if err := r.SetBodyParam(o.Body); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := r.SetBodyParam(o.Body); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
|
@ -6,13 +6,13 @@ package account
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"github.com/openziti/zrok/rest_model_zrok"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// VerifyReader is a Reader for the Verify structure.
|
||||
@ -57,7 +57,7 @@ VerifyOK describes a response with status code 200, with default header values.
|
||||
token ready
|
||||
*/
|
||||
type VerifyOK struct {
|
||||
Payload *rest_model_zrok.VerifyResponse
|
||||
Payload *VerifyOKBody
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this verify o k response has a 2xx status code
|
||||
@ -98,13 +98,13 @@ func (o *VerifyOK) String() string {
|
||||
return fmt.Sprintf("[POST /verify][%d] verifyOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *VerifyOK) GetPayload() *rest_model_zrok.VerifyResponse {
|
||||
func (o *VerifyOK) GetPayload() *VerifyOKBody {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *VerifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(rest_model_zrok.VerifyResponse)
|
||||
o.Payload = new(VerifyOKBody)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
@ -225,3 +225,79 @@ func (o *VerifyInternalServerError) readResponse(response runtime.ClientResponse
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
/*
|
||||
VerifyBody verify body
|
||||
swagger:model VerifyBody
|
||||
*/
|
||||
type VerifyBody struct {
|
||||
|
||||
// token
|
||||
Token string `json:"token,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this verify body
|
||||
func (o *VerifyBody) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this verify body based on context it is used
|
||||
func (o *VerifyBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (o *VerifyBody) MarshalBinary() ([]byte, error) {
|
||||
if o == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(o)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (o *VerifyBody) UnmarshalBinary(b []byte) error {
|
||||
var res VerifyBody
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*o = res
|
||||
return nil
|
||||
}
|
||||
|
||||
/*
|
||||
VerifyOKBody verify o k body
|
||||
swagger:model VerifyOKBody
|
||||
*/
|
||||
type VerifyOKBody struct {
|
||||
|
||||
// email
|
||||
Email string `json:"email,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this verify o k body
|
||||
func (o *VerifyOKBody) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this verify o k body based on context it is used
|
||||
func (o *VerifyOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (o *VerifyOKBody) MarshalBinary() ([]byte, error) {
|
||||
if o == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(o)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (o *VerifyOKBody) UnmarshalBinary(b []byte) error {
|
||||
var res VerifyOKBody
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*o = res
|
||||
return nil
|
||||
}
|
||||
|
@ -1677,7 +1677,11 @@ func init() {
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/verifyRequest"
|
||||
"properties": {
|
||||
"token": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -1685,7 +1689,11 @@ func init() {
|
||||
"200": {
|
||||
"description": "token ready",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/verifyResponse"
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
@ -2271,22 +2279,6 @@ func init() {
|
||||
}
|
||||
}
|
||||
},
|
||||
"verifyRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"token": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"verifyResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"version": {
|
||||
"type": "string"
|
||||
}
|
||||
@ -3928,7 +3920,11 @@ func init() {
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/verifyRequest"
|
||||
"properties": {
|
||||
"token": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -3936,7 +3932,11 @@ func init() {
|
||||
"200": {
|
||||
"description": "token ready",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/verifyResponse"
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
@ -4555,22 +4555,6 @@ func init() {
|
||||
}
|
||||
}
|
||||
},
|
||||
"verifyRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"token": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"verifyResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"version": {
|
||||
"type": "string"
|
||||
}
|
||||
|
@ -6,9 +6,12 @@ package account
|
||||
// Editing this file might prove futile when you re-run the generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/go-openapi/runtime/middleware"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// VerifyHandlerFunc turns a function with the right signature into a verify handler
|
||||
@ -54,3 +57,77 @@ func (o *Verify) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
||||
o.Context.Respond(rw, r, route.Produces, route, res)
|
||||
|
||||
}
|
||||
|
||||
// VerifyBody verify body
|
||||
//
|
||||
// swagger:model VerifyBody
|
||||
type VerifyBody struct {
|
||||
|
||||
// token
|
||||
Token string `json:"token,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this verify body
|
||||
func (o *VerifyBody) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this verify body based on context it is used
|
||||
func (o *VerifyBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (o *VerifyBody) MarshalBinary() ([]byte, error) {
|
||||
if o == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(o)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (o *VerifyBody) UnmarshalBinary(b []byte) error {
|
||||
var res VerifyBody
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*o = res
|
||||
return nil
|
||||
}
|
||||
|
||||
// VerifyOKBody verify o k body
|
||||
//
|
||||
// swagger:model VerifyOKBody
|
||||
type VerifyOKBody struct {
|
||||
|
||||
// email
|
||||
Email string `json:"email,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this verify o k body
|
||||
func (o *VerifyOKBody) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this verify o k body based on context it is used
|
||||
func (o *VerifyOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (o *VerifyOKBody) MarshalBinary() ([]byte, error) {
|
||||
if o == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(o)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (o *VerifyOKBody) UnmarshalBinary(b []byte) error {
|
||||
var res VerifyOKBody
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*o = res
|
||||
return nil
|
||||
}
|
||||
|
@ -12,8 +12,6 @@ import (
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/runtime/middleware"
|
||||
"github.com/go-openapi/validate"
|
||||
|
||||
"github.com/openziti/zrok/rest_model_zrok"
|
||||
)
|
||||
|
||||
// NewVerifyParams creates a new VerifyParams object
|
||||
@ -36,7 +34,7 @@ type VerifyParams struct {
|
||||
/*
|
||||
In: body
|
||||
*/
|
||||
Body *rest_model_zrok.VerifyRequest
|
||||
Body VerifyBody
|
||||
}
|
||||
|
||||
// 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 *VerifyParams) BindRequest(r *http.Request, route *middleware.MatchedRou
|
||||
|
||||
if runtime.HasBody(r) {
|
||||
defer r.Body.Close()
|
||||
var body rest_model_zrok.VerifyRequest
|
||||
var body VerifyBody
|
||||
if err := route.Consumer.Consume(r.Body, &body); err != nil {
|
||||
res = append(res, errors.NewParseError("body", "body", "", err))
|
||||
} else {
|
||||
@ -65,7 +63,7 @@ func (o *VerifyParams) BindRequest(r *http.Request, route *middleware.MatchedRou
|
||||
}
|
||||
|
||||
if len(res) == 0 {
|
||||
o.Body = &body
|
||||
o.Body = body
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,8 +9,6 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
|
||||
"github.com/openziti/zrok/rest_model_zrok"
|
||||
)
|
||||
|
||||
// VerifyOKCode is the HTTP code returned for type VerifyOK
|
||||
@ -26,7 +24,7 @@ type VerifyOK struct {
|
||||
/*
|
||||
In: Body
|
||||
*/
|
||||
Payload *rest_model_zrok.VerifyResponse `json:"body,omitempty"`
|
||||
Payload *VerifyOKBody `json:"body,omitempty"`
|
||||
}
|
||||
|
||||
// NewVerifyOK creates VerifyOK with default headers values
|
||||
@ -36,13 +34,13 @@ func NewVerifyOK() *VerifyOK {
|
||||
}
|
||||
|
||||
// WithPayload adds the payload to the verify o k response
|
||||
func (o *VerifyOK) WithPayload(payload *rest_model_zrok.VerifyResponse) *VerifyOK {
|
||||
func (o *VerifyOK) WithPayload(payload *VerifyOKBody) *VerifyOK {
|
||||
o.Payload = payload
|
||||
return o
|
||||
}
|
||||
|
||||
// SetPayload sets the payload to the verify o k response
|
||||
func (o *VerifyOK) SetPayload(payload *rest_model_zrok.VerifyResponse) {
|
||||
func (o *VerifyOK) SetPayload(payload *VerifyOKBody) {
|
||||
o.Payload = payload
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,6 @@ model/environmentAndResources.ts
|
||||
model/frontend.ts
|
||||
model/getSparklines200Response.ts
|
||||
model/getSparklinesRequest.ts
|
||||
model/grantsRequest.ts
|
||||
model/inviteRequest.ts
|
||||
model/inviteTokenGenerateRequest.ts
|
||||
model/listMemberships200Response.ts
|
||||
@ -55,5 +54,4 @@ model/unaccessRequest.ts
|
||||
model/unshareRequest.ts
|
||||
model/updateFrontendRequest.ts
|
||||
model/updateShareRequest.ts
|
||||
model/verifyRequest.ts
|
||||
model/verifyResponse.ts
|
||||
model/verify200Response.ts
|
||||
|
@ -21,8 +21,7 @@ import { LoginRequest } from '../model/loginRequest';
|
||||
import { RegenerateToken200Response } from '../model/regenerateToken200Response';
|
||||
import { RegenerateTokenRequest } from '../model/regenerateTokenRequest';
|
||||
import { RegisterRequest } from '../model/registerRequest';
|
||||
import { VerifyRequest } from '../model/verifyRequest';
|
||||
import { VerifyResponse } from '../model/verifyResponse';
|
||||
import { Verify200Response } from '../model/verify200Response';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
@ -536,7 +535,7 @@ export class AccountApi {
|
||||
*
|
||||
* @param body
|
||||
*/
|
||||
public async verify (body?: VerifyRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: VerifyResponse; }> {
|
||||
public async verify (body?: RegenerateToken200Response, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Verify200Response; }> {
|
||||
const localVarPath = this.basePath + '/verify';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
@ -560,7 +559,7 @@ export class AccountApi {
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "VerifyRequest")
|
||||
body: ObjectSerializer.serialize(body, "RegenerateToken200Response")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
@ -579,13 +578,13 @@ export class AccountApi {
|
||||
localVarRequestOptions.form = localVarFormParams;
|
||||
}
|
||||
}
|
||||
return new Promise<{ response: http.IncomingMessage; body: VerifyResponse; }>((resolve, reject) => {
|
||||
return new Promise<{ response: http.IncomingMessage; body: Verify200Response; }>((resolve, reject) => {
|
||||
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
||||
body = ObjectSerializer.deserialize(body, "VerifyResponse");
|
||||
body = ObjectSerializer.deserialize(body, "Verify200Response");
|
||||
resolve({ response: response, body: body });
|
||||
} else {
|
||||
reject(new HttpError(response, body, response.statusCode));
|
||||
|
@ -22,7 +22,6 @@ import { CreateIdentity201Response } from '../model/createIdentity201Response';
|
||||
import { CreateIdentityRequest } from '../model/createIdentityRequest';
|
||||
import { CreateOrganizationRequest } from '../model/createOrganizationRequest';
|
||||
import { DeleteFrontendRequest } from '../model/deleteFrontendRequest';
|
||||
import { GrantsRequest } from '../model/grantsRequest';
|
||||
import { InviteTokenGenerateRequest } from '../model/inviteTokenGenerateRequest';
|
||||
import { ListOrganizationMembers200Response } from '../model/listOrganizationMembers200Response';
|
||||
import { ListOrganizations200Response } from '../model/listOrganizations200Response';
|
||||
@ -31,6 +30,7 @@ import { PublicFrontend } from '../model/publicFrontend';
|
||||
import { RegenerateToken200Response } from '../model/regenerateToken200Response';
|
||||
import { RemoveOrganizationMemberRequest } from '../model/removeOrganizationMemberRequest';
|
||||
import { UpdateFrontendRequest } from '../model/updateFrontendRequest';
|
||||
import { Verify200Response } from '../model/verify200Response';
|
||||
|
||||
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
||||
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
||||
@ -546,7 +546,7 @@ export class AdminApi {
|
||||
*
|
||||
* @param body
|
||||
*/
|
||||
public async grants (body?: GrantsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
public async grants (body?: Verify200Response, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
||||
const localVarPath = this.basePath + '/grants';
|
||||
let localVarQueryParameters: any = {};
|
||||
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
||||
@ -563,7 +563,7 @@ export class AdminApi {
|
||||
uri: localVarPath,
|
||||
useQuerystring: this._useQuerystring,
|
||||
json: true,
|
||||
body: ObjectSerializer.serialize(body, "GrantsRequest")
|
||||
body: ObjectSerializer.serialize(body, "Verify200Response")
|
||||
};
|
||||
|
||||
let authenticationPromise = Promise.resolve();
|
||||
|
@ -20,7 +20,6 @@ export * from './environmentAndResources';
|
||||
export * from './frontend';
|
||||
export * from './getSparklines200Response';
|
||||
export * from './getSparklinesRequest';
|
||||
export * from './grantsRequest';
|
||||
export * from './inviteRequest';
|
||||
export * from './inviteTokenGenerateRequest';
|
||||
export * from './listMemberships200Response';
|
||||
@ -48,8 +47,7 @@ export * from './unaccessRequest';
|
||||
export * from './unshareRequest';
|
||||
export * from './updateFrontendRequest';
|
||||
export * from './updateShareRequest';
|
||||
export * from './verifyRequest';
|
||||
export * from './verifyResponse';
|
||||
export * from './verify200Response';
|
||||
|
||||
import * as fs from 'fs';
|
||||
|
||||
@ -84,7 +82,6 @@ import { EnvironmentAndResources } from './environmentAndResources';
|
||||
import { Frontend } from './frontend';
|
||||
import { GetSparklines200Response } from './getSparklines200Response';
|
||||
import { GetSparklinesRequest } from './getSparklinesRequest';
|
||||
import { GrantsRequest } from './grantsRequest';
|
||||
import { InviteRequest } from './inviteRequest';
|
||||
import { InviteTokenGenerateRequest } from './inviteTokenGenerateRequest';
|
||||
import { ListMemberships200Response } from './listMemberships200Response';
|
||||
@ -112,8 +109,7 @@ import { UnaccessRequest } from './unaccessRequest';
|
||||
import { UnshareRequest } from './unshareRequest';
|
||||
import { UpdateFrontendRequest } from './updateFrontendRequest';
|
||||
import { UpdateShareRequest } from './updateShareRequest';
|
||||
import { VerifyRequest } from './verifyRequest';
|
||||
import { VerifyResponse } from './verifyResponse';
|
||||
import { Verify200Response } from './verify200Response';
|
||||
|
||||
/* tslint:disable:no-unused-variable */
|
||||
let primitives = [
|
||||
@ -156,7 +152,6 @@ let typeMap: {[index: string]: any} = {
|
||||
"Frontend": Frontend,
|
||||
"GetSparklines200Response": GetSparklines200Response,
|
||||
"GetSparklinesRequest": GetSparklinesRequest,
|
||||
"GrantsRequest": GrantsRequest,
|
||||
"InviteRequest": InviteRequest,
|
||||
"InviteTokenGenerateRequest": InviteTokenGenerateRequest,
|
||||
"ListMemberships200Response": ListMemberships200Response,
|
||||
@ -184,8 +179,7 @@ let typeMap: {[index: string]: any} = {
|
||||
"UnshareRequest": UnshareRequest,
|
||||
"UpdateFrontendRequest": UpdateFrontendRequest,
|
||||
"UpdateShareRequest": UpdateShareRequest,
|
||||
"VerifyRequest": VerifyRequest,
|
||||
"VerifyResponse": VerifyResponse,
|
||||
"Verify200Response": Verify200Response,
|
||||
}
|
||||
|
||||
export class ObjectSerializer {
|
||||
|
31
sdk/nodejs/sdk/src/zrok/api/model/verify200Response.ts
Normal file
31
sdk/nodejs/sdk/src/zrok/api/model/verify200Response.ts
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* 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 Verify200Response {
|
||||
'email'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "email",
|
||||
"baseName": "email",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return Verify200Response.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
@ -46,12 +46,13 @@ from zrok_api.models.grants_body import GrantsBody
|
||||
from zrok_api.models.identity_body import IdentityBody
|
||||
from zrok_api.models.inline_response200 import InlineResponse200
|
||||
from zrok_api.models.inline_response2001 import InlineResponse2001
|
||||
from zrok_api.models.inline_response2001_members import InlineResponse2001Members
|
||||
from zrok_api.models.inline_response2002 import InlineResponse2002
|
||||
from zrok_api.models.inline_response2002_organizations import InlineResponse2002Organizations
|
||||
from zrok_api.models.inline_response2002_members import InlineResponse2002Members
|
||||
from zrok_api.models.inline_response2003 import InlineResponse2003
|
||||
from zrok_api.models.inline_response2003_memberships import InlineResponse2003Memberships
|
||||
from zrok_api.models.inline_response2003_organizations import InlineResponse2003Organizations
|
||||
from zrok_api.models.inline_response2004 import InlineResponse2004
|
||||
from zrok_api.models.inline_response2004_memberships import InlineResponse2004Memberships
|
||||
from zrok_api.models.inline_response2005 import InlineResponse2005
|
||||
from zrok_api.models.inline_response201 import InlineResponse201
|
||||
from zrok_api.models.invite_body import InviteBody
|
||||
from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest
|
||||
@ -83,6 +84,5 @@ from zrok_api.models.unaccess_request import UnaccessRequest
|
||||
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.verify_request import VerifyRequest
|
||||
from zrok_api.models.verify_response import VerifyResponse
|
||||
from zrok_api.models.verify_body import VerifyBody
|
||||
from zrok_api.models.version import Version
|
||||
|
@ -688,8 +688,8 @@ class AccountApi(object):
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param VerifyRequest body:
|
||||
:return: VerifyResponse
|
||||
:param VerifyBody body:
|
||||
:return: InlineResponse2001
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
@ -709,8 +709,8 @@ class AccountApi(object):
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:param VerifyRequest body:
|
||||
:return: VerifyResponse
|
||||
:param VerifyBody body:
|
||||
:return: InlineResponse2001
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
@ -764,7 +764,7 @@ class AccountApi(object):
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='VerifyResponse', # noqa: E501
|
||||
response_type='InlineResponse2001', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
|
@ -131,7 +131,7 @@ class AdminApi(object):
|
||||
|
||||
:param async_req bool
|
||||
:param AccountBody body:
|
||||
:return: InlineResponse200
|
||||
:return: VerifyBody
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
@ -152,7 +152,7 @@ class AdminApi(object):
|
||||
|
||||
:param async_req bool
|
||||
:param AccountBody body:
|
||||
:return: InlineResponse200
|
||||
:return: VerifyBody
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
@ -206,7 +206,7 @@ class AdminApi(object):
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='InlineResponse200', # noqa: E501
|
||||
response_type='VerifyBody', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
@ -410,7 +410,7 @@ class AdminApi(object):
|
||||
|
||||
:param async_req bool
|
||||
:param OrganizationBody body:
|
||||
:return: InlineResponse200
|
||||
:return: VerifyBody
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
@ -431,7 +431,7 @@ class AdminApi(object):
|
||||
|
||||
:param async_req bool
|
||||
:param OrganizationBody body:
|
||||
:return: InlineResponse200
|
||||
:return: VerifyBody
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
@ -485,7 +485,7 @@ class AdminApi(object):
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='InlineResponse200', # noqa: E501
|
||||
response_type='VerifyBody', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
@ -944,7 +944,7 @@ class AdminApi(object):
|
||||
|
||||
:param async_req bool
|
||||
:param OrganizationListBody body:
|
||||
:return: InlineResponse2001
|
||||
:return: InlineResponse2002
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
@ -965,7 +965,7 @@ class AdminApi(object):
|
||||
|
||||
:param async_req bool
|
||||
:param OrganizationListBody body:
|
||||
:return: InlineResponse2001
|
||||
:return: InlineResponse2002
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
@ -1019,7 +1019,7 @@ class AdminApi(object):
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='InlineResponse2001', # noqa: E501
|
||||
response_type='InlineResponse2002', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
@ -1036,7 +1036,7 @@ class AdminApi(object):
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: InlineResponse2002
|
||||
:return: InlineResponse2003
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
@ -1056,7 +1056,7 @@ class AdminApi(object):
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: InlineResponse2002
|
||||
:return: InlineResponse2003
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
@ -1104,7 +1104,7 @@ class AdminApi(object):
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='InlineResponse2002', # noqa: E501
|
||||
response_type='InlineResponse2003', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
|
@ -774,7 +774,7 @@ class MetadataApi(object):
|
||||
|
||||
:param async_req bool
|
||||
:param SparklinesBody body:
|
||||
:return: InlineResponse2004
|
||||
:return: InlineResponse2005
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
@ -795,7 +795,7 @@ class MetadataApi(object):
|
||||
|
||||
:param async_req bool
|
||||
:param SparklinesBody body:
|
||||
:return: InlineResponse2004
|
||||
:return: InlineResponse2005
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
@ -849,7 +849,7 @@ class MetadataApi(object):
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='InlineResponse2004', # noqa: E501
|
||||
response_type='InlineResponse2005', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
@ -866,7 +866,7 @@ class MetadataApi(object):
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: InlineResponse2003
|
||||
:return: InlineResponse2004
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
@ -886,7 +886,7 @@ class MetadataApi(object):
|
||||
>>> result = thread.get()
|
||||
|
||||
:param async_req bool
|
||||
:return: InlineResponse2003
|
||||
:return: InlineResponse2004
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
@ -934,7 +934,7 @@ class MetadataApi(object):
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='InlineResponse2003', # noqa: E501
|
||||
response_type='InlineResponse2004', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
@ -952,7 +952,7 @@ class MetadataApi(object):
|
||||
|
||||
:param async_req bool
|
||||
:param str organization_token: (required)
|
||||
:return: InlineResponse2001
|
||||
:return: InlineResponse2002
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
@ -973,7 +973,7 @@ class MetadataApi(object):
|
||||
|
||||
:param async_req bool
|
||||
:param str organization_token: (required)
|
||||
:return: InlineResponse2001
|
||||
:return: InlineResponse2002
|
||||
If the method is called asynchronously,
|
||||
returns the request thread.
|
||||
"""
|
||||
@ -1027,7 +1027,7 @@ class MetadataApi(object):
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
files=local_var_files,
|
||||
response_type='InlineResponse2001', # noqa: E501
|
||||
response_type='InlineResponse2002', # noqa: E501
|
||||
auth_settings=auth_settings,
|
||||
async_req=params.get('async_req'),
|
||||
_return_http_data_only=params.get('_return_http_data_only'),
|
||||
|
@ -36,12 +36,13 @@ from zrok_api.models.grants_body import GrantsBody
|
||||
from zrok_api.models.identity_body import IdentityBody
|
||||
from zrok_api.models.inline_response200 import InlineResponse200
|
||||
from zrok_api.models.inline_response2001 import InlineResponse2001
|
||||
from zrok_api.models.inline_response2001_members import InlineResponse2001Members
|
||||
from zrok_api.models.inline_response2002 import InlineResponse2002
|
||||
from zrok_api.models.inline_response2002_organizations import InlineResponse2002Organizations
|
||||
from zrok_api.models.inline_response2002_members import InlineResponse2002Members
|
||||
from zrok_api.models.inline_response2003 import InlineResponse2003
|
||||
from zrok_api.models.inline_response2003_memberships import InlineResponse2003Memberships
|
||||
from zrok_api.models.inline_response2003_organizations import InlineResponse2003Organizations
|
||||
from zrok_api.models.inline_response2004 import InlineResponse2004
|
||||
from zrok_api.models.inline_response2004_memberships import InlineResponse2004Memberships
|
||||
from zrok_api.models.inline_response2005 import InlineResponse2005
|
||||
from zrok_api.models.inline_response201 import InlineResponse201
|
||||
from zrok_api.models.invite_body import InviteBody
|
||||
from zrok_api.models.invite_token_generate_request import InviteTokenGenerateRequest
|
||||
@ -73,6 +74,5 @@ from zrok_api.models.unaccess_request import UnaccessRequest
|
||||
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.verify_request import VerifyRequest
|
||||
from zrok_api.models.verify_response import VerifyResponse
|
||||
from zrok_api.models.verify_body import VerifyBody
|
||||
from zrok_api.models.version import Version
|
||||
|
@ -28,40 +28,40 @@ class InlineResponse2001(object):
|
||||
and the value is json key in definition.
|
||||
"""
|
||||
swagger_types = {
|
||||
'members': 'list[InlineResponse2001Members]'
|
||||
'email': 'str'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'members': 'members'
|
||||
'email': 'email'
|
||||
}
|
||||
|
||||
def __init__(self, members=None): # noqa: E501
|
||||
def __init__(self, email=None): # noqa: E501
|
||||
"""InlineResponse2001 - a model defined in Swagger""" # noqa: E501
|
||||
self._members = None
|
||||
self._email = None
|
||||
self.discriminator = None
|
||||
if members is not None:
|
||||
self.members = members
|
||||
if email is not None:
|
||||
self.email = email
|
||||
|
||||
@property
|
||||
def members(self):
|
||||
"""Gets the members of this InlineResponse2001. # noqa: E501
|
||||
def email(self):
|
||||
"""Gets the email of this InlineResponse2001. # noqa: E501
|
||||
|
||||
|
||||
:return: The members of this InlineResponse2001. # noqa: E501
|
||||
:rtype: list[InlineResponse2001Members]
|
||||
:return: The email of this InlineResponse2001. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._members
|
||||
return self._email
|
||||
|
||||
@members.setter
|
||||
def members(self, members):
|
||||
"""Sets the members of this InlineResponse2001.
|
||||
@email.setter
|
||||
def email(self, email):
|
||||
"""Sets the email of this InlineResponse2001.
|
||||
|
||||
|
||||
:param members: The members of this InlineResponse2001. # noqa: E501
|
||||
:type: list[InlineResponse2001Members]
|
||||
:param email: The email of this InlineResponse2001. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._members = members
|
||||
self._email = email
|
||||
|
||||
def to_dict(self):
|
||||
"""Returns the model properties as a dict"""
|
||||
|
@ -28,40 +28,40 @@ class InlineResponse2002(object):
|
||||
and the value is json key in definition.
|
||||
"""
|
||||
swagger_types = {
|
||||
'organizations': 'list[InlineResponse2002Organizations]'
|
||||
'members': 'list[InlineResponse2002Members]'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'organizations': 'organizations'
|
||||
'members': 'members'
|
||||
}
|
||||
|
||||
def __init__(self, organizations=None): # noqa: E501
|
||||
def __init__(self, members=None): # noqa: E501
|
||||
"""InlineResponse2002 - a model defined in Swagger""" # noqa: E501
|
||||
self._organizations = None
|
||||
self._members = None
|
||||
self.discriminator = None
|
||||
if organizations is not None:
|
||||
self.organizations = organizations
|
||||
if members is not None:
|
||||
self.members = members
|
||||
|
||||
@property
|
||||
def organizations(self):
|
||||
"""Gets the organizations of this InlineResponse2002. # noqa: E501
|
||||
def members(self):
|
||||
"""Gets the members of this InlineResponse2002. # noqa: E501
|
||||
|
||||
|
||||
:return: The organizations of this InlineResponse2002. # noqa: E501
|
||||
:rtype: list[InlineResponse2002Organizations]
|
||||
:return: The members of this InlineResponse2002. # noqa: E501
|
||||
:rtype: list[InlineResponse2002Members]
|
||||
"""
|
||||
return self._organizations
|
||||
return self._members
|
||||
|
||||
@organizations.setter
|
||||
def organizations(self, organizations):
|
||||
"""Sets the organizations of this InlineResponse2002.
|
||||
@members.setter
|
||||
def members(self, members):
|
||||
"""Sets the members of this InlineResponse2002.
|
||||
|
||||
|
||||
:param organizations: The organizations of this InlineResponse2002. # noqa: E501
|
||||
:type: list[InlineResponse2002Organizations]
|
||||
:param members: The members of this InlineResponse2002. # noqa: E501
|
||||
:type: list[InlineResponse2002Members]
|
||||
"""
|
||||
|
||||
self._organizations = organizations
|
||||
self._members = members
|
||||
|
||||
def to_dict(self):
|
||||
"""Returns the model properties as a dict"""
|
||||
|
@ -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 InlineResponse2002Members(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
|
||||
"""InlineResponse2002Members - 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 InlineResponse2002Members. # noqa: E501
|
||||
|
||||
|
||||
:return: The email of this InlineResponse2002Members. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._email
|
||||
|
||||
@email.setter
|
||||
def email(self, email):
|
||||
"""Sets the email of this InlineResponse2002Members.
|
||||
|
||||
|
||||
:param email: The email of this InlineResponse2002Members. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._email = email
|
||||
|
||||
@property
|
||||
def admin(self):
|
||||
"""Gets the admin of this InlineResponse2002Members. # noqa: E501
|
||||
|
||||
|
||||
:return: The admin of this InlineResponse2002Members. # noqa: E501
|
||||
:rtype: bool
|
||||
"""
|
||||
return self._admin
|
||||
|
||||
@admin.setter
|
||||
def admin(self, admin):
|
||||
"""Sets the admin of this InlineResponse2002Members.
|
||||
|
||||
|
||||
:param admin: The admin of this InlineResponse2002Members. # 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(InlineResponse2002Members, 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, InlineResponse2002Members):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
@ -28,40 +28,40 @@ class InlineResponse2003(object):
|
||||
and the value is json key in definition.
|
||||
"""
|
||||
swagger_types = {
|
||||
'memberships': 'list[InlineResponse2003Memberships]'
|
||||
'organizations': 'list[InlineResponse2003Organizations]'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'memberships': 'memberships'
|
||||
'organizations': 'organizations'
|
||||
}
|
||||
|
||||
def __init__(self, memberships=None): # noqa: E501
|
||||
def __init__(self, organizations=None): # noqa: E501
|
||||
"""InlineResponse2003 - a model defined in Swagger""" # noqa: E501
|
||||
self._memberships = None
|
||||
self._organizations = None
|
||||
self.discriminator = None
|
||||
if memberships is not None:
|
||||
self.memberships = memberships
|
||||
if organizations is not None:
|
||||
self.organizations = organizations
|
||||
|
||||
@property
|
||||
def memberships(self):
|
||||
"""Gets the memberships of this InlineResponse2003. # noqa: E501
|
||||
def organizations(self):
|
||||
"""Gets the organizations of this InlineResponse2003. # noqa: E501
|
||||
|
||||
|
||||
:return: The memberships of this InlineResponse2003. # noqa: E501
|
||||
:rtype: list[InlineResponse2003Memberships]
|
||||
:return: The organizations of this InlineResponse2003. # noqa: E501
|
||||
:rtype: list[InlineResponse2003Organizations]
|
||||
"""
|
||||
return self._memberships
|
||||
return self._organizations
|
||||
|
||||
@memberships.setter
|
||||
def memberships(self, memberships):
|
||||
"""Sets the memberships of this InlineResponse2003.
|
||||
@organizations.setter
|
||||
def organizations(self, organizations):
|
||||
"""Sets the organizations of this InlineResponse2003.
|
||||
|
||||
|
||||
:param memberships: The memberships of this InlineResponse2003. # noqa: E501
|
||||
:type: list[InlineResponse2003Memberships]
|
||||
:param organizations: The organizations of this InlineResponse2003. # noqa: E501
|
||||
:type: list[InlineResponse2003Organizations]
|
||||
"""
|
||||
|
||||
self._memberships = memberships
|
||||
self._organizations = organizations
|
||||
|
||||
def to_dict(self):
|
||||
"""Returns the model properties as a dict"""
|
||||
|
@ -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 InlineResponse2003Organizations(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
|
||||
"""InlineResponse2003Organizations - 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 InlineResponse2003Organizations. # noqa: E501
|
||||
|
||||
|
||||
:return: The token of this InlineResponse2003Organizations. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._token
|
||||
|
||||
@token.setter
|
||||
def token(self, token):
|
||||
"""Sets the token of this InlineResponse2003Organizations.
|
||||
|
||||
|
||||
:param token: The token of this InlineResponse2003Organizations. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._token = token
|
||||
|
||||
@property
|
||||
def description(self):
|
||||
"""Gets the description of this InlineResponse2003Organizations. # noqa: E501
|
||||
|
||||
|
||||
:return: The description of this InlineResponse2003Organizations. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._description
|
||||
|
||||
@description.setter
|
||||
def description(self, description):
|
||||
"""Sets the description of this InlineResponse2003Organizations.
|
||||
|
||||
|
||||
:param description: The description of this InlineResponse2003Organizations. # 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(InlineResponse2003Organizations, 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, InlineResponse2003Organizations):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
@ -28,40 +28,40 @@ class InlineResponse2004(object):
|
||||
and the value is json key in definition.
|
||||
"""
|
||||
swagger_types = {
|
||||
'sparklines': 'list[Metrics]'
|
||||
'memberships': 'list[InlineResponse2004Memberships]'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'sparklines': 'sparklines'
|
||||
'memberships': 'memberships'
|
||||
}
|
||||
|
||||
def __init__(self, sparklines=None): # noqa: E501
|
||||
def __init__(self, memberships=None): # noqa: E501
|
||||
"""InlineResponse2004 - a model defined in Swagger""" # noqa: E501
|
||||
self._sparklines = None
|
||||
self._memberships = None
|
||||
self.discriminator = None
|
||||
if sparklines is not None:
|
||||
self.sparklines = sparklines
|
||||
if memberships is not None:
|
||||
self.memberships = memberships
|
||||
|
||||
@property
|
||||
def sparklines(self):
|
||||
"""Gets the sparklines of this InlineResponse2004. # noqa: E501
|
||||
def memberships(self):
|
||||
"""Gets the memberships of this InlineResponse2004. # noqa: E501
|
||||
|
||||
|
||||
:return: The sparklines of this InlineResponse2004. # noqa: E501
|
||||
:rtype: list[Metrics]
|
||||
:return: The memberships of this InlineResponse2004. # noqa: E501
|
||||
:rtype: list[InlineResponse2004Memberships]
|
||||
"""
|
||||
return self._sparklines
|
||||
return self._memberships
|
||||
|
||||
@sparklines.setter
|
||||
def sparklines(self, sparklines):
|
||||
"""Sets the sparklines of this InlineResponse2004.
|
||||
@memberships.setter
|
||||
def memberships(self, memberships):
|
||||
"""Sets the memberships of this InlineResponse2004.
|
||||
|
||||
|
||||
:param sparklines: The sparklines of this InlineResponse2004. # noqa: E501
|
||||
:type: list[Metrics]
|
||||
:param memberships: The memberships of this InlineResponse2004. # noqa: E501
|
||||
:type: list[InlineResponse2004Memberships]
|
||||
"""
|
||||
|
||||
self._sparklines = sparklines
|
||||
self._memberships = memberships
|
||||
|
||||
def to_dict(self):
|
||||
"""Returns the model properties as a dict"""
|
||||
|
@ -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 InlineResponse2004Memberships(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
|
||||
"""InlineResponse2004Memberships - 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 InlineResponse2004Memberships. # noqa: E501
|
||||
|
||||
|
||||
:return: The token of this InlineResponse2004Memberships. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._token
|
||||
|
||||
@token.setter
|
||||
def token(self, token):
|
||||
"""Sets the token of this InlineResponse2004Memberships.
|
||||
|
||||
|
||||
:param token: The token of this InlineResponse2004Memberships. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._token = token
|
||||
|
||||
@property
|
||||
def description(self):
|
||||
"""Gets the description of this InlineResponse2004Memberships. # noqa: E501
|
||||
|
||||
|
||||
:return: The description of this InlineResponse2004Memberships. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._description
|
||||
|
||||
@description.setter
|
||||
def description(self, description):
|
||||
"""Sets the description of this InlineResponse2004Memberships.
|
||||
|
||||
|
||||
:param description: The description of this InlineResponse2004Memberships. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._description = description
|
||||
|
||||
@property
|
||||
def admin(self):
|
||||
"""Gets the admin of this InlineResponse2004Memberships. # noqa: E501
|
||||
|
||||
|
||||
:return: The admin of this InlineResponse2004Memberships. # noqa: E501
|
||||
:rtype: bool
|
||||
"""
|
||||
return self._admin
|
||||
|
||||
@admin.setter
|
||||
def admin(self, admin):
|
||||
"""Sets the admin of this InlineResponse2004Memberships.
|
||||
|
||||
|
||||
:param admin: The admin of this InlineResponse2004Memberships. # 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(InlineResponse2004Memberships, 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, InlineResponse2004Memberships):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
110
sdk/python/sdk/zrok/zrok_api/models/inline_response2005.py
Normal file
110
sdk/python/sdk/zrok/zrok_api/models/inline_response2005.py
Normal 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 InlineResponse2005(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
|
||||
"""InlineResponse2005 - 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 InlineResponse2005. # noqa: E501
|
||||
|
||||
|
||||
:return: The sparklines of this InlineResponse2005. # noqa: E501
|
||||
:rtype: list[Metrics]
|
||||
"""
|
||||
return self._sparklines
|
||||
|
||||
@sparklines.setter
|
||||
def sparklines(self, sparklines):
|
||||
"""Sets the sparklines of this InlineResponse2005.
|
||||
|
||||
|
||||
:param sparklines: The sparklines of this InlineResponse2005. # 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(InlineResponse2005, 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, InlineResponse2005):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
110
sdk/python/sdk/zrok/zrok_api/models/verify_body.py
Normal file
110
sdk/python/sdk/zrok/zrok_api/models/verify_body.py
Normal 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 VerifyBody(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'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'token': 'token'
|
||||
}
|
||||
|
||||
def __init__(self, token=None): # noqa: E501
|
||||
"""VerifyBody - a model defined in Swagger""" # noqa: E501
|
||||
self._token = None
|
||||
self.discriminator = None
|
||||
if token is not None:
|
||||
self.token = token
|
||||
|
||||
@property
|
||||
def token(self):
|
||||
"""Gets the token of this VerifyBody. # noqa: E501
|
||||
|
||||
|
||||
:return: The token of this VerifyBody. # noqa: E501
|
||||
:rtype: str
|
||||
"""
|
||||
return self._token
|
||||
|
||||
@token.setter
|
||||
def token(self, token):
|
||||
"""Sets the token of this VerifyBody.
|
||||
|
||||
|
||||
:param token: The token of this VerifyBody. # noqa: E501
|
||||
:type: str
|
||||
"""
|
||||
|
||||
self._token = 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(VerifyBody, 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, VerifyBody):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
@ -206,12 +206,16 @@ paths:
|
||||
- name: body
|
||||
in: body
|
||||
schema:
|
||||
$ref: "#/definitions/verifyRequest"
|
||||
properties:
|
||||
token:
|
||||
type: string
|
||||
responses:
|
||||
200:
|
||||
description: token ready
|
||||
schema:
|
||||
$ref: "#/definitions/verifyResponse"
|
||||
properties:
|
||||
email:
|
||||
type: string
|
||||
404:
|
||||
description: token not found
|
||||
500:
|
||||
@ -1445,17 +1449,6 @@ definitions:
|
||||
items:
|
||||
type: string
|
||||
|
||||
verifyRequest:
|
||||
type: object
|
||||
properties:
|
||||
token:
|
||||
type: string
|
||||
verifyResponse:
|
||||
type: object
|
||||
properties:
|
||||
email:
|
||||
type: string
|
||||
|
||||
version:
|
||||
type: string
|
||||
|
||||
|
@ -24,7 +24,6 @@ models/EnvironmentAndResources.ts
|
||||
models/Frontend.ts
|
||||
models/GetSparklines200Response.ts
|
||||
models/GetSparklinesRequest.ts
|
||||
models/GrantsRequest.ts
|
||||
models/InviteRequest.ts
|
||||
models/InviteTokenGenerateRequest.ts
|
||||
models/ListMemberships200Response.ts
|
||||
@ -53,7 +52,6 @@ models/UnaccessRequest.ts
|
||||
models/UnshareRequest.ts
|
||||
models/UpdateFrontendRequest.ts
|
||||
models/UpdateShareRequest.ts
|
||||
models/VerifyRequest.ts
|
||||
models/VerifyResponse.ts
|
||||
models/Verify200Response.ts
|
||||
models/index.ts
|
||||
runtime.ts
|
||||
|
@ -21,8 +21,7 @@ import type {
|
||||
RegenerateToken200Response,
|
||||
RegenerateTokenRequest,
|
||||
RegisterRequest,
|
||||
VerifyRequest,
|
||||
VerifyResponse,
|
||||
Verify200Response,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ChangePasswordRequestFromJSON,
|
||||
@ -37,10 +36,8 @@ import {
|
||||
RegenerateTokenRequestToJSON,
|
||||
RegisterRequestFromJSON,
|
||||
RegisterRequestToJSON,
|
||||
VerifyRequestFromJSON,
|
||||
VerifyRequestToJSON,
|
||||
VerifyResponseFromJSON,
|
||||
VerifyResponseToJSON,
|
||||
Verify200ResponseFromJSON,
|
||||
Verify200ResponseToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface ChangePasswordOperationRequest {
|
||||
@ -71,8 +68,8 @@ export interface ResetPasswordRequestRequest {
|
||||
body?: RegenerateTokenRequest;
|
||||
}
|
||||
|
||||
export interface VerifyOperationRequest {
|
||||
body?: VerifyRequest;
|
||||
export interface VerifyRequest {
|
||||
body?: RegenerateToken200Response;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -279,7 +276,7 @@ export class AccountApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
*/
|
||||
async verifyRaw(requestParameters: VerifyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VerifyResponse>> {
|
||||
async verifyRaw(requestParameters: VerifyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Verify200Response>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@ -291,15 +288,15 @@ export class AccountApi extends runtime.BaseAPI {
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: VerifyRequestToJSON(requestParameters['body']),
|
||||
body: RegenerateToken200ResponseToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => VerifyResponseFromJSON(jsonValue));
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => Verify200ResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async verify(requestParameters: VerifyOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VerifyResponse> {
|
||||
async verify(requestParameters: VerifyRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Verify200Response> {
|
||||
const response = await this.verifyRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
@ -22,7 +22,6 @@ import type {
|
||||
CreateIdentityRequest,
|
||||
CreateOrganizationRequest,
|
||||
DeleteFrontendRequest,
|
||||
GrantsRequest,
|
||||
InviteTokenGenerateRequest,
|
||||
ListOrganizationMembers200Response,
|
||||
ListOrganizations200Response,
|
||||
@ -31,6 +30,7 @@ import type {
|
||||
RegenerateToken200Response,
|
||||
RemoveOrganizationMemberRequest,
|
||||
UpdateFrontendRequest,
|
||||
Verify200Response,
|
||||
} from '../models/index';
|
||||
import {
|
||||
AddOrganizationMemberRequestFromJSON,
|
||||
@ -47,8 +47,6 @@ import {
|
||||
CreateOrganizationRequestToJSON,
|
||||
DeleteFrontendRequestFromJSON,
|
||||
DeleteFrontendRequestToJSON,
|
||||
GrantsRequestFromJSON,
|
||||
GrantsRequestToJSON,
|
||||
InviteTokenGenerateRequestFromJSON,
|
||||
InviteTokenGenerateRequestToJSON,
|
||||
ListOrganizationMembers200ResponseFromJSON,
|
||||
@ -65,6 +63,8 @@ import {
|
||||
RemoveOrganizationMemberRequestToJSON,
|
||||
UpdateFrontendRequestFromJSON,
|
||||
UpdateFrontendRequestToJSON,
|
||||
Verify200ResponseFromJSON,
|
||||
Verify200ResponseToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface AddOrganizationMemberOperationRequest {
|
||||
@ -95,8 +95,8 @@ export interface DeleteOrganizationRequest {
|
||||
body?: RegenerateToken200Response;
|
||||
}
|
||||
|
||||
export interface GrantsOperationRequest {
|
||||
body?: GrantsRequest;
|
||||
export interface GrantsRequest {
|
||||
body?: Verify200Response;
|
||||
}
|
||||
|
||||
export interface InviteTokenGenerateOperationRequest {
|
||||
@ -336,7 +336,7 @@ export class AdminApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
*/
|
||||
async grantsRaw(requestParameters: GrantsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
async grantsRaw(requestParameters: GrantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
@ -352,7 +352,7 @@ export class AdminApi extends runtime.BaseAPI {
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: GrantsRequestToJSON(requestParameters['body']),
|
||||
body: Verify200ResponseToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
@ -360,7 +360,7 @@ export class AdminApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
*/
|
||||
async grants(requestParameters: GrantsOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
||||
async grants(requestParameters: GrantsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
||||
await this.grantsRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
|
60
ui/src/api/models/Verify200Response.ts
Normal file
60
ui/src/api/models/Verify200Response.ts
Normal file
@ -0,0 +1,60 @@
|
||||
/* 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 Verify200Response
|
||||
*/
|
||||
export interface Verify200Response {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Verify200Response
|
||||
*/
|
||||
email?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the Verify200Response interface.
|
||||
*/
|
||||
export function instanceOfVerify200Response(value: object): value is Verify200Response {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function Verify200ResponseFromJSON(json: any): Verify200Response {
|
||||
return Verify200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function Verify200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): Verify200Response {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'email': json['email'] == null ? undefined : json['email'],
|
||||
};
|
||||
}
|
||||
|
||||
export function Verify200ResponseToJSON(value?: Verify200Response | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'email': value['email'],
|
||||
};
|
||||
}
|
||||
|
@ -19,7 +19,6 @@ export * from './EnvironmentAndResources';
|
||||
export * from './Frontend';
|
||||
export * from './GetSparklines200Response';
|
||||
export * from './GetSparklinesRequest';
|
||||
export * from './GrantsRequest';
|
||||
export * from './InviteRequest';
|
||||
export * from './InviteTokenGenerateRequest';
|
||||
export * from './ListMemberships200Response';
|
||||
@ -48,5 +47,4 @@ export * from './UnaccessRequest';
|
||||
export * from './UnshareRequest';
|
||||
export * from './UpdateFrontendRequest';
|
||||
export * from './UpdateShareRequest';
|
||||
export * from './VerifyRequest';
|
||||
export * from './VerifyResponse';
|
||||
export * from './Verify200Response';
|
||||
|
Loading…
x
Reference in New Issue
Block a user