From 28e51811152efd2317aa5c1a86c9b8fbd6aee805 Mon Sep 17 00:00:00 2001 From: Patience Igiraneza Date: Mon, 9 Jun 2025 15:53:27 +0200 Subject: [PATCH] Update configuration files --- config.json | 1338 +-------------------------------------------------- opeapi.yml | 6 +- 2 files changed, 15 insertions(+), 1329 deletions(-) diff --git a/config.json b/config.json index 0ffdaac..073c3f6 100644 --- a/config.json +++ b/config.json @@ -1,1327 +1,13 @@ { - "swagger": "2.0", - "info": { - "title": "Open Xchange Console", - "description": "Test description", - "termsOfService": "https://www.google.com/policies/terms/", - "contact": { - "email": "support@truehost.cloud" - }, - "license": { - "name": "BSD License" - }, - "version": "v1" - }, - "host": "127.0.0.1:8000", - "schemes": [ - "http" - ], - "basePath": "/api", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "securityDefinitions": { - "Basic": { - "type": "basic" - } - }, - "security": [ - { - "Basic": [] - } - ], - "paths": { - "/available-packages/": { - "get": { - "operationId": "available-packages_list", - "summary": "Get available subscriptions.", - "description": "Get available subscriptions.", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/SubscriptionDetails" - } - } - } - }, - "tags": [ - "available-packages" - ] - }, - "parameters": [] - }, - "/change-quota/": { - "post": { - "operationId": "change-quota_create", - "summary": "Change email quota.", - "description": "Change email quota.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ChangeEmailQuota" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "required": [], - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } - } - }, - "tags": [ - "change-quota" - ] - }, - "parameters": [] - }, - "/create-alias/": { - "post": { - "operationId": "create-alias_create", - "summary": "Create email alias.", - "description": "Create email alias.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/EmailAlias" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "required": [], - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } - } - }, - "tags": [ - "create-alias" - ] - }, - "parameters": [] - }, - "/delete-alias/": { - "post": { - "operationId": "delete-alias_create", - "summary": "Delete alias.", - "description": "Delete alias.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DeleteAlias" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "required": [], - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } - } - }, - "tags": [ - "delete-alias" - ] - }, - "parameters": [] - }, - "/delete-email/": { - "post": { - "operationId": "delete-email_create", - "summary": "Delete email.", - "description": "Delete email.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DeleteEmail" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "required": [], - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } - } - }, - "tags": [ - "delete-email" - ] - }, - "parameters": [] - }, - "/dns-info/": { - "post": { - "operationId": "dns-info_create", - "description": "", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "required": [ - "domain", - "client_id", - "email" - ], - "type": "object", - "properties": { - "domain": { - "description": "Domain name", - "type": "string" - }, - "client_id": { - "description": "Client id", - "type": "string" - }, - "email": { - "description": "Email", - "type": "string" - } - } - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "required": [ - "score" - ], - "type": "object", - "properties": { - "score": { - "type": "number" - }, - "message": { - "type": "string" - }, - "domain": { - "type": "string" - }, - "all_dns_score": { - "type": "number" - }, - "found": { - "type": "number" - }, - "total": { - "type": "number" - }, - "missing_dns": { - "type": "array", - "items": { - "type": "object" - } - }, - "other_missing_dns": { - "type": "array", - "items": { - "type": "object" - } - }, - "found_dns": { - "type": "object" - }, - "error": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - }, - "tags": [ - "dns-info" - ] - }, - "parameters": [] - }, - "/domain-alias/": { - "post": { - "operationId": "domain-alias_create", - "summary": "Get domain alias list.", - "description": "Get domain alias list.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Domain" - } - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/AliasDisplay" - } - } - } - }, - "tags": [ - "domain-alias" - ] - }, - "parameters": [] - }, - "/domain-info/": { - "post": { - "operationId": "domain-info_create", - "summary": "Get domain subscription details.", - "description": "Get domain subscription details and emails list.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SubScriptionInfo" - } - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/SubscriptionInfoResponse" - } - } - }, - "tags": [ - "domain-info" - ] - }, - "parameters": [] - }, - "/domain/": { - "post": { - "operationId": "domain_create", - "summary": "Update domain subscription status, delete, suspend, unsuspend, etc...", - "description": "Update domain subscription status. ", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DomainAction" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "required": [], - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } - } - }, - "tags": [ - "domain" - ] - }, - "parameters": [] - }, - "/get-token/": { - "post": { - "operationId": "get-token_create", - "description": "Takes a set of user credentials and returns an access and refresh JSON web\ntoken pair to prove the authentication of those credentials.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/TokenObtainPair" - } - } - ], - "responses": { - "201": { - "description": "", - "schema": { - "$ref": "#/definitions/TokenObtainPair" - } - } - }, - "tags": [ - "get-token" - ] - }, - "parameters": [] - }, - "/import/": { - "post": { - "operationId": "import_create", - "summary": "Bulk create emails.", - "description": "Bulk create emails via uploaded file and domain.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "required": [ - "file", - "domain" - ], - "type": "object", - "properties": { - "file": { - "description": "CSV or excel file containing email accounts", - "type": "string", - "format": "binary" - }, - "domain": { - "description": "Domain to associate with emails", - "type": "string" - } - } - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } - } - }, - "tags": [ - "import" - ] - }, - "parameters": [] - }, - "/refresh-token/": { - "post": { - "operationId": "refresh-token_create", - "description": "Takes a refresh type JSON web token and returns an access type JSON web\ntoken if the refresh token is valid.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/TokenRefresh" - } - } - ], - "responses": { - "201": { - "description": "", - "schema": { - "$ref": "#/definitions/TokenRefresh" - } - } - }, - "tags": [ - "refresh-token" - ] - }, - "parameters": [] - }, - "/reset-password/": { - "post": { - "operationId": "reset-password_create", - "summary": "Reset subscription email password.", - "description": "Reset subscription email password.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PasswordReset" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "required": [], - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } - } - }, - "tags": [ - "reset-password" - ] - }, - "parameters": [] - }, - "/subscription-info/": { - "post": { - "operationId": "subscription-info_create", - "summary": "Get subscription usage info.", - "description": "Get subscription usage info.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SubScriptionInfo" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "required": [], - "type": "object", - "properties": { - "used-emails": { - "type": "number" - }, - "remaining-quota": { - "type": "number" - }, - "remaining-emails": { - "type": "number" - }, - "allowed-emails": { - "type": "number" - }, - "allowed-alias": { - "type": "number" - }, - "remaining-alias": { - "type": "number" - }, - "allowed-quota": { - "type": "number" - } - } - } - } - }, - "tags": [ - "subscription-info" - ] - }, - "parameters": [] - }, - "/subscriptions/": { - "get": { - "operationId": "subscriptions_list", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "" - } - }, - "tags": [ - "subscriptions" - ] - }, - "post": { - "operationId": "subscriptions_create", - "summary": "Create a new email subscription, it will create a new subscription for the domain if emails list is not empty", - "description": "Create a new email subscription", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/OpenExchangeCreateAccount" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "required": [], - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } - } - }, - "tags": [ - "subscriptions" - ] - }, - "parameters": [] - }, - "/subscriptions/{context_id}/": { - "get": { - "operationId": "subscriptions_read", - "summary": "Get subscription details", - "description": "Get subscription details", - "parameters": [], - "responses": { - "200": { - "description": "Success", - "schema": { - "required": [], - "type": "object", - "properties": { - "domain_context": { - "type": "object" - }, - "user_emails": { - "type": "array", - "items": { - "type": "object" - } - }, - "email_aliases": { - "type": "object" - } - } - } - } - }, - "tags": [ - "subscriptions" - ] - }, - "post": { - "operationId": "update_subscription_status", - "summary": "Update subscription status, delete, suspend, unsuspend, etc...", - "description": "Update subscription status. ", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ServiceAction" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "required": [], - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } - } - }, - "tags": [ - "subscriptions" - ] - }, - "parameters": [ - { - "name": "context_id", - "in": "path", - "required": true, - "type": "string" - } - ] - }, - "/upgrade/": { - "post": { - "operationId": "upgrade_create", - "summary": "Upgrade subscription.", - "description": "Upgrade subscription.", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SubScriptionInfo" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "required": [], - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "error": { - "type": "string" - } - } - } - } - }, - "tags": [ - "upgrade" - ] - }, - "parameters": [] - } - }, - "definitions": { - "SubscriptionDetails": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true - }, - "name": { - "title": "Name", - "type": "string", - "maxLength": 255, - "minLength": 1 - }, - "mailbox": { - "title": "Mailbox", - "description": "Number of mailboxes.", - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648 - }, - "quota": { - "title": "Quota", - "description": "Allowed quota number per mailbox in GB.", - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648 - }, - "alias": { - "title": "Alias", - "description": "Allowed number of aliases per mailbox.", - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648 - }, - "forward": { - "title": "Forward", - "description": "Allowed number of forwarding rules per mailbox.", - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648 - }, - "platform": { - "title": "Platform", - "type": "string", - "enum": [ - "whmcs", - "olitt", - "others" - ] - }, - "price": { - "title": "Price", - "type": "string", - "format": "decimal" - } - } - }, - "ChangeEmailQuota": { - "required": [ - "email", - "quota" - ], - "type": "object", - "properties": { - "email": { - "title": "Email", - "type": "string", - "format": "email", - "minLength": 1 - }, - "quota": { - "title": "Quota", - "type": "integer" - } - } - }, - "EmailAlias": { - "required": [ - "email", - "domain", - "alias" - ], - "type": "object", - "properties": { - "email": { - "title": "Email", - "type": "string", - "format": "email", - "minLength": 1 - }, - "domain": { - "title": "Domain", - "type": "string", - "minLength": 1 - }, - "alias": { - "title": "Alias", - "type": "string", - "format": "email", - "minLength": 1 - } - } - }, - "DeleteAlias": { - "required": [ - "email", - "alias", - "domain" - ], - "type": "object", - "properties": { - "email": { - "title": "Email", - "type": "string", - "format": "email", - "minLength": 1 - }, - "alias": { - "title": "Alias", - "type": "string", - "format": "email", - "minLength": 1 - }, - "domain": { - "title": "Domain", - "type": "string", - "minLength": 1 - } - } - }, - "DeleteEmail": { - "required": [ - "email", - "domain", - "subscription" - ], - "type": "object", - "properties": { - "email": { - "title": "Email", - "type": "string", - "format": "email", - "minLength": 1 - }, - "domain": { - "title": "Domain", - "type": "string", - "minLength": 1 - }, - "subscription": { - "title": "Subscription", - "type": "integer" - } - } - }, - "Domain": { - "required": [ - "domain" - ], - "type": "object", - "properties": { - "domain": { - "title": "Domain", - "type": "string", - "minLength": 1 - } - } - }, - "AliasDisplay": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true - }, - "primary_email": { - "title": "Primary email", - "type": "string", - "readOnly": true, - "minLength": 1 - }, - "name": { - "title": "Name", - "type": "string", - "format": "email", - "maxLength": 254, - "minLength": 1 - } - } - }, - "SubScriptionInfo": { - "required": [ - "domain", - "subscription" - ], - "type": "object", - "properties": { - "domain": { - "title": "Domain", - "type": "string", - "minLength": 1 - }, - "subscription": { - "title": "Subscription", - "type": "integer" - } - } - }, - "OrderDisplay": { - "required": [ - "domain" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true - }, - "context_id": { - "title": "Context id", - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648, - "x-nullable": true - }, - "domain": { - "title": "Domain", - "type": "string", - "maxLength": 255, - "minLength": 1 - }, - "enabled": { - "title": "Enabled", - "type": "boolean" - }, - "synched_at": { - "title": "Synched at", - "type": "string", - "format": "date-time", - "x-nullable": true - }, - "average_size": { - "title": "Average size", - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648 - }, - "filestore_id": { - "title": "Filestore id", - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648 - }, - "filestore_name": { - "title": "Filestore name", - "type": "string", - "maxLength": 255, - "x-nullable": true - }, - "max_quota": { - "title": "Max quota", - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648 - }, - "context_name": { - "title": "Context name", - "type": "string", - "maxLength": 255, - "x-nullable": true - }, - "used_quota": { - "title": "Used quota", - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648 - }, - "gab_mode": { - "title": "Gab mode", - "type": "string", - "maxLength": 255, - "x-nullable": true - }, - "is_order_active": { - "title": "Is order active", - "type": "boolean" - }, - "updated_at": { - "title": "Updated at", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "created_at": { - "title": "Created at", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "unallocated_quota": { - "title": "Unallocated quota", - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648 - }, - "unallocated_alias": { - "title": "Unallocated alias", - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648 - }, - "is_alias_calculated": { - "title": "Is alias calculated", - "type": "boolean" - }, - "is_alias_synched": { - "title": "Is alias synched", - "type": "boolean" - }, - "last_dns_check": { - "title": "Last dns check", - "type": "string", - "format": "date-time", - "x-nullable": true - }, - "is_dns_valid": { - "title": "Is dns valid", - "type": "boolean" - }, - "client_id": { - "title": "Client id", - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648, - "x-nullable": true - }, - "is_verified": { - "title": "Is verified", - "type": "boolean" - }, - "subscription": { - "title": "Subscription", - "type": "integer", - "x-nullable": true - } - } - }, - "EmailDisplay": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true - }, - "name": { - "title": "Name", - "type": "string", - "format": "email", - "maxLength": 254, - "minLength": 1 - }, - "email_quota": { - "title": "Email quota", - "description": "Email qoata in GB", - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648 - }, - "max_quota": { - "title": "Max quota", - "description": "Max email qoata in GB", - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648 - }, - "used_quota": { - "title": "Used quota", - "description": "Used qoata in GB", - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648 - }, - "email_id": { - "title": "Email id", - "type": "integer", - "maximum": 2147483647, - "minimum": -2147483648, - "x-nullable": true - }, - "display_name": { - "title": "Display name", - "type": "string", - "maxLength": 255, - "x-nullable": true - }, - "order": { - "title": "Order", - "type": "integer", - "x-nullable": true - } - } - }, - "SubscriptionInfoResponse": { - "required": [ - "info", - "emails" - ], - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/OrderDisplay" - }, - "emails": { - "type": "array", - "items": { - "$ref": "#/definitions/EmailDisplay" - } - } - } - }, - "DomainAction": { - "required": [ - "action", - "domain" - ], - "type": "object", - "properties": { - "action": { - "title": "Action", - "type": "string", - "minLength": 1 - }, - "domain": { - "title": "Domain", - "type": "string", - "minLength": 1 - } - } - }, - "TokenObtainPair": { - "required": [ - "username", - "password" - ], - "type": "object", - "properties": { - "username": { - "title": "Username", - "type": "string", - "minLength": 1 - }, - "password": { - "title": "Password", - "type": "string", - "minLength": 1 - } - } - }, - "TokenRefresh": { - "required": [ - "refresh" - ], - "type": "object", - "properties": { - "refresh": { - "title": "Refresh", - "type": "string", - "minLength": 1 - }, - "access": { - "title": "Access", - "type": "string", - "readOnly": true, - "minLength": 1 - } - } - }, - "PasswordReset": { - "required": [ - "email", - "password" - ], - "type": "object", - "properties": { - "email": { - "title": "Email", - "type": "string", - "format": "email", - "minLength": 1 - }, - "password": { - "title": "Password", - "type": "string", - "minLength": 1 - } - } - }, - "OpenExchangeCreateAccount": { - "required": [ - "emails", - "domain_name", - "subscription", - "new_subscription" - ], - "type": "object", - "properties": { - "emails": { - "type": "array", - "items": { - "type": "string", - "format": "email", - "minLength": 1 - } - }, - "domain_name": { - "title": "Domain name", - "type": "string", - "maxLength": 255, - "minLength": 1 - }, - "subscription": { - "title": "Subscription", - "type": "integer", - "minimum": 0 - }, - "new_subscription": { - "title": "New subscription", - "type": "boolean" - } - } - }, - "ServiceAction": { - "required": [ - "action" - ], - "type": "object", - "properties": { - "action": { - "title": "Action", - "type": "string", - "minLength": 1 - } - } - } - } -} \ No newline at end of file + "packageName": "workplace_console_client", + "projectName": "workplace-console-client", + "packageVersion": "1.0.8", + "packageUrl": "https://github.com/truehostcloud/workplace-python-client", + "packageCompany": "Truehost", + "packageAuthor": "Patience Igiraneza", + "packageEmail": "patience.i@cloudoon.com", + "packageDescription": "Python client for workplace console API", + "generateSourceCodeOnly": false, + "packageKeywords": ["workplace", "console", "api", "client", "email", "oxchange"], + "skipFormModel": false + } \ No newline at end of file diff --git a/opeapi.yml b/opeapi.yml index b250707..56b1ded 100644 --- a/opeapi.yml +++ b/opeapi.yml @@ -1,14 +1,14 @@ swagger: '2.0' info: - title: Open Xchange Console - description: Test description + title: Workplace Console API + description: API for managing email and workplace service subscriptions. termsOfService: https://www.google.com/policies/terms/ contact: email: support@truehost.cloud license: name: BSD License version: v1 -host: 127.0.0.1:8000 +host: https://your-workplace-console.com/ schemes: - http basePath: /api