registration, invite, and organization tokens (#820, #834)

This commit is contained in:
Michael Quigley 2025-02-04 14:35:23 -05:00
parent 598bfcc571
commit 3a08a840e3
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
36 changed files with 150 additions and 154 deletions

View File

@ -53,7 +53,7 @@ func (cmd *adminGenerateCommand) run(_ *cobra.Command, args []string) {
panic(err)
}
req := admin.NewInviteTokenGenerateParams()
req.Body.Tokens = tokens
req.Body.InviteTokens = tokens
_, err = zrok.Admin.InviteTokenGenerate(req, mustGetAdminAuth())
if err != nil {

View File

@ -41,7 +41,7 @@ func (cmd *adminListOrgMembersCommand) run(_ *cobra.Command, args []string) {
}
req := admin.NewListOrganizationMembersParams()
req.Body.Token = args[0]
req.Body.OrganizationToken = args[0]
resp, err := zrok.Admin.ListOrganizationMembers(req, mustGetAdminAuth())
if err != nil {

View File

@ -66,7 +66,7 @@ func (c *orgMembershipsCommand) run(_ *cobra.Command, _ []string) {
t.SetStyle(table.StyleColoredDark)
t.AppendHeader(table.Row{"Organization Token", "Description", "Admin?"})
for _, i := range in.Payload.Memberships {
t.AppendRow(table.Row{i.Token, i.Description, i.Admin})
t.AppendRow(table.Row{i.OrganizationToken, i.Description, i.Admin})
}
t.Render()
fmt.Println()

View File

@ -22,14 +22,14 @@ func (handler *inviteTokenGenerateHandler) Handle(params admin.InviteTokenGenera
return admin.NewInviteTokenGenerateUnauthorized()
}
if len(params.Body.Tokens) == 0 {
if len(params.Body.InviteTokens) == 0 {
logrus.Error("missing tokens")
return admin.NewInviteTokenGenerateBadRequest()
}
logrus.Infof("received invite generate request with %d tokens", len(params.Body.Tokens))
logrus.Infof("received invite generate request with %d tokens", len(params.Body.InviteTokens))
invites := make([]*store.InviteToken, len(params.Body.Tokens))
for i, token := range params.Body.Tokens {
invites := make([]*store.InviteToken, len(params.Body.InviteTokens))
for i, token := range params.Body.InviteTokens {
invites[i] = &store.InviteToken{
Token: token,
}

View File

@ -29,7 +29,7 @@ func (h *listMembershipsHandler) Handle(_ metadata.ListMembershipsParams, princi
var out []*metadata.ListMembershipsOKBodyMembershipsItems0
for _, om := range oms {
out = append(out, &metadata.ListMembershipsOKBodyMembershipsItems0{Token: om.Token, Description: om.Description, Admin: om.Admin})
out = append(out, &metadata.ListMembershipsOKBodyMembershipsItems0{OrganizationToken: om.Token, Description: om.Description, Admin: om.Admin})
}
return metadata.NewListMembershipsOK().WithPayload(&metadata.ListMembershipsOKBody{Memberships: out})
}

View File

@ -26,13 +26,13 @@ func (h *listOrganizationMembersHandler) Handle(params admin.ListOrganizationMem
}
defer func() { _ = trx.Rollback() }()
org, err := str.FindOrganizationByToken(params.Body.Token, trx)
org, err := str.FindOrganizationByToken(params.Body.OrganizationToken, trx)
if err != nil {
logrus.Errorf("error finding organization by token: %v", err)
return admin.NewListOrganizationMembersNotFound()
}
if org == nil {
logrus.Errorf("organization '%v' not found", params.Body.Token)
logrus.Errorf("organization '%v' not found", params.Body.OrganizationToken)
return admin.NewListOrganizationMembersNotFound()
}

View File

@ -13,8 +13,8 @@ func newVerifyHandler() *verifyHandler {
}
func (h *verifyHandler) Handle(params account.VerifyParams) middleware.Responder {
if params.Body.Token != "" {
logrus.Debugf("received verify request for token '%v'", params.Body.Token)
if params.Body.RegistrationToken != "" {
logrus.Debugf("received verify request for registration token '%v'", params.Body.RegistrationToken)
tx, err := str.Begin()
if err != nil {
logrus.Errorf("error starting transaction: %v", err)
@ -22,9 +22,9 @@ func (h *verifyHandler) Handle(params account.VerifyParams) middleware.Responder
}
defer func() { _ = tx.Rollback() }()
ar, err := str.FindAccountRequestWithToken(params.Body.Token, tx)
ar, err := str.FindAccountRequestWithToken(params.Body.RegistrationToken, tx)
if err != nil {
logrus.Errorf("error finding account request with token '%v': %v", params.Body.Token, err)
logrus.Errorf("error finding account request with registration token '%v': %v", params.Body.RegistrationToken, err)
return account.NewVerifyNotFound()
}

View File

@ -54,7 +54,7 @@ func NewVerifyOK() *VerifyOK {
/*
VerifyOK describes a response with status code 200, with default header values.
token ready
registration token ready
*/
type VerifyOK struct {
Payload *VerifyOKBody
@ -122,7 +122,7 @@ func NewVerifyNotFound() *VerifyNotFound {
/*
VerifyNotFound describes a response with status code 404, with default header values.
token not found
registration token not found
*/
type VerifyNotFound struct {
}
@ -232,8 +232,8 @@ swagger:model VerifyBody
*/
type VerifyBody struct {
// token
Token string `json:"token,omitempty"`
// registration token
RegistrationToken string `json:"registrationToken,omitempty"`
}
// Validate validates this verify body

View File

@ -59,7 +59,7 @@ func NewInviteTokenGenerateCreated() *InviteTokenGenerateCreated {
/*
InviteTokenGenerateCreated describes a response with status code 201, with default header values.
invitation tokens created
invite tokens created
*/
type InviteTokenGenerateCreated struct {
}
@ -115,7 +115,7 @@ func NewInviteTokenGenerateBadRequest() *InviteTokenGenerateBadRequest {
/*
InviteTokenGenerateBadRequest describes a response with status code 400, with default header values.
invitation tokens not created
invite tokens not created
*/
type InviteTokenGenerateBadRequest struct {
}
@ -281,8 +281,8 @@ swagger:model InviteTokenGenerateBody
*/
type InviteTokenGenerateBody struct {
// tokens
Tokens []string `json:"tokens"`
// invite tokens
InviteTokens []string `json:"inviteTokens"`
}
// Validate validates this invite token generate body

View File

@ -296,8 +296,8 @@ swagger:model ListOrganizationMembersBody
*/
type ListOrganizationMembersBody struct {
// token
Token string `json:"token,omitempty"`
// organization token
OrganizationToken string `json:"organizationToken,omitempty"`
}
// Validate validates this list organization members body

View File

@ -285,8 +285,8 @@ type ListMembershipsOKBodyMembershipsItems0 struct {
// description
Description string `json:"description,omitempty"`
// token
Token string `json:"token,omitempty"`
// organization token
OrganizationToken string `json:"organizationToken,omitempty"`
}
// Validate validates this list memberships o k body memberships items0

View File

@ -775,7 +775,7 @@ func init() {
"in": "body",
"schema": {
"properties": {
"tokens": {
"inviteTokens": {
"type": "array",
"items": {
"type": "string"
@ -787,10 +787,10 @@ func init() {
],
"responses": {
"201": {
"description": "invitation tokens created"
"description": "invite tokens created"
},
"400": {
"description": "invitation tokens not created"
"description": "invite tokens not created"
},
"401": {
"description": "unauthorized"
@ -911,7 +911,7 @@ func init() {
"description": {
"type": "string"
},
"token": {
"organizationToken": {
"type": "string"
}
}
@ -1191,7 +1191,7 @@ func init() {
"in": "body",
"schema": {
"properties": {
"token": {
"organizationToken": {
"type": "string"
}
}
@ -1818,7 +1818,7 @@ func init() {
"in": "body",
"schema": {
"properties": {
"token": {
"registrationToken": {
"type": "string"
}
}
@ -1827,7 +1827,7 @@ func init() {
],
"responses": {
"200": {
"description": "token ready",
"description": "registration token ready",
"schema": {
"properties": {
"email": {
@ -1837,7 +1837,7 @@ func init() {
}
},
"404": {
"description": "token not found"
"description": "registration token not found"
},
"500": {
"description": "internal server error"
@ -2952,7 +2952,7 @@ func init() {
"in": "body",
"schema": {
"properties": {
"tokens": {
"inviteTokens": {
"type": "array",
"items": {
"type": "string"
@ -2964,10 +2964,10 @@ func init() {
],
"responses": {
"201": {
"description": "invitation tokens created"
"description": "invite tokens created"
},
"400": {
"description": "invitation tokens not created"
"description": "invite tokens not created"
},
"401": {
"description": "unauthorized"
@ -3351,7 +3351,7 @@ func init() {
"in": "body",
"schema": {
"properties": {
"token": {
"organizationToken": {
"type": "string"
}
}
@ -3964,7 +3964,7 @@ func init() {
"in": "body",
"schema": {
"properties": {
"token": {
"registrationToken": {
"type": "string"
}
}
@ -3973,7 +3973,7 @@ func init() {
],
"responses": {
"200": {
"description": "token ready",
"description": "registration token ready",
"schema": {
"properties": {
"email": {
@ -3983,7 +3983,7 @@ func init() {
}
},
"404": {
"description": "token not found"
"description": "registration token not found"
},
"500": {
"description": "internal server error"
@ -4050,7 +4050,7 @@ func init() {
"description": {
"type": "string"
},
"token": {
"organizationToken": {
"type": "string"
}
}

View File

@ -63,8 +63,8 @@ func (o *Verify) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
// swagger:model VerifyBody
type VerifyBody struct {
// token
Token string `json:"token,omitempty"`
// registration token
RegistrationToken string `json:"registrationToken,omitempty"`
}
// Validate validates this verify body

View File

@ -15,7 +15,7 @@ import (
const VerifyOKCode int = 200
/*
VerifyOK token ready
VerifyOK registration token ready
swagger:response verifyOK
*/
@ -60,7 +60,7 @@ func (o *VerifyOK) WriteResponse(rw http.ResponseWriter, producer runtime.Produc
const VerifyNotFoundCode int = 404
/*
VerifyNotFound token not found
VerifyNotFound registration token not found
swagger:response verifyNotFound
*/

View File

@ -78,8 +78,8 @@ func (o *InviteTokenGenerate) ServeHTTP(rw http.ResponseWriter, r *http.Request)
// swagger:model InviteTokenGenerateBody
type InviteTokenGenerateBody struct {
// tokens
Tokens []string `json:"tokens"`
// invite tokens
InviteTokens []string `json:"inviteTokens"`
}
// Validate validates this invite token generate body

View File

@ -15,7 +15,7 @@ import (
const InviteTokenGenerateCreatedCode int = 201
/*
InviteTokenGenerateCreated invitation tokens created
InviteTokenGenerateCreated invite tokens created
swagger:response inviteTokenGenerateCreated
*/
@ -40,7 +40,7 @@ func (o *InviteTokenGenerateCreated) WriteResponse(rw http.ResponseWriter, produ
const InviteTokenGenerateBadRequestCode int = 400
/*
InviteTokenGenerateBadRequest invitation tokens not created
InviteTokenGenerateBadRequest invite tokens not created
swagger:response inviteTokenGenerateBadRequest
*/

View File

@ -80,8 +80,8 @@ func (o *ListOrganizationMembers) ServeHTTP(rw http.ResponseWriter, r *http.Requ
// swagger:model ListOrganizationMembersBody
type ListOrganizationMembersBody struct {
// token
Token string `json:"token,omitempty"`
// organization token
OrganizationToken string `json:"organizationToken,omitempty"`
}
// Validate validates this list organization members body

View File

@ -192,8 +192,8 @@ type ListMembershipsOKBodyMembershipsItems0 struct {
// description
Description string `json:"description,omitempty"`
// token
Token string `json:"token,omitempty"`
// organization token
OrganizationToken string `json:"organizationToken,omitempty"`
}
// Validate validates this list memberships o k body memberships items0

View File

@ -31,7 +31,6 @@ import { RegenerateAccountToken200Response } from '../model/regenerateAccountTok
import { RemoveOrganizationMemberRequest } from '../model/removeOrganizationMemberRequest';
import { UpdateFrontendRequest } from '../model/updateFrontendRequest';
import { Verify200Response } from '../model/verify200Response';
import { VerifyRequest } from '../model/verifyRequest';
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
@ -727,7 +726,7 @@ export class AdminApi {
*
* @param body
*/
public async listOrganizationMembers (body?: VerifyRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ListOrganizationMembers200Response; }> {
public async listOrganizationMembers (body?: CreateOrganization201Response, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ListOrganizationMembers200Response; }> {
const localVarPath = this.basePath + '/organization/list';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
@ -751,7 +750,7 @@ export class AdminApi {
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(body, "VerifyRequest")
body: ObjectSerializer.serialize(body, "CreateOrganization201Response")
};
let authenticationPromise = Promise.resolve();

View File

@ -13,14 +13,14 @@
import { RequestFile } from './models';
export class InviteTokenGenerateRequest {
'tokens'?: Array<string>;
'inviteTokens'?: Array<string>;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "tokens",
"baseName": "tokens",
"name": "inviteTokens",
"baseName": "inviteTokens",
"type": "Array<string>"
} ];

View File

@ -13,7 +13,7 @@
import { RequestFile } from './models';
export class ListMemberships200ResponseMembershipsInner {
'token'?: string;
'organizationToken'?: string;
'description'?: string;
'admin'?: boolean;
@ -21,8 +21,8 @@ export class ListMemberships200ResponseMembershipsInner {
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "token",
"baseName": "token",
"name": "organizationToken",
"baseName": "organizationToken",
"type": "string"
},
{

View File

@ -13,14 +13,14 @@
import { RequestFile } from './models';
export class VerifyRequest {
'token'?: string;
'registrationToken'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "token",
"baseName": "token",
"name": "registrationToken",
"baseName": "registrationToken",
"type": "string"
} ];

View File

@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | **str** | | [optional]
**organization_token** | **str** | | [optional]
**description** | **str** | | [optional]
**admin** | **bool** | | [optional]

View File

@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | **str** | | [optional]
**organization_token** | **str** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**tokens** | **list[str]** | | [optional]
**invite_tokens** | **list[str]** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | **str** | | [optional]
**registration_token** | **str** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -28,50 +28,50 @@ class InlineResponse2005Memberships(object):
and the value is json key in definition.
"""
swagger_types = {
'token': 'str',
'organization_token': 'str',
'description': 'str',
'admin': 'bool'
}
attribute_map = {
'token': 'token',
'organization_token': 'organizationToken',
'description': 'description',
'admin': 'admin'
}
def __init__(self, token=None, description=None, admin=None): # noqa: E501
def __init__(self, organization_token=None, description=None, admin=None): # noqa: E501
"""InlineResponse2005Memberships - a model defined in Swagger""" # noqa: E501
self._token = None
self._organization_token = None
self._description = None
self._admin = None
self.discriminator = None
if token is not None:
self.token = token
if organization_token is not None:
self.organization_token = organization_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
def organization_token(self):
"""Gets the organization_token of this InlineResponse2005Memberships. # noqa: E501
:return: The token of this InlineResponse2005Memberships. # noqa: E501
:return: The organization_token of this InlineResponse2005Memberships. # noqa: E501
:rtype: str
"""
return self._token
return self._organization_token
@token.setter
def token(self, token):
"""Sets the token of this InlineResponse2005Memberships.
@organization_token.setter
def organization_token(self, organization_token):
"""Sets the organization_token of this InlineResponse2005Memberships.
:param token: The token of this InlineResponse2005Memberships. # noqa: E501
:param organization_token: The organization_token of this InlineResponse2005Memberships. # noqa: E501
:type: str
"""
self._token = token
self._organization_token = organization_token
@property
def description(self):

View File

@ -28,40 +28,40 @@ class OrganizationListBody(object):
and the value is json key in definition.
"""
swagger_types = {
'token': 'str'
'organization_token': 'str'
}
attribute_map = {
'token': 'token'
'organization_token': 'organizationToken'
}
def __init__(self, token=None): # noqa: E501
def __init__(self, organization_token=None): # noqa: E501
"""OrganizationListBody - a model defined in Swagger""" # noqa: E501
self._token = None
self._organization_token = None
self.discriminator = None
if token is not None:
self.token = token
if organization_token is not None:
self.organization_token = organization_token
@property
def token(self):
"""Gets the token of this OrganizationListBody. # noqa: E501
def organization_token(self):
"""Gets the organization_token of this OrganizationListBody. # noqa: E501
:return: The token of this OrganizationListBody. # noqa: E501
:return: The organization_token of this OrganizationListBody. # noqa: E501
:rtype: str
"""
return self._token
return self._organization_token
@token.setter
def token(self, token):
"""Sets the token of this OrganizationListBody.
@organization_token.setter
def organization_token(self, organization_token):
"""Sets the organization_token of this OrganizationListBody.
:param token: The token of this OrganizationListBody. # noqa: E501
:param organization_token: The organization_token of this OrganizationListBody. # noqa: E501
:type: str
"""
self._token = token
self._organization_token = organization_token
def to_dict(self):
"""Returns the model properties as a dict"""

View File

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

View File

@ -28,40 +28,40 @@ class VerifyBody(object):
and the value is json key in definition.
"""
swagger_types = {
'token': 'str'
'registration_token': 'str'
}
attribute_map = {
'token': 'token'
'registration_token': 'registrationToken'
}
def __init__(self, token=None): # noqa: E501
def __init__(self, registration_token=None): # noqa: E501
"""VerifyBody - a model defined in Swagger""" # noqa: E501
self._token = None
self._registration_token = None
self.discriminator = None
if token is not None:
self.token = token
if registration_token is not None:
self.registration_token = registration_token
@property
def token(self):
"""Gets the token of this VerifyBody. # noqa: E501
def registration_token(self):
"""Gets the registration_token of this VerifyBody. # noqa: E501
:return: The token of this VerifyBody. # noqa: E501
:return: The registration_token of this VerifyBody. # noqa: E501
:rtype: str
"""
return self._token
return self._registration_token
@token.setter
def token(self, token):
"""Sets the token of this VerifyBody.
@registration_token.setter
def registration_token(self, registration_token):
"""Sets the registration_token of this VerifyBody.
:param token: The token of this VerifyBody. # noqa: E501
:param registration_token: The registration_token of this VerifyBody. # noqa: E501
:type: str
"""
self._token = token
self._registration_token = registration_token
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@ -207,17 +207,17 @@ paths:
in: body
schema:
properties:
token:
registrationToken:
type: string
responses:
200:
description: token ready
description: registration token ready
schema:
properties:
email:
type: string
404:
description: token not found
description: registration token not found
500:
description: internal server error
@ -438,15 +438,15 @@ paths:
in: body
schema:
properties:
tokens:
inviteTokens:
type: array
items:
type: string
responses:
201:
description: invitation tokens created
description: invite tokens created
400:
description: invitation tokens not created
description: invite tokens not created
401:
description: unauthorized
500:
@ -540,7 +540,7 @@ paths:
in: body
schema:
properties:
token:
organizationToken:
type: string
responses:
200:
@ -817,7 +817,7 @@ paths:
type: array
items:
properties:
token:
organizationToken:
type: string
description:
type: string

View File

@ -186,7 +186,7 @@ const Register = () => {
new AccountApi().register({body: {token: regToken, password: v.password}})
.then(d => {
console.log(d);
setComponent(<RegistrationComplete token={d.token!} />);
setComponent(<RegistrationComplete token={d.accountToken!} />);
})
.catch(e => {
console.log("doRegistration", e);
@ -195,7 +195,7 @@ const Register = () => {
useEffect(() => {
if(regToken) {
new AccountApi().verify({body: {token: regToken}})
new AccountApi().verify({body: {registrationToken: regToken}})
.then((d) => {
console.log(d);
setEmail(d.email);

View File

@ -31,7 +31,6 @@ import type {
RemoveOrganizationMemberRequest,
UpdateFrontendRequest,
Verify200Response,
VerifyRequest,
} from '../models/index';
import {
AddOrganizationMemberRequestFromJSON,
@ -66,8 +65,6 @@ import {
UpdateFrontendRequestToJSON,
Verify200ResponseFromJSON,
Verify200ResponseToJSON,
VerifyRequestFromJSON,
VerifyRequestToJSON,
} from '../models/index';
export interface AddOrganizationMemberOperationRequest {
@ -107,7 +104,7 @@ export interface InviteTokenGenerateOperationRequest {
}
export interface ListOrganizationMembersRequest {
body?: VerifyRequest;
body?: CreateOrganization201Response;
}
export interface RemoveOrganizationMemberOperationRequest {
@ -443,7 +440,7 @@ export class AdminApi extends runtime.BaseAPI {
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: VerifyRequestToJSON(requestParameters['body']),
body: CreateOrganization201ResponseToJSON(requestParameters['body']),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => ListOrganizationMembers200ResponseFromJSON(jsonValue));

View File

@ -24,7 +24,7 @@ export interface InviteTokenGenerateRequest {
* @type {Array<string>}
* @memberof InviteTokenGenerateRequest
*/
tokens?: Array<string>;
inviteTokens?: Array<string>;
}
/**
@ -44,7 +44,7 @@ export function InviteTokenGenerateRequestFromJSONTyped(json: any, ignoreDiscrim
}
return {
'tokens': json['tokens'] == null ? undefined : json['tokens'],
'inviteTokens': json['inviteTokens'] == null ? undefined : json['inviteTokens'],
};
}
@ -54,7 +54,7 @@ export function InviteTokenGenerateRequestToJSON(value?: InviteTokenGenerateRequ
}
return {
'tokens': value['tokens'],
'inviteTokens': value['inviteTokens'],
};
}

View File

@ -24,7 +24,7 @@ export interface ListMemberships200ResponseMembershipsInner {
* @type {string}
* @memberof ListMemberships200ResponseMembershipsInner
*/
token?: string;
organizationToken?: string;
/**
*
* @type {string}
@ -56,7 +56,7 @@ export function ListMemberships200ResponseMembershipsInnerFromJSONTyped(json: an
}
return {
'token': json['token'] == null ? undefined : json['token'],
'organizationToken': json['organizationToken'] == null ? undefined : json['organizationToken'],
'description': json['description'] == null ? undefined : json['description'],
'admin': json['admin'] == null ? undefined : json['admin'],
};
@ -68,7 +68,7 @@ export function ListMemberships200ResponseMembershipsInnerToJSON(value?: ListMem
}
return {
'token': value['token'],
'organizationToken': value['organizationToken'],
'description': value['description'],
'admin': value['admin'],
};

View File

@ -24,7 +24,7 @@ export interface VerifyRequest {
* @type {string}
* @memberof VerifyRequest
*/
token?: string;
registrationToken?: string;
}
/**
@ -44,7 +44,7 @@ export function VerifyRequestFromJSONTyped(json: any, ignoreDiscriminator: boole
}
return {
'token': json['token'] == null ? undefined : json['token'],
'registrationToken': json['registrationToken'] == null ? undefined : json['registrationToken'],
};
}
@ -54,7 +54,7 @@ export function VerifyRequestToJSON(value?: VerifyRequest | null): any {
}
return {
'token': value['token'],
'registrationToken': value['registrationToken'],
};
}