organization toke (#820, #834)

This commit is contained in:
Michael Quigley 2025-02-04 14:26:27 -05:00
parent 09fdb92861
commit 598bfcc571
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
56 changed files with 454 additions and 192 deletions

View File

@ -41,7 +41,7 @@ func (cmd *adminCreateOrgMemberCommand) run(_ *cobra.Command, args []string) {
} }
req := admin.NewAddOrganizationMemberParams() req := admin.NewAddOrganizationMemberParams()
req.Body.Token = args[0] req.Body.OrganizationToken = args[0]
req.Body.Email = args[1] req.Body.Email = args[1]
req.Body.Admin = cmd.admin req.Body.Admin = cmd.admin

View File

@ -48,5 +48,5 @@ func (cmd *adminCreateOrganizationCommand) run(_ *cobra.Command, _ []string) {
panic(err) panic(err)
} }
logrus.Infof("created new organization with token '%v'", resp.Payload.Token) logrus.Infof("created new organization with organization token '%v'", resp.Payload.OrganizationToken)
} }

View File

@ -39,7 +39,7 @@ func (cmd *adminDeleteOrgMemberCommand) run(_ *cobra.Command, args []string) {
} }
req := admin.NewRemoveOrganizationMemberParams() req := admin.NewRemoveOrganizationMemberParams()
req.Body.Token = args[0] req.Body.OrganizationToken = args[0]
req.Body.Email = args[1] req.Body.Email = args[1]
_, err = zrok.Admin.RemoveOrganizationMember(req, mustGetAdminAuth()) _, err = zrok.Admin.RemoveOrganizationMember(req, mustGetAdminAuth())

View File

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

View File

@ -52,7 +52,7 @@ func (c *adminListOrganizationsCommand) run(_ *cobra.Command, _ []string) {
t.SetStyle(table.StyleColoredDark) t.SetStyle(table.StyleColoredDark)
t.AppendHeader(table.Row{"Organization Token", "Description"}) t.AppendHeader(table.Row{"Organization Token", "Description"})
for _, org := range resp.Payload.Organizations { for _, org := range resp.Payload.Organizations {
t.AppendRow(table.Row{org.Token, org.Description}) t.AppendRow(table.Row{org.OrganizationToken, org.Description})
} }
t.Render() t.Render()
fmt.Println() fmt.Println()

View File

@ -32,9 +32,9 @@ func (h *addOrganizationMemberHandler) Handle(params admin.AddOrganizationMember
return admin.NewAddOrganizationMemberNotFound() return admin.NewAddOrganizationMemberNotFound()
} }
org, err := str.FindOrganizationByToken(params.Body.Token, trx) org, err := str.FindOrganizationByToken(params.Body.OrganizationToken, trx)
if err != nil { if err != nil {
logrus.Errorf("error finding organization '%v': %v", params.Body.Token, err) logrus.Errorf("error finding organization '%v': %v", params.Body.OrganizationToken, err)
return admin.NewAddOrganizationMemberNotFound() return admin.NewAddOrganizationMemberNotFound()
} }

View File

@ -49,5 +49,5 @@ func (h *createOrganizationHandler) Handle(params admin.CreateOrganizationParams
logrus.Infof("added organzation '%v' with description '%v'", org.Token, org.Description) logrus.Infof("added organzation '%v' with description '%v'", org.Token, org.Description)
return admin.NewCreateOrganizationCreated().WithPayload(&admin.CreateOrganizationCreatedBody{Token: org.Token}) return admin.NewCreateOrganizationCreated().WithPayload(&admin.CreateOrganizationCreatedBody{OrganizationToken: org.Token})
} }

View File

@ -26,7 +26,7 @@ func (h *deleteOrganizationHandler) Handle(params admin.DeleteOrganizationParams
} }
defer func() { _ = trx.Rollback() }() defer func() { _ = trx.Rollback() }()
org, err := str.FindOrganizationByToken(params.Body.Token, trx) org, err := str.FindOrganizationByToken(params.Body.OrganizationToken, trx)
if err != nil { if err != nil {
logrus.Errorf("error finding organization by token: %v", err) logrus.Errorf("error finding organization by token: %v", err)
return admin.NewDeleteOrganizationNotFound() return admin.NewDeleteOrganizationNotFound()

View File

@ -34,7 +34,7 @@ func (h *listOrganizationsHandler) Handle(_ admin.ListOrganizationsParams, princ
var out []*admin.ListOrganizationsOKBodyOrganizationsItems0 var out []*admin.ListOrganizationsOKBodyOrganizationsItems0
for _, org := range orgs { for _, org := range orgs {
out = append(out, &admin.ListOrganizationsOKBodyOrganizationsItems0{Description: org.Description, Token: org.Token}) out = append(out, &admin.ListOrganizationsOKBodyOrganizationsItems0{Description: org.Description, OrganizationToken: org.Token})
} }
return admin.NewListOrganizationsOK().WithPayload(&admin.ListOrganizationsOKBody{Organizations: out}) return admin.NewListOrganizationsOK().WithPayload(&admin.ListOrganizationsOKBody{Organizations: out})
} }

View File

@ -32,9 +32,9 @@ func (h *removeOrganizationMemberHandler) Handle(params admin.RemoveOrganization
return admin.NewAddOrganizationMemberNotFound() return admin.NewAddOrganizationMemberNotFound()
} }
org, err := str.FindOrganizationByToken(params.Body.Token, trx) org, err := str.FindOrganizationByToken(params.Body.OrganizationToken, trx)
if err != nil { if err != nil {
logrus.Errorf("error finding organization '%v': %v", params.Body.Token, err) logrus.Errorf("error finding organization '%v': %v", params.Body.OrganizationToken, err)
return admin.NewAddOrganizationMemberNotFound() return admin.NewAddOrganizationMemberNotFound()
} }

View File

@ -287,8 +287,8 @@ type AddOrganizationMemberBody struct {
// email // email
Email string `json:"email,omitempty"` Email string `json:"email,omitempty"`
// token // organization token
Token string `json:"token,omitempty"` OrganizationToken string `json:"organizationToken,omitempty"`
} }
// Validate validates this add organization member body // Validate validates this add organization member body

View File

@ -270,8 +270,8 @@ swagger:model CreateOrganizationCreatedBody
*/ */
type CreateOrganizationCreatedBody struct { type CreateOrganizationCreatedBody struct {
// token // organization token
Token string `json:"token,omitempty"` OrganizationToken string `json:"organizationToken,omitempty"`
} }
// Validate validates this create organization created body // Validate validates this create organization created body

View File

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

View File

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

View File

@ -284,8 +284,8 @@ type RemoveOrganizationMemberBody struct {
// email // email
Email string `json:"email,omitempty"` Email string `json:"email,omitempty"`
// token // organization token
Token string `json:"token,omitempty"` OrganizationToken string `json:"organizationToken,omitempty"`
} }
// Validate validates this remove organization member body // Validate validates this remove organization member body

View File

@ -1075,7 +1075,7 @@ func init() {
"description": "organization created", "description": "organization created",
"schema": { "schema": {
"properties": { "properties": {
"token": { "organizationToken": {
"type": "string" "type": "string"
} }
} }
@ -1105,7 +1105,7 @@ func init() {
"in": "body", "in": "body",
"schema": { "schema": {
"properties": { "properties": {
"token": { "organizationToken": {
"type": "string" "type": "string"
} }
} }
@ -1151,7 +1151,7 @@ func init() {
"email": { "email": {
"type": "string" "type": "string"
}, },
"token": { "organizationToken": {
"type": "string" "type": "string"
} }
} }
@ -1251,7 +1251,7 @@ func init() {
"email": { "email": {
"type": "string" "type": "string"
}, },
"token": { "organizationToken": {
"type": "string" "type": "string"
} }
} }
@ -1297,7 +1297,7 @@ func init() {
"description": { "description": {
"type": "string" "type": "string"
}, },
"token": { "organizationToken": {
"type": "string" "type": "string"
} }
} }
@ -3235,7 +3235,7 @@ func init() {
"description": "organization created", "description": "organization created",
"schema": { "schema": {
"properties": { "properties": {
"token": { "organizationToken": {
"type": "string" "type": "string"
} }
} }
@ -3265,7 +3265,7 @@ func init() {
"in": "body", "in": "body",
"schema": { "schema": {
"properties": { "properties": {
"token": { "organizationToken": {
"type": "string" "type": "string"
} }
} }
@ -3311,7 +3311,7 @@ func init() {
"email": { "email": {
"type": "string" "type": "string"
}, },
"token": { "organizationToken": {
"type": "string" "type": "string"
} }
} }
@ -3404,7 +3404,7 @@ func init() {
"email": { "email": {
"type": "string" "type": "string"
}, },
"token": { "organizationToken": {
"type": "string" "type": "string"
} }
} }
@ -4060,7 +4060,7 @@ func init() {
"description": { "description": {
"type": "string" "type": "string"
}, },
"token": { "organizationToken": {
"type": "string" "type": "string"
} }
} }

View File

@ -84,8 +84,8 @@ type AddOrganizationMemberBody struct {
// email // email
Email string `json:"email,omitempty"` Email string `json:"email,omitempty"`
// token // organization token
Token string `json:"token,omitempty"` OrganizationToken string `json:"organizationToken,omitempty"`
} }
// Validate validates this add organization member body // Validate validates this add organization member body

View File

@ -115,8 +115,8 @@ func (o *CreateOrganizationBody) UnmarshalBinary(b []byte) error {
// swagger:model CreateOrganizationCreatedBody // swagger:model CreateOrganizationCreatedBody
type CreateOrganizationCreatedBody struct { type CreateOrganizationCreatedBody struct {
// token // organization token
Token string `json:"token,omitempty"` OrganizationToken string `json:"organizationToken,omitempty"`
} }
// Validate validates this create organization created body // Validate validates this create organization created body

View File

@ -78,8 +78,8 @@ func (o *DeleteOrganization) ServeHTTP(rw http.ResponseWriter, r *http.Request)
// swagger:model DeleteOrganizationBody // swagger:model DeleteOrganizationBody
type DeleteOrganizationBody struct { type DeleteOrganizationBody struct {
// token // organization token
Token string `json:"token,omitempty"` OrganizationToken string `json:"organizationToken,omitempty"`
} }
// Validate validates this delete organization body // Validate validates this delete organization body

View File

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

View File

@ -81,8 +81,8 @@ type RemoveOrganizationMemberBody struct {
// email // email
Email string `json:"email,omitempty"` Email string `json:"email,omitempty"`
// token // organization token
Token string `json:"token,omitempty"` OrganizationToken string `json:"organizationToken,omitempty"`
} }
// Validate validates this remove organization member body // Validate validates this remove organization member body

View File

@ -17,6 +17,7 @@ model/createFrontend201Response.ts
model/createFrontendRequest.ts model/createFrontendRequest.ts
model/createIdentity201Response.ts model/createIdentity201Response.ts
model/createIdentityRequest.ts model/createIdentityRequest.ts
model/createOrganization201Response.ts
model/createOrganizationRequest.ts model/createOrganizationRequest.ts
model/disableRequest.ts model/disableRequest.ts
model/enableRequest.ts model/enableRequest.ts

View File

@ -20,6 +20,7 @@ import { CreateFrontend201Response } from '../model/createFrontend201Response';
import { CreateFrontendRequest } from '../model/createFrontendRequest'; import { CreateFrontendRequest } from '../model/createFrontendRequest';
import { CreateIdentity201Response } from '../model/createIdentity201Response'; import { CreateIdentity201Response } from '../model/createIdentity201Response';
import { CreateIdentityRequest } from '../model/createIdentityRequest'; import { CreateIdentityRequest } from '../model/createIdentityRequest';
import { CreateOrganization201Response } from '../model/createOrganization201Response';
import { CreateOrganizationRequest } from '../model/createOrganizationRequest'; import { CreateOrganizationRequest } from '../model/createOrganizationRequest';
import { InviteTokenGenerateRequest } from '../model/inviteTokenGenerateRequest'; import { InviteTokenGenerateRequest } from '../model/inviteTokenGenerateRequest';
import { ListFrontends200ResponseInner } from '../model/listFrontends200ResponseInner'; import { ListFrontends200ResponseInner } from '../model/listFrontends200ResponseInner';
@ -364,7 +365,7 @@ export class AdminApi {
* *
* @param body * @param body
*/ */
public async createOrganization (body?: CreateOrganizationRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: VerifyRequest; }> { public async createOrganization (body?: CreateOrganizationRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CreateOrganization201Response; }> {
const localVarPath = this.basePath + '/organization'; const localVarPath = this.basePath + '/organization';
let localVarQueryParameters: any = {}; let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders); let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
@ -410,13 +411,13 @@ export class AdminApi {
localVarRequestOptions.form = localVarFormParams; localVarRequestOptions.form = localVarFormParams;
} }
} }
return new Promise<{ response: http.IncomingMessage; body: VerifyRequest; }>((resolve, reject) => { return new Promise<{ response: http.IncomingMessage; body: CreateOrganization201Response; }>((resolve, reject) => {
localVarRequest(localVarRequestOptions, (error, response, body) => { localVarRequest(localVarRequestOptions, (error, response, body) => {
if (error) { if (error) {
reject(error); reject(error);
} else { } else {
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
body = ObjectSerializer.deserialize(body, "VerifyRequest"); body = ObjectSerializer.deserialize(body, "CreateOrganization201Response");
resolve({ response: response, body: body }); resolve({ response: response, body: body });
} else { } else {
reject(new HttpError(response, body, response.statusCode)); reject(new HttpError(response, body, response.statusCode));
@ -488,7 +489,7 @@ export class AdminApi {
* *
* @param body * @param body
*/ */
public async deleteOrganization (body?: VerifyRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { public async deleteOrganization (body?: CreateOrganization201Response, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
const localVarPath = this.basePath + '/organization'; const localVarPath = this.basePath + '/organization';
let localVarQueryParameters: any = {}; let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders); let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
@ -505,7 +506,7 @@ export class AdminApi {
uri: localVarPath, uri: localVarPath,
useQuerystring: this._useQuerystring, useQuerystring: this._useQuerystring,
json: true, json: true,
body: ObjectSerializer.serialize(body, "VerifyRequest") body: ObjectSerializer.serialize(body, "CreateOrganization201Response")
}; };
let authenticationPromise = Promise.resolve(); let authenticationPromise = Promise.resolve();

View File

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

View 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 CreateOrganization201Response {
'organizationToken'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "organizationToken",
"baseName": "organizationToken",
"type": "string"
} ];
static getAttributeTypeMap() {
return CreateOrganization201Response.attributeTypeMap;
}
}

View File

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

View File

@ -10,6 +10,7 @@ export * from './createFrontend201Response';
export * from './createFrontendRequest'; export * from './createFrontendRequest';
export * from './createIdentity201Response'; export * from './createIdentity201Response';
export * from './createIdentityRequest'; export * from './createIdentityRequest';
export * from './createOrganization201Response';
export * from './createOrganizationRequest'; export * from './createOrganizationRequest';
export * from './disableRequest'; export * from './disableRequest';
export * from './enableRequest'; export * from './enableRequest';
@ -71,6 +72,7 @@ import { CreateFrontend201Response } from './createFrontend201Response';
import { CreateFrontendRequest } from './createFrontendRequest'; import { CreateFrontendRequest } from './createFrontendRequest';
import { CreateIdentity201Response } from './createIdentity201Response'; import { CreateIdentity201Response } from './createIdentity201Response';
import { CreateIdentityRequest } from './createIdentityRequest'; import { CreateIdentityRequest } from './createIdentityRequest';
import { CreateOrganization201Response } from './createOrganization201Response';
import { CreateOrganizationRequest } from './createOrganizationRequest'; import { CreateOrganizationRequest } from './createOrganizationRequest';
import { DisableRequest } from './disableRequest'; import { DisableRequest } from './disableRequest';
import { EnableRequest } from './enableRequest'; import { EnableRequest } from './enableRequest';
@ -140,6 +142,7 @@ let typeMap: {[index: string]: any} = {
"CreateFrontendRequest": CreateFrontendRequest, "CreateFrontendRequest": CreateFrontendRequest,
"CreateIdentity201Response": CreateIdentity201Response, "CreateIdentity201Response": CreateIdentity201Response,
"CreateIdentityRequest": CreateIdentityRequest, "CreateIdentityRequest": CreateIdentityRequest,
"CreateOrganization201Response": CreateOrganization201Response,
"CreateOrganizationRequest": CreateOrganizationRequest, "CreateOrganizationRequest": CreateOrganizationRequest,
"DisableRequest": DisableRequest, "DisableRequest": DisableRequest,
"EnableRequest": EnableRequest, "EnableRequest": EnableRequest,

View File

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

View File

@ -223,6 +223,7 @@ Class | Method | HTTP request | Description
- [InlineResponse201](docs/InlineResponse201.md) - [InlineResponse201](docs/InlineResponse201.md)
- [InlineResponse2011](docs/InlineResponse2011.md) - [InlineResponse2011](docs/InlineResponse2011.md)
- [InlineResponse2012](docs/InlineResponse2012.md) - [InlineResponse2012](docs/InlineResponse2012.md)
- [InlineResponse2013](docs/InlineResponse2013.md)
- [InviteBody](docs/InviteBody.md) - [InviteBody](docs/InviteBody.md)
- [LoginBody](docs/LoginBody.md) - [LoginBody](docs/LoginBody.md)
- [Metrics](docs/Metrics.md) - [Metrics](docs/Metrics.md)

View File

@ -223,7 +223,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **create_organization** # **create_organization**
> VerifyBody create_organization(body=body) > InlineResponse2012 create_organization(body=body)
@ -260,7 +260,7 @@ Name | Type | Description | Notes
### Return type ### Return type
[**VerifyBody**](VerifyBody.md) [**InlineResponse2012**](InlineResponse2012.md)
### Authorization ### Authorization

View File

@ -3,7 +3,7 @@
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**token** | **str** | | [optional] **organization_token** | **str** | | [optional]
**description** | **str** | | [optional] **description** | **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) [[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,8 +3,7 @@
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**frontend_token** | **str** | | [optional] **organization_token** | **str** | | [optional]
**backend_mode** | **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) [[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

@ -0,0 +1,10 @@
# InlineResponse2013
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**frontend_token** | **str** | | [optional]
**backend_mode** | **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 ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**token** | **str** | | [optional] **organization_token** | **str** | | [optional]
**email** | **str** | | [optional] **email** | **str** | | [optional]
**admin** | **bool** | | [optional] **admin** | **bool** | | [optional]

View File

@ -3,7 +3,7 @@
## Properties ## Properties
Name | Type | Description | Notes 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) [[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 ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**token** | **str** | | [optional] **organization_token** | **str** | | [optional]
**email** | **str** | | [optional] **email** | **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) [[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

@ -11,7 +11,7 @@ Method | HTTP request | Description
[**update_share**](ShareApi.md#update_share) | **PATCH** /share | [**update_share**](ShareApi.md#update_share) | **PATCH** /share |
# **access** # **access**
> InlineResponse2012 access(body=body) > InlineResponse2013 access(body=body)
@ -48,7 +48,7 @@ Name | Type | Description | Notes
### Return type ### Return type
[**InlineResponse2012**](InlineResponse2012.md) [**InlineResponse2013**](InlineResponse2013.md)
### Authorization ### Authorization

View File

@ -0,0 +1,39 @@
# 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
"""
from __future__ import absolute_import
import unittest
import zrok_api
from zrok_api.models.inline_response2013 import InlineResponse2013 # noqa: E501
from zrok_api.rest import ApiException
class TestInlineResponse2013(unittest.TestCase):
"""InlineResponse2013 unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testInlineResponse2013(self):
"""Test InlineResponse2013"""
# FIXME: construct object with mandatory attributes with example values
# model = zrok_api.models.inline_response2013.InlineResponse2013() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()

View File

@ -55,6 +55,7 @@ from zrok_api.models.inline_response2006 import InlineResponse2006
from zrok_api.models.inline_response201 import InlineResponse201 from zrok_api.models.inline_response201 import InlineResponse201
from zrok_api.models.inline_response2011 import InlineResponse2011 from zrok_api.models.inline_response2011 import InlineResponse2011
from zrok_api.models.inline_response2012 import InlineResponse2012 from zrok_api.models.inline_response2012 import InlineResponse2012
from zrok_api.models.inline_response2013 import InlineResponse2013
from zrok_api.models.invite_body import InviteBody from zrok_api.models.invite_body import InviteBody
from zrok_api.models.login_body import LoginBody from zrok_api.models.login_body import LoginBody
from zrok_api.models.metrics import Metrics from zrok_api.models.metrics import Metrics

View File

@ -410,7 +410,7 @@ class AdminApi(object):
:param async_req bool :param async_req bool
:param OrganizationBody body: :param OrganizationBody body:
:return: VerifyBody :return: InlineResponse2012
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
""" """
@ -431,7 +431,7 @@ class AdminApi(object):
:param async_req bool :param async_req bool
:param OrganizationBody body: :param OrganizationBody body:
:return: VerifyBody :return: InlineResponse2012
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
""" """
@ -485,7 +485,7 @@ class AdminApi(object):
body=body_params, body=body_params,
post_params=form_params, post_params=form_params,
files=local_var_files, files=local_var_files,
response_type='VerifyBody', # noqa: E501 response_type='InlineResponse2012', # noqa: E501
auth_settings=auth_settings, auth_settings=auth_settings,
async_req=params.get('async_req'), async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'), _return_http_data_only=params.get('_return_http_data_only'),

View File

@ -42,7 +42,7 @@ class ShareApi(object):
:param async_req bool :param async_req bool
:param AccessBody body: :param AccessBody body:
:return: InlineResponse2012 :return: InlineResponse2013
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
""" """
@ -63,7 +63,7 @@ class ShareApi(object):
:param async_req bool :param async_req bool
:param AccessBody body: :param AccessBody body:
:return: InlineResponse2012 :return: InlineResponse2013
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
""" """
@ -117,7 +117,7 @@ class ShareApi(object):
body=body_params, body=body_params,
post_params=form_params, post_params=form_params,
files=local_var_files, files=local_var_files,
response_type='InlineResponse2012', # noqa: E501 response_type='InlineResponse2013', # noqa: E501
auth_settings=auth_settings, auth_settings=auth_settings,
async_req=params.get('async_req'), async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'), _return_http_data_only=params.get('_return_http_data_only'),

View File

@ -45,6 +45,7 @@ from zrok_api.models.inline_response2006 import InlineResponse2006
from zrok_api.models.inline_response201 import InlineResponse201 from zrok_api.models.inline_response201 import InlineResponse201
from zrok_api.models.inline_response2011 import InlineResponse2011 from zrok_api.models.inline_response2011 import InlineResponse2011
from zrok_api.models.inline_response2012 import InlineResponse2012 from zrok_api.models.inline_response2012 import InlineResponse2012
from zrok_api.models.inline_response2013 import InlineResponse2013
from zrok_api.models.invite_body import InviteBody from zrok_api.models.invite_body import InviteBody
from zrok_api.models.login_body import LoginBody from zrok_api.models.login_body import LoginBody
from zrok_api.models.metrics import Metrics from zrok_api.models.metrics import Metrics

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -471,7 +471,7 @@ paths:
description: organization created description: organization created
schema: schema:
properties: properties:
token: organizationToken:
type: string type: string
401: 401:
description: unauthorized description: unauthorized
@ -488,7 +488,7 @@ paths:
in: body in: body
schema: schema:
properties: properties:
token: organizationToken:
type: string type: string
responses: responses:
200: 200:
@ -512,7 +512,7 @@ paths:
in: body in: body
schema: schema:
properties: properties:
token: organizationToken:
type: string type: string
email: email:
type: string type: string
@ -574,7 +574,7 @@ paths:
in: body in: body
schema: schema:
properties: properties:
token: organizationToken:
type: string type: string
email: email:
type: string type: string
@ -604,7 +604,7 @@ paths:
type: array type: array
items: items:
properties: properties:
token: organizationToken:
type: string type: string
description: description:
type: string type: string

View File

@ -14,6 +14,7 @@ models/CreateFrontend201Response.ts
models/CreateFrontendRequest.ts models/CreateFrontendRequest.ts
models/CreateIdentity201Response.ts models/CreateIdentity201Response.ts
models/CreateIdentityRequest.ts models/CreateIdentityRequest.ts
models/CreateOrganization201Response.ts
models/CreateOrganizationRequest.ts models/CreateOrganizationRequest.ts
models/DisableRequest.ts models/DisableRequest.ts
models/EnableRequest.ts models/EnableRequest.ts

View File

@ -20,6 +20,7 @@ import type {
CreateFrontendRequest, CreateFrontendRequest,
CreateIdentity201Response, CreateIdentity201Response,
CreateIdentityRequest, CreateIdentityRequest,
CreateOrganization201Response,
CreateOrganizationRequest, CreateOrganizationRequest,
InviteTokenGenerateRequest, InviteTokenGenerateRequest,
ListFrontends200ResponseInner, ListFrontends200ResponseInner,
@ -43,6 +44,8 @@ import {
CreateIdentity201ResponseToJSON, CreateIdentity201ResponseToJSON,
CreateIdentityRequestFromJSON, CreateIdentityRequestFromJSON,
CreateIdentityRequestToJSON, CreateIdentityRequestToJSON,
CreateOrganization201ResponseFromJSON,
CreateOrganization201ResponseToJSON,
CreateOrganizationRequestFromJSON, CreateOrganizationRequestFromJSON,
CreateOrganizationRequestToJSON, CreateOrganizationRequestToJSON,
InviteTokenGenerateRequestFromJSON, InviteTokenGenerateRequestFromJSON,
@ -92,7 +95,7 @@ export interface DeleteFrontendRequest {
} }
export interface DeleteOrganizationRequest { export interface DeleteOrganizationRequest {
body?: VerifyRequest; body?: CreateOrganization201Response;
} }
export interface GrantsRequest { export interface GrantsRequest {
@ -245,7 +248,7 @@ export class AdminApi extends runtime.BaseAPI {
/** /**
*/ */
async createOrganizationRaw(requestParameters: CreateOrganizationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VerifyRequest>> { async createOrganizationRaw(requestParameters: CreateOrganizationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateOrganization201Response>> {
const queryParameters: any = {}; const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {}; const headerParameters: runtime.HTTPHeaders = {};
@ -264,12 +267,12 @@ export class AdminApi extends runtime.BaseAPI {
body: CreateOrganizationRequestToJSON(requestParameters['body']), body: CreateOrganizationRequestToJSON(requestParameters['body']),
}, initOverrides); }, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => VerifyRequestFromJSON(jsonValue)); return new runtime.JSONApiResponse(response, (jsonValue) => CreateOrganization201ResponseFromJSON(jsonValue));
} }
/** /**
*/ */
async createOrganization(requestParameters: CreateOrganizationOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VerifyRequest> { async createOrganization(requestParameters: CreateOrganizationOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateOrganization201Response> {
const response = await this.createOrganizationRaw(requestParameters, initOverrides); const response = await this.createOrganizationRaw(requestParameters, initOverrides);
return await response.value(); return await response.value();
} }
@ -322,7 +325,7 @@ export class AdminApi extends runtime.BaseAPI {
method: 'DELETE', method: 'DELETE',
headers: headerParameters, headers: headerParameters,
query: queryParameters, query: queryParameters,
body: VerifyRequestToJSON(requestParameters['body']), body: CreateOrganization201ResponseToJSON(requestParameters['body']),
}, initOverrides); }, initOverrides);
return new runtime.VoidApiResponse(response); return new runtime.VoidApiResponse(response);

View File

@ -24,7 +24,7 @@ export interface AddOrganizationMemberRequest {
* @type {string} * @type {string}
* @memberof AddOrganizationMemberRequest * @memberof AddOrganizationMemberRequest
*/ */
token?: string; organizationToken?: string;
/** /**
* *
* @type {string} * @type {string}
@ -56,7 +56,7 @@ export function AddOrganizationMemberRequestFromJSONTyped(json: any, ignoreDiscr
} }
return { return {
'token': json['token'] == null ? undefined : json['token'], 'organizationToken': json['organizationToken'] == null ? undefined : json['organizationToken'],
'email': json['email'] == null ? undefined : json['email'], 'email': json['email'] == null ? undefined : json['email'],
'admin': json['admin'] == null ? undefined : json['admin'], 'admin': json['admin'] == null ? undefined : json['admin'],
}; };
@ -68,7 +68,7 @@ export function AddOrganizationMemberRequestToJSON(value?: AddOrganizationMember
} }
return { return {
'token': value['token'], 'organizationToken': value['organizationToken'],
'email': value['email'], 'email': value['email'],
'admin': value['admin'], 'admin': value['admin'],
}; };

View 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 CreateOrganization201Response
*/
export interface CreateOrganization201Response {
/**
*
* @type {string}
* @memberof CreateOrganization201Response
*/
organizationToken?: string;
}
/**
* Check if a given object implements the CreateOrganization201Response interface.
*/
export function instanceOfCreateOrganization201Response(value: object): value is CreateOrganization201Response {
return true;
}
export function CreateOrganization201ResponseFromJSON(json: any): CreateOrganization201Response {
return CreateOrganization201ResponseFromJSONTyped(json, false);
}
export function CreateOrganization201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateOrganization201Response {
if (json == null) {
return json;
}
return {
'organizationToken': json['organizationToken'] == null ? undefined : json['organizationToken'],
};
}
export function CreateOrganization201ResponseToJSON(value?: CreateOrganization201Response | null): any {
if (value == null) {
return value;
}
return {
'organizationToken': value['organizationToken'],
};
}

View File

@ -24,7 +24,7 @@ export interface ListOrganizations200ResponseOrganizationsInner {
* @type {string} * @type {string}
* @memberof ListOrganizations200ResponseOrganizationsInner * @memberof ListOrganizations200ResponseOrganizationsInner
*/ */
token?: string; organizationToken?: string;
/** /**
* *
* @type {string} * @type {string}
@ -50,7 +50,7 @@ export function ListOrganizations200ResponseOrganizationsInnerFromJSONTyped(json
} }
return { return {
'token': json['token'] == null ? undefined : json['token'], 'organizationToken': json['organizationToken'] == null ? undefined : json['organizationToken'],
'description': json['description'] == null ? undefined : json['description'], 'description': json['description'] == null ? undefined : json['description'],
}; };
} }
@ -61,7 +61,7 @@ export function ListOrganizations200ResponseOrganizationsInnerToJSON(value?: Lis
} }
return { return {
'token': value['token'], 'organizationToken': value['organizationToken'],
'description': value['description'], 'description': value['description'],
}; };
} }

View File

@ -24,7 +24,7 @@ export interface RemoveOrganizationMemberRequest {
* @type {string} * @type {string}
* @memberof RemoveOrganizationMemberRequest * @memberof RemoveOrganizationMemberRequest
*/ */
token?: string; organizationToken?: string;
/** /**
* *
* @type {string} * @type {string}
@ -50,7 +50,7 @@ export function RemoveOrganizationMemberRequestFromJSONTyped(json: any, ignoreDi
} }
return { return {
'token': json['token'] == null ? undefined : json['token'], 'organizationToken': json['organizationToken'] == null ? undefined : json['organizationToken'],
'email': json['email'] == null ? undefined : json['email'], 'email': json['email'] == null ? undefined : json['email'],
}; };
} }
@ -61,7 +61,7 @@ export function RemoveOrganizationMemberRequestToJSON(value?: RemoveOrganization
} }
return { return {
'token': value['token'], 'organizationToken': value['organizationToken'],
'email': value['email'], 'email': value['email'],
}; };
} }

View File

@ -9,6 +9,7 @@ export * from './CreateFrontend201Response';
export * from './CreateFrontendRequest'; export * from './CreateFrontendRequest';
export * from './CreateIdentity201Response'; export * from './CreateIdentity201Response';
export * from './CreateIdentityRequest'; export * from './CreateIdentityRequest';
export * from './CreateOrganization201Response';
export * from './CreateOrganizationRequest'; export * from './CreateOrganizationRequest';
export * from './DisableRequest'; export * from './DisableRequest';
export * from './EnableRequest'; export * from './EnableRequest';