diff --git a/cmd/zrok/adminCreateOrgMember.go b/cmd/zrok/adminCreateOrgMember.go index e58c2fcd..1a373d1b 100644 --- a/cmd/zrok/adminCreateOrgMember.go +++ b/cmd/zrok/adminCreateOrgMember.go @@ -41,7 +41,7 @@ func (cmd *adminCreateOrgMemberCommand) run(_ *cobra.Command, args []string) { } req := admin.NewAddOrganizationMemberParams() - req.Body.Token = args[0] + req.Body.OrganizationToken = args[0] req.Body.Email = args[1] req.Body.Admin = cmd.admin diff --git a/cmd/zrok/adminCreateOrganization.go b/cmd/zrok/adminCreateOrganization.go index da7b5944..a1ca8909 100644 --- a/cmd/zrok/adminCreateOrganization.go +++ b/cmd/zrok/adminCreateOrganization.go @@ -48,5 +48,5 @@ func (cmd *adminCreateOrganizationCommand) run(_ *cobra.Command, _ []string) { 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) } diff --git a/cmd/zrok/adminDeleteOrgMember.go b/cmd/zrok/adminDeleteOrgMember.go index 6659727f..10949162 100644 --- a/cmd/zrok/adminDeleteOrgMember.go +++ b/cmd/zrok/adminDeleteOrgMember.go @@ -39,7 +39,7 @@ func (cmd *adminDeleteOrgMemberCommand) run(_ *cobra.Command, args []string) { } req := admin.NewRemoveOrganizationMemberParams() - req.Body.Token = args[0] + req.Body.OrganizationToken = args[0] req.Body.Email = args[1] _, err = zrok.Admin.RemoveOrganizationMember(req, mustGetAdminAuth()) diff --git a/cmd/zrok/adminDeleteOrganization.go b/cmd/zrok/adminDeleteOrganization.go index cb3ec6e2..ee858bb6 100644 --- a/cmd/zrok/adminDeleteOrganization.go +++ b/cmd/zrok/adminDeleteOrganization.go @@ -39,7 +39,7 @@ func (cmd *adminDeleteOrganizationCommand) run(_ *cobra.Command, args []string) } req := admin.NewDeleteOrganizationParams() - req.Body.Token = args[0] + req.Body.OrganizationToken = args[0] _, err = zrok.Admin.DeleteOrganization(req, mustGetAdminAuth()) if err != nil { diff --git a/cmd/zrok/adminListOrganizations.go b/cmd/zrok/adminListOrganizations.go index bf2624d8..2fb4d400 100644 --- a/cmd/zrok/adminListOrganizations.go +++ b/cmd/zrok/adminListOrganizations.go @@ -52,7 +52,7 @@ func (c *adminListOrganizationsCommand) run(_ *cobra.Command, _ []string) { t.SetStyle(table.StyleColoredDark) t.AppendHeader(table.Row{"Organization Token", "Description"}) for _, org := range resp.Payload.Organizations { - t.AppendRow(table.Row{org.Token, org.Description}) + t.AppendRow(table.Row{org.OrganizationToken, org.Description}) } t.Render() fmt.Println() diff --git a/controller/addOrganizationMember.go b/controller/addOrganizationMember.go index b9c7e1db..360c38ba 100644 --- a/controller/addOrganizationMember.go +++ b/controller/addOrganizationMember.go @@ -32,9 +32,9 @@ func (h *addOrganizationMemberHandler) Handle(params admin.AddOrganizationMember return admin.NewAddOrganizationMemberNotFound() } - org, err := str.FindOrganizationByToken(params.Body.Token, trx) + org, err := str.FindOrganizationByToken(params.Body.OrganizationToken, trx) 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() } diff --git a/controller/createOrganization.go b/controller/createOrganization.go index a3b60ce2..d7bd1bbe 100644 --- a/controller/createOrganization.go +++ b/controller/createOrganization.go @@ -49,5 +49,5 @@ func (h *createOrganizationHandler) Handle(params admin.CreateOrganizationParams 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}) } diff --git a/controller/deleteOrganization.go b/controller/deleteOrganization.go index 70df1d5c..20f1f2ee 100644 --- a/controller/deleteOrganization.go +++ b/controller/deleteOrganization.go @@ -26,7 +26,7 @@ func (h *deleteOrganizationHandler) Handle(params admin.DeleteOrganizationParams } 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.NewDeleteOrganizationNotFound() diff --git a/controller/listOrganizations.go b/controller/listOrganizations.go index f2f769e9..8e069009 100644 --- a/controller/listOrganizations.go +++ b/controller/listOrganizations.go @@ -34,7 +34,7 @@ func (h *listOrganizationsHandler) Handle(_ admin.ListOrganizationsParams, princ var out []*admin.ListOrganizationsOKBodyOrganizationsItems0 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}) } diff --git a/controller/removeOrganizationMember.go b/controller/removeOrganizationMember.go index 63cb2da2..11cea366 100644 --- a/controller/removeOrganizationMember.go +++ b/controller/removeOrganizationMember.go @@ -32,9 +32,9 @@ func (h *removeOrganizationMemberHandler) Handle(params admin.RemoveOrganization return admin.NewAddOrganizationMemberNotFound() } - org, err := str.FindOrganizationByToken(params.Body.Token, trx) + org, err := str.FindOrganizationByToken(params.Body.OrganizationToken, trx) 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() } diff --git a/rest_client_zrok/admin/add_organization_member_responses.go b/rest_client_zrok/admin/add_organization_member_responses.go index 60866458..da8500fa 100644 --- a/rest_client_zrok/admin/add_organization_member_responses.go +++ b/rest_client_zrok/admin/add_organization_member_responses.go @@ -287,8 +287,8 @@ type AddOrganizationMemberBody struct { // email Email string `json:"email,omitempty"` - // token - Token string `json:"token,omitempty"` + // organization token + OrganizationToken string `json:"organizationToken,omitempty"` } // Validate validates this add organization member body diff --git a/rest_client_zrok/admin/create_organization_responses.go b/rest_client_zrok/admin/create_organization_responses.go index 2459593d..b31dffa6 100644 --- a/rest_client_zrok/admin/create_organization_responses.go +++ b/rest_client_zrok/admin/create_organization_responses.go @@ -270,8 +270,8 @@ swagger:model CreateOrganizationCreatedBody */ type CreateOrganizationCreatedBody struct { - // token - Token string `json:"token,omitempty"` + // organization token + OrganizationToken string `json:"organizationToken,omitempty"` } // Validate validates this create organization created body diff --git a/rest_client_zrok/admin/delete_organization_responses.go b/rest_client_zrok/admin/delete_organization_responses.go index 2eab36fd..7dbf9987 100644 --- a/rest_client_zrok/admin/delete_organization_responses.go +++ b/rest_client_zrok/admin/delete_organization_responses.go @@ -281,8 +281,8 @@ swagger:model DeleteOrganizationBody */ type DeleteOrganizationBody struct { - // token - Token string `json:"token,omitempty"` + // organization token + OrganizationToken string `json:"organizationToken,omitempty"` } // Validate validates this delete organization body diff --git a/rest_client_zrok/admin/list_organizations_responses.go b/rest_client_zrok/admin/list_organizations_responses.go index 2adbc8cc..01055621 100644 --- a/rest_client_zrok/admin/list_organizations_responses.go +++ b/rest_client_zrok/admin/list_organizations_responses.go @@ -344,8 +344,8 @@ type ListOrganizationsOKBodyOrganizationsItems0 struct { // description Description string `json:"description,omitempty"` - // token - Token string `json:"token,omitempty"` + // organization token + OrganizationToken string `json:"organizationToken,omitempty"` } // Validate validates this list organizations o k body organizations items0 diff --git a/rest_client_zrok/admin/remove_organization_member_responses.go b/rest_client_zrok/admin/remove_organization_member_responses.go index 1e66a9db..115b20b8 100644 --- a/rest_client_zrok/admin/remove_organization_member_responses.go +++ b/rest_client_zrok/admin/remove_organization_member_responses.go @@ -284,8 +284,8 @@ type RemoveOrganizationMemberBody struct { // email Email string `json:"email,omitempty"` - // token - Token string `json:"token,omitempty"` + // organization token + OrganizationToken string `json:"organizationToken,omitempty"` } // Validate validates this remove organization member body diff --git a/rest_server_zrok/embedded_spec.go b/rest_server_zrok/embedded_spec.go index 7303e0d7..33905898 100644 --- a/rest_server_zrok/embedded_spec.go +++ b/rest_server_zrok/embedded_spec.go @@ -1075,7 +1075,7 @@ func init() { "description": "organization created", "schema": { "properties": { - "token": { + "organizationToken": { "type": "string" } } @@ -1105,7 +1105,7 @@ func init() { "in": "body", "schema": { "properties": { - "token": { + "organizationToken": { "type": "string" } } @@ -1151,7 +1151,7 @@ func init() { "email": { "type": "string" }, - "token": { + "organizationToken": { "type": "string" } } @@ -1251,7 +1251,7 @@ func init() { "email": { "type": "string" }, - "token": { + "organizationToken": { "type": "string" } } @@ -1297,7 +1297,7 @@ func init() { "description": { "type": "string" }, - "token": { + "organizationToken": { "type": "string" } } @@ -3235,7 +3235,7 @@ func init() { "description": "organization created", "schema": { "properties": { - "token": { + "organizationToken": { "type": "string" } } @@ -3265,7 +3265,7 @@ func init() { "in": "body", "schema": { "properties": { - "token": { + "organizationToken": { "type": "string" } } @@ -3311,7 +3311,7 @@ func init() { "email": { "type": "string" }, - "token": { + "organizationToken": { "type": "string" } } @@ -3404,7 +3404,7 @@ func init() { "email": { "type": "string" }, - "token": { + "organizationToken": { "type": "string" } } @@ -4060,7 +4060,7 @@ func init() { "description": { "type": "string" }, - "token": { + "organizationToken": { "type": "string" } } diff --git a/rest_server_zrok/operations/admin/add_organization_member.go b/rest_server_zrok/operations/admin/add_organization_member.go index ce8f8db5..8b68a101 100644 --- a/rest_server_zrok/operations/admin/add_organization_member.go +++ b/rest_server_zrok/operations/admin/add_organization_member.go @@ -84,8 +84,8 @@ type AddOrganizationMemberBody struct { // email Email string `json:"email,omitempty"` - // token - Token string `json:"token,omitempty"` + // organization token + OrganizationToken string `json:"organizationToken,omitempty"` } // Validate validates this add organization member body diff --git a/rest_server_zrok/operations/admin/create_organization.go b/rest_server_zrok/operations/admin/create_organization.go index 6e92d316..7558a810 100644 --- a/rest_server_zrok/operations/admin/create_organization.go +++ b/rest_server_zrok/operations/admin/create_organization.go @@ -115,8 +115,8 @@ func (o *CreateOrganizationBody) UnmarshalBinary(b []byte) error { // swagger:model CreateOrganizationCreatedBody type CreateOrganizationCreatedBody struct { - // token - Token string `json:"token,omitempty"` + // organization token + OrganizationToken string `json:"organizationToken,omitempty"` } // Validate validates this create organization created body diff --git a/rest_server_zrok/operations/admin/delete_organization.go b/rest_server_zrok/operations/admin/delete_organization.go index 8868d5c0..dd3e3b2b 100644 --- a/rest_server_zrok/operations/admin/delete_organization.go +++ b/rest_server_zrok/operations/admin/delete_organization.go @@ -78,8 +78,8 @@ func (o *DeleteOrganization) ServeHTTP(rw http.ResponseWriter, r *http.Request) // swagger:model DeleteOrganizationBody type DeleteOrganizationBody struct { - // token - Token string `json:"token,omitempty"` + // organization token + OrganizationToken string `json:"organizationToken,omitempty"` } // Validate validates this delete organization body diff --git a/rest_server_zrok/operations/admin/list_organizations.go b/rest_server_zrok/operations/admin/list_organizations.go index 112f889e..7d4dba7e 100644 --- a/rest_server_zrok/operations/admin/list_organizations.go +++ b/rest_server_zrok/operations/admin/list_organizations.go @@ -189,8 +189,8 @@ type ListOrganizationsOKBodyOrganizationsItems0 struct { // description Description string `json:"description,omitempty"` - // token - Token string `json:"token,omitempty"` + // organization token + OrganizationToken string `json:"organizationToken,omitempty"` } // Validate validates this list organizations o k body organizations items0 diff --git a/rest_server_zrok/operations/admin/remove_organization_member.go b/rest_server_zrok/operations/admin/remove_organization_member.go index 7594ba16..05245842 100644 --- a/rest_server_zrok/operations/admin/remove_organization_member.go +++ b/rest_server_zrok/operations/admin/remove_organization_member.go @@ -81,8 +81,8 @@ type RemoveOrganizationMemberBody struct { // email Email string `json:"email,omitempty"` - // token - Token string `json:"token,omitempty"` + // organization token + OrganizationToken string `json:"organizationToken,omitempty"` } // Validate validates this remove organization member body diff --git a/sdk/nodejs/sdk/src/zrok/api/.openapi-generator/FILES b/sdk/nodejs/sdk/src/zrok/api/.openapi-generator/FILES index 5eb37dc0..6bc0b382 100644 --- a/sdk/nodejs/sdk/src/zrok/api/.openapi-generator/FILES +++ b/sdk/nodejs/sdk/src/zrok/api/.openapi-generator/FILES @@ -17,6 +17,7 @@ model/createFrontend201Response.ts model/createFrontendRequest.ts model/createIdentity201Response.ts model/createIdentityRequest.ts +model/createOrganization201Response.ts model/createOrganizationRequest.ts model/disableRequest.ts model/enableRequest.ts diff --git a/sdk/nodejs/sdk/src/zrok/api/api/adminApi.ts b/sdk/nodejs/sdk/src/zrok/api/api/adminApi.ts index 1c6a1c1e..d1e80544 100644 --- a/sdk/nodejs/sdk/src/zrok/api/api/adminApi.ts +++ b/sdk/nodejs/sdk/src/zrok/api/api/adminApi.ts @@ -20,6 +20,7 @@ import { CreateFrontend201Response } from '../model/createFrontend201Response'; import { CreateFrontendRequest } from '../model/createFrontendRequest'; import { CreateIdentity201Response } from '../model/createIdentity201Response'; import { CreateIdentityRequest } from '../model/createIdentityRequest'; +import { CreateOrganization201Response } from '../model/createOrganization201Response'; import { CreateOrganizationRequest } from '../model/createOrganizationRequest'; import { InviteTokenGenerateRequest } from '../model/inviteTokenGenerateRequest'; import { ListFrontends200ResponseInner } from '../model/listFrontends200ResponseInner'; @@ -364,7 +365,7 @@ export class AdminApi { * * @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'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); @@ -410,13 +411,13 @@ export class AdminApi { 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) => { if (error) { reject(error); } else { if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { - body = ObjectSerializer.deserialize(body, "VerifyRequest"); + body = ObjectSerializer.deserialize(body, "CreateOrganization201Response"); resolve({ response: response, body: body }); } else { reject(new HttpError(response, body, response.statusCode)); @@ -488,7 +489,7 @@ export class AdminApi { * * @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'; let localVarQueryParameters: any = {}; let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); @@ -505,7 +506,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(); diff --git a/sdk/nodejs/sdk/src/zrok/api/model/addOrganizationMemberRequest.ts b/sdk/nodejs/sdk/src/zrok/api/model/addOrganizationMemberRequest.ts index 2a343d35..0b6472bd 100644 --- a/sdk/nodejs/sdk/src/zrok/api/model/addOrganizationMemberRequest.ts +++ b/sdk/nodejs/sdk/src/zrok/api/model/addOrganizationMemberRequest.ts @@ -13,7 +13,7 @@ import { RequestFile } from './models'; export class AddOrganizationMemberRequest { - 'token'?: string; + 'organizationToken'?: string; 'email'?: string; 'admin'?: boolean; @@ -21,8 +21,8 @@ export class AddOrganizationMemberRequest { static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - "name": "token", - "baseName": "token", + "name": "organizationToken", + "baseName": "organizationToken", "type": "string" }, { diff --git a/sdk/nodejs/sdk/src/zrok/api/model/createOrganization201Response.ts b/sdk/nodejs/sdk/src/zrok/api/model/createOrganization201Response.ts new file mode 100644 index 00000000..180cf93c --- /dev/null +++ b/sdk/nodejs/sdk/src/zrok/api/model/createOrganization201Response.ts @@ -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; + } +} + diff --git a/sdk/nodejs/sdk/src/zrok/api/model/listOrganizations200ResponseOrganizationsInner.ts b/sdk/nodejs/sdk/src/zrok/api/model/listOrganizations200ResponseOrganizationsInner.ts index b52eb9da..118b7527 100644 --- a/sdk/nodejs/sdk/src/zrok/api/model/listOrganizations200ResponseOrganizationsInner.ts +++ b/sdk/nodejs/sdk/src/zrok/api/model/listOrganizations200ResponseOrganizationsInner.ts @@ -13,15 +13,15 @@ import { RequestFile } from './models'; export class ListOrganizations200ResponseOrganizationsInner { - 'token'?: string; + 'organizationToken'?: string; 'description'?: string; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - "name": "token", - "baseName": "token", + "name": "organizationToken", + "baseName": "organizationToken", "type": "string" }, { diff --git a/sdk/nodejs/sdk/src/zrok/api/model/models.ts b/sdk/nodejs/sdk/src/zrok/api/model/models.ts index 50d7eeb7..3ea6a7b7 100644 --- a/sdk/nodejs/sdk/src/zrok/api/model/models.ts +++ b/sdk/nodejs/sdk/src/zrok/api/model/models.ts @@ -10,6 +10,7 @@ export * from './createFrontend201Response'; export * from './createFrontendRequest'; export * from './createIdentity201Response'; export * from './createIdentityRequest'; +export * from './createOrganization201Response'; export * from './createOrganizationRequest'; export * from './disableRequest'; export * from './enableRequest'; @@ -71,6 +72,7 @@ import { CreateFrontend201Response } from './createFrontend201Response'; import { CreateFrontendRequest } from './createFrontendRequest'; import { CreateIdentity201Response } from './createIdentity201Response'; import { CreateIdentityRequest } from './createIdentityRequest'; +import { CreateOrganization201Response } from './createOrganization201Response'; import { CreateOrganizationRequest } from './createOrganizationRequest'; import { DisableRequest } from './disableRequest'; import { EnableRequest } from './enableRequest'; @@ -140,6 +142,7 @@ let typeMap: {[index: string]: any} = { "CreateFrontendRequest": CreateFrontendRequest, "CreateIdentity201Response": CreateIdentity201Response, "CreateIdentityRequest": CreateIdentityRequest, + "CreateOrganization201Response": CreateOrganization201Response, "CreateOrganizationRequest": CreateOrganizationRequest, "DisableRequest": DisableRequest, "EnableRequest": EnableRequest, diff --git a/sdk/nodejs/sdk/src/zrok/api/model/removeOrganizationMemberRequest.ts b/sdk/nodejs/sdk/src/zrok/api/model/removeOrganizationMemberRequest.ts index 14c844f3..392f707b 100644 --- a/sdk/nodejs/sdk/src/zrok/api/model/removeOrganizationMemberRequest.ts +++ b/sdk/nodejs/sdk/src/zrok/api/model/removeOrganizationMemberRequest.ts @@ -13,15 +13,15 @@ import { RequestFile } from './models'; export class RemoveOrganizationMemberRequest { - 'token'?: string; + 'organizationToken'?: string; 'email'?: string; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - "name": "token", - "baseName": "token", + "name": "organizationToken", + "baseName": "organizationToken", "type": "string" }, { diff --git a/sdk/python/sdk/zrok/README.md b/sdk/python/sdk/zrok/README.md index 35c99565..7c44b87a 100644 --- a/sdk/python/sdk/zrok/README.md +++ b/sdk/python/sdk/zrok/README.md @@ -223,6 +223,7 @@ Class | Method | HTTP request | Description - [InlineResponse201](docs/InlineResponse201.md) - [InlineResponse2011](docs/InlineResponse2011.md) - [InlineResponse2012](docs/InlineResponse2012.md) + - [InlineResponse2013](docs/InlineResponse2013.md) - [InviteBody](docs/InviteBody.md) - [LoginBody](docs/LoginBody.md) - [Metrics](docs/Metrics.md) diff --git a/sdk/python/sdk/zrok/docs/AdminApi.md b/sdk/python/sdk/zrok/docs/AdminApi.md index 62abadfb..34977dd4 100644 --- a/sdk/python/sdk/zrok/docs/AdminApi.md +++ b/sdk/python/sdk/zrok/docs/AdminApi.md @@ -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) # **create_organization** -> VerifyBody create_organization(body=body) +> InlineResponse2012 create_organization(body=body) @@ -260,7 +260,7 @@ Name | Type | Description | Notes ### Return type -[**VerifyBody**](VerifyBody.md) +[**InlineResponse2012**](InlineResponse2012.md) ### Authorization diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2004Organizations.md b/sdk/python/sdk/zrok/docs/InlineResponse2004Organizations.md index 8520a9e2..053d9f98 100644 --- a/sdk/python/sdk/zrok/docs/InlineResponse2004Organizations.md +++ b/sdk/python/sdk/zrok/docs/InlineResponse2004Organizations.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**token** | **str** | | [optional] +**organization_token** | **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) diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2012.md b/sdk/python/sdk/zrok/docs/InlineResponse2012.md index 6eb5df14..a72f2065 100644 --- a/sdk/python/sdk/zrok/docs/InlineResponse2012.md +++ b/sdk/python/sdk/zrok/docs/InlineResponse2012.md @@ -3,8 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**backend_mode** | **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) diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2013.md b/sdk/python/sdk/zrok/docs/InlineResponse2013.md new file mode 100644 index 00000000..98930cb2 --- /dev/null +++ b/sdk/python/sdk/zrok/docs/InlineResponse2013.md @@ -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) + diff --git a/sdk/python/sdk/zrok/docs/OrganizationAddBody.md b/sdk/python/sdk/zrok/docs/OrganizationAddBody.md index 5421db0d..485613d0 100644 --- a/sdk/python/sdk/zrok/docs/OrganizationAddBody.md +++ b/sdk/python/sdk/zrok/docs/OrganizationAddBody.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**token** | **str** | | [optional] +**organization_token** | **str** | | [optional] **email** | **str** | | [optional] **admin** | **bool** | | [optional] diff --git a/sdk/python/sdk/zrok/docs/OrganizationBody1.md b/sdk/python/sdk/zrok/docs/OrganizationBody1.md index 08968991..2fbaf697 100644 --- a/sdk/python/sdk/zrok/docs/OrganizationBody1.md +++ b/sdk/python/sdk/zrok/docs/OrganizationBody1.md @@ -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) diff --git a/sdk/python/sdk/zrok/docs/OrganizationRemoveBody.md b/sdk/python/sdk/zrok/docs/OrganizationRemoveBody.md index 04deddae..f61c0b93 100644 --- a/sdk/python/sdk/zrok/docs/OrganizationRemoveBody.md +++ b/sdk/python/sdk/zrok/docs/OrganizationRemoveBody.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**token** | **str** | | [optional] +**organization_token** | **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) diff --git a/sdk/python/sdk/zrok/docs/ShareApi.md b/sdk/python/sdk/zrok/docs/ShareApi.md index 25cc60ec..e7303e1b 100644 --- a/sdk/python/sdk/zrok/docs/ShareApi.md +++ b/sdk/python/sdk/zrok/docs/ShareApi.md @@ -11,7 +11,7 @@ Method | HTTP request | Description [**update_share**](ShareApi.md#update_share) | **PATCH** /share | # **access** -> InlineResponse2012 access(body=body) +> InlineResponse2013 access(body=body) @@ -48,7 +48,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse2012**](InlineResponse2012.md) +[**InlineResponse2013**](InlineResponse2013.md) ### Authorization diff --git a/sdk/python/sdk/zrok/test/test_inline_response2013.py b/sdk/python/sdk/zrok/test/test_inline_response2013.py new file mode 100644 index 00000000..3b028a6c --- /dev/null +++ b/sdk/python/sdk/zrok/test/test_inline_response2013.py @@ -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() diff --git a/sdk/python/sdk/zrok/zrok_api/__init__.py b/sdk/python/sdk/zrok/zrok_api/__init__.py index 83d3d320..8bb1bad5 100644 --- a/sdk/python/sdk/zrok/zrok_api/__init__.py +++ b/sdk/python/sdk/zrok/zrok_api/__init__.py @@ -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_response2011 import InlineResponse2011 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.login_body import LoginBody from zrok_api.models.metrics import Metrics diff --git a/sdk/python/sdk/zrok/zrok_api/api/admin_api.py b/sdk/python/sdk/zrok/zrok_api/api/admin_api.py index 3760abd1..081dbe65 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/admin_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/admin_api.py @@ -410,7 +410,7 @@ class AdminApi(object): :param async_req bool :param OrganizationBody body: - :return: VerifyBody + :return: InlineResponse2012 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: VerifyBody + :return: InlineResponse2012 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='VerifyBody', # noqa: E501 + response_type='InlineResponse2012', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/sdk/python/sdk/zrok/zrok_api/api/share_api.py b/sdk/python/sdk/zrok/zrok_api/api/share_api.py index e02a2c24..21b0c013 100644 --- a/sdk/python/sdk/zrok/zrok_api/api/share_api.py +++ b/sdk/python/sdk/zrok/zrok_api/api/share_api.py @@ -42,7 +42,7 @@ class ShareApi(object): :param async_req bool :param AccessBody body: - :return: InlineResponse2012 + :return: InlineResponse2013 If the method is called asynchronously, returns the request thread. """ @@ -63,7 +63,7 @@ class ShareApi(object): :param async_req bool :param AccessBody body: - :return: InlineResponse2012 + :return: InlineResponse2013 If the method is called asynchronously, returns the request thread. """ @@ -117,7 +117,7 @@ class ShareApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='InlineResponse2012', # noqa: E501 + response_type='InlineResponse2013', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/sdk/python/sdk/zrok/zrok_api/models/__init__.py b/sdk/python/sdk/zrok/zrok_api/models/__init__.py index 11643377..1ab687ee 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/__init__.py +++ b/sdk/python/sdk/zrok/zrok_api/models/__init__.py @@ -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_response2011 import InlineResponse2011 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.login_body import LoginBody from zrok_api.models.metrics import Metrics diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2004_organizations.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2004_organizations.py index 916c06e9..1996b554 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2004_organizations.py +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2004_organizations.py @@ -28,45 +28,45 @@ class InlineResponse2004Organizations(object): and the value is json key in definition. """ swagger_types = { - 'token': 'str', + 'organization_token': 'str', 'description': 'str' } attribute_map = { - 'token': 'token', + 'organization_token': 'organizationToken', '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 - self._token = None + self._organization_token = None self._description = 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 @property - def token(self): - """Gets the token of this InlineResponse2004Organizations. # noqa: E501 + def organization_token(self): + """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 """ - return self._token + return self._organization_token - @token.setter - def token(self, token): - """Sets the token of this InlineResponse2004Organizations. + @organization_token.setter + def organization_token(self, organization_token): + """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 """ - self._token = token + self._organization_token = organization_token @property def description(self): diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2012.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2012.py index f4c827f7..dee97a61 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2012.py +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2012.py @@ -28,66 +28,40 @@ class InlineResponse2012(object): and the value is json key in definition. """ swagger_types = { - 'frontend_token': 'str', - 'backend_mode': 'str' + 'organization_token': 'str' } attribute_map = { - 'frontend_token': 'frontendToken', - 'backend_mode': 'backendMode' + 'organization_token': 'organizationToken' } - 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 - self._frontend_token = None - self._backend_mode = None + self._organization_token = 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 + if organization_token is not None: + self.organization_token = organization_token @property - def frontend_token(self): - """Gets the frontend_token of this InlineResponse2012. # noqa: E501 + def organization_token(self): + """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 """ - return self._frontend_token + return self._organization_token - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this InlineResponse2012. + @organization_token.setter + def organization_token(self, organization_token): + """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 """ - self._frontend_token = frontend_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 + self._organization_token = organization_token def to_dict(self): """Returns the model properties as a dict""" diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2013.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2013.py new file mode 100644 index 00000000..34a37b49 --- /dev/null +++ b/sdk/python/sdk/zrok/zrok_api/models/inline_response2013.py @@ -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 diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_add_body.py b/sdk/python/sdk/zrok/zrok_api/models/organization_add_body.py index 95b9d752..48fd06da 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_add_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/organization_add_body.py @@ -28,50 +28,50 @@ class OrganizationAddBody(object): and the value is json key in definition. """ swagger_types = { - 'token': 'str', + 'organization_token': 'str', 'email': 'str', 'admin': 'bool' } attribute_map = { - 'token': 'token', + 'organization_token': 'organizationToken', 'email': 'email', '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 - self._token = None + self._organization_token = None self._email = 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 email is not None: self.email = email if admin is not None: self.admin = admin @property - def token(self): - """Gets the token of this OrganizationAddBody. # noqa: E501 + def organization_token(self): + """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 """ - return self._token + return self._organization_token - @token.setter - def token(self, token): - """Sets the token of this OrganizationAddBody. + @organization_token.setter + def organization_token(self, organization_token): + """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 """ - self._token = token + self._organization_token = organization_token @property def email(self): diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_body1.py b/sdk/python/sdk/zrok/zrok_api/models/organization_body1.py index 231312ab..45a5afde 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_body1.py +++ b/sdk/python/sdk/zrok/zrok_api/models/organization_body1.py @@ -28,40 +28,40 @@ class OrganizationBody1(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 """OrganizationBody1 - 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 OrganizationBody1. # noqa: E501 + def organization_token(self): + """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 """ - return self._token + return self._organization_token - @token.setter - def token(self, token): - """Sets the token of this OrganizationBody1. + @organization_token.setter + def organization_token(self, organization_token): + """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 """ - self._token = token + self._organization_token = organization_token def to_dict(self): """Returns the model properties as a dict""" diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_remove_body.py b/sdk/python/sdk/zrok/zrok_api/models/organization_remove_body.py index 1c0b330c..c4a9374d 100644 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_remove_body.py +++ b/sdk/python/sdk/zrok/zrok_api/models/organization_remove_body.py @@ -28,45 +28,45 @@ class OrganizationRemoveBody(object): and the value is json key in definition. """ swagger_types = { - 'token': 'str', + 'organization_token': 'str', 'email': 'str' } attribute_map = { - 'token': 'token', + 'organization_token': 'organizationToken', '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 - self._token = None + self._organization_token = None self._email = None self.discriminator = None - if token is not None: - self.token = token + if organization_token is not None: + self.organization_token = organization_token if email is not None: self.email = email @property - def token(self): - """Gets the token of this OrganizationRemoveBody. # noqa: E501 + def organization_token(self): + """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 """ - return self._token + return self._organization_token - @token.setter - def token(self, token): - """Sets the token of this OrganizationRemoveBody. + @organization_token.setter + def organization_token(self, organization_token): + """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 """ - self._token = token + self._organization_token = organization_token @property def email(self): diff --git a/specs/zrok.yml b/specs/zrok.yml index 80b2b0ea..bd25bd56 100644 --- a/specs/zrok.yml +++ b/specs/zrok.yml @@ -471,7 +471,7 @@ paths: description: organization created schema: properties: - token: + organizationToken: type: string 401: description: unauthorized @@ -488,7 +488,7 @@ paths: in: body schema: properties: - token: + organizationToken: type: string responses: 200: @@ -512,7 +512,7 @@ paths: in: body schema: properties: - token: + organizationToken: type: string email: type: string @@ -574,7 +574,7 @@ paths: in: body schema: properties: - token: + organizationToken: type: string email: type: string @@ -604,7 +604,7 @@ paths: type: array items: properties: - token: + organizationToken: type: string description: type: string diff --git a/ui/src/api/.openapi-generator/FILES b/ui/src/api/.openapi-generator/FILES index 99c8c056..53b2d720 100644 --- a/ui/src/api/.openapi-generator/FILES +++ b/ui/src/api/.openapi-generator/FILES @@ -14,6 +14,7 @@ models/CreateFrontend201Response.ts models/CreateFrontendRequest.ts models/CreateIdentity201Response.ts models/CreateIdentityRequest.ts +models/CreateOrganization201Response.ts models/CreateOrganizationRequest.ts models/DisableRequest.ts models/EnableRequest.ts diff --git a/ui/src/api/apis/AdminApi.ts b/ui/src/api/apis/AdminApi.ts index 7dbae8bb..2e746719 100644 --- a/ui/src/api/apis/AdminApi.ts +++ b/ui/src/api/apis/AdminApi.ts @@ -20,6 +20,7 @@ import type { CreateFrontendRequest, CreateIdentity201Response, CreateIdentityRequest, + CreateOrganization201Response, CreateOrganizationRequest, InviteTokenGenerateRequest, ListFrontends200ResponseInner, @@ -43,6 +44,8 @@ import { CreateIdentity201ResponseToJSON, CreateIdentityRequestFromJSON, CreateIdentityRequestToJSON, + CreateOrganization201ResponseFromJSON, + CreateOrganization201ResponseToJSON, CreateOrganizationRequestFromJSON, CreateOrganizationRequestToJSON, InviteTokenGenerateRequestFromJSON, @@ -92,7 +95,7 @@ export interface DeleteFrontendRequest { } export interface DeleteOrganizationRequest { - body?: VerifyRequest; + body?: CreateOrganization201Response; } export interface GrantsRequest { @@ -245,7 +248,7 @@ export class AdminApi extends runtime.BaseAPI { /** */ - async createOrganizationRaw(requestParameters: CreateOrganizationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async createOrganizationRaw(requestParameters: CreateOrganizationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; @@ -264,12 +267,12 @@ export class AdminApi extends runtime.BaseAPI { body: CreateOrganizationRequestToJSON(requestParameters['body']), }, 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 { + async createOrganization(requestParameters: CreateOrganizationOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.createOrganizationRaw(requestParameters, initOverrides); return await response.value(); } @@ -322,7 +325,7 @@ export class AdminApi extends runtime.BaseAPI { method: 'DELETE', headers: headerParameters, query: queryParameters, - body: VerifyRequestToJSON(requestParameters['body']), + body: CreateOrganization201ResponseToJSON(requestParameters['body']), }, initOverrides); return new runtime.VoidApiResponse(response); diff --git a/ui/src/api/models/AddOrganizationMemberRequest.ts b/ui/src/api/models/AddOrganizationMemberRequest.ts index b1b75412..04fb56f3 100644 --- a/ui/src/api/models/AddOrganizationMemberRequest.ts +++ b/ui/src/api/models/AddOrganizationMemberRequest.ts @@ -24,7 +24,7 @@ export interface AddOrganizationMemberRequest { * @type {string} * @memberof AddOrganizationMemberRequest */ - token?: string; + organizationToken?: string; /** * * @type {string} @@ -56,7 +56,7 @@ export function AddOrganizationMemberRequestFromJSONTyped(json: any, ignoreDiscr } return { - 'token': json['token'] == null ? undefined : json['token'], + 'organizationToken': json['organizationToken'] == null ? undefined : json['organizationToken'], 'email': json['email'] == null ? undefined : json['email'], 'admin': json['admin'] == null ? undefined : json['admin'], }; @@ -68,7 +68,7 @@ export function AddOrganizationMemberRequestToJSON(value?: AddOrganizationMember } return { - 'token': value['token'], + 'organizationToken': value['organizationToken'], 'email': value['email'], 'admin': value['admin'], }; diff --git a/ui/src/api/models/CreateOrganization201Response.ts b/ui/src/api/models/CreateOrganization201Response.ts new file mode 100644 index 00000000..41f1b4a6 --- /dev/null +++ b/ui/src/api/models/CreateOrganization201Response.ts @@ -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'], + }; +} + diff --git a/ui/src/api/models/ListOrganizations200ResponseOrganizationsInner.ts b/ui/src/api/models/ListOrganizations200ResponseOrganizationsInner.ts index 8884889f..59fe49c5 100644 --- a/ui/src/api/models/ListOrganizations200ResponseOrganizationsInner.ts +++ b/ui/src/api/models/ListOrganizations200ResponseOrganizationsInner.ts @@ -24,7 +24,7 @@ export interface ListOrganizations200ResponseOrganizationsInner { * @type {string} * @memberof ListOrganizations200ResponseOrganizationsInner */ - token?: string; + organizationToken?: string; /** * * @type {string} @@ -50,7 +50,7 @@ export function ListOrganizations200ResponseOrganizationsInnerFromJSONTyped(json } return { - 'token': json['token'] == null ? undefined : json['token'], + 'organizationToken': json['organizationToken'] == null ? undefined : json['organizationToken'], 'description': json['description'] == null ? undefined : json['description'], }; } @@ -61,7 +61,7 @@ export function ListOrganizations200ResponseOrganizationsInnerToJSON(value?: Lis } return { - 'token': value['token'], + 'organizationToken': value['organizationToken'], 'description': value['description'], }; } diff --git a/ui/src/api/models/RemoveOrganizationMemberRequest.ts b/ui/src/api/models/RemoveOrganizationMemberRequest.ts index 81ba8ba0..03130c20 100644 --- a/ui/src/api/models/RemoveOrganizationMemberRequest.ts +++ b/ui/src/api/models/RemoveOrganizationMemberRequest.ts @@ -24,7 +24,7 @@ export interface RemoveOrganizationMemberRequest { * @type {string} * @memberof RemoveOrganizationMemberRequest */ - token?: string; + organizationToken?: string; /** * * @type {string} @@ -50,7 +50,7 @@ export function RemoveOrganizationMemberRequestFromJSONTyped(json: any, ignoreDi } return { - 'token': json['token'] == null ? undefined : json['token'], + 'organizationToken': json['organizationToken'] == null ? undefined : json['organizationToken'], 'email': json['email'] == null ? undefined : json['email'], }; } @@ -61,7 +61,7 @@ export function RemoveOrganizationMemberRequestToJSON(value?: RemoveOrganization } return { - 'token': value['token'], + 'organizationToken': value['organizationToken'], 'email': value['email'], }; } diff --git a/ui/src/api/models/index.ts b/ui/src/api/models/index.ts index 0f9b8f4f..0d973674 100644 --- a/ui/src/api/models/index.ts +++ b/ui/src/api/models/index.ts @@ -9,6 +9,7 @@ export * from './CreateFrontend201Response'; export * from './CreateFrontendRequest'; export * from './CreateIdentity201Response'; export * from './CreateIdentityRequest'; +export * from './CreateOrganization201Response'; export * from './CreateOrganizationRequest'; export * from './DisableRequest'; export * from './EnableRequest';