postiz/apps/docs/openapi.json

2 lines
18 KiB
JSON

{"openapi":"3.0.0","paths":{"/auth":{"post":{"operationId":"AuthController_checkOrgAndUser","summary":"Check org and user","description":"Checking that the bot that in the server is actually authenticated","parameters":[{"name":"serverkey","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationCreateValidator"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Authentications"]}},"/auth/registration":{"post":{"operationId":"AuthController_register","summary":"Register to crosspublic","description":"This will create an organization and a user","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationValidator"}}}},"responses":{"201":{"description":""}},"tags":["Authentications"]}},"/auth/login":{"post":{"operationId":"AuthController_login","summary":"Login to crosspublic","description":"This will login the user","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginValidator"}}}},"responses":{"201":{"description":""}},"tags":["Authentications"]}},"/stripe":{"post":{"operationId":"StripeController_stripe","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Stripe"]}},"/public/categories":{"get":{"operationId":"PublicCategoriesController_categories","summary":"Categories List","description":"Get all categories from organization \n\n **[WARNING]**: This endpoint requires the PRO package","parameters":[{"name":"apikey","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Public"]}},"/public/categories/{slug}/faqs":{"get":{"operationId":"PublicCategoriesController_allFaqsFromCategories","summary":"FAQ List","description":"Get all faqs from category slug \n\n **[WARNING]**: This endpoint requires the PRO package","parameters":[{"name":"apikey","in":"header","required":true,"schema":{"type":"string"}},{"name":"slug","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Public"]}},"/public/faq/{slug}":{"get":{"operationId":"PublicFaqController_getFaqBySlug","summary":"Retrieve FAQ","description":"Get FAQ by slug \n\n **[WARNING]**: This endpoint requires the PRO package","parameters":[{"name":"apikey","in":"header","required":true,"schema":{"type":"string"}},{"name":"slug","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Public"]}},"/public/styles":{"get":{"operationId":"PublicStyleController_getOrganizationStyle","summary":"Get organization style","description":"Get organization style \n\n **[WARNING]**: This endpoint requires the PRO package","parameters":[{"name":"apikey","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Public"]}},"/users/sign-in":{"get":{"operationId":"UsersController_signIn","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Users"]}},"/users/self":{"get":{"operationId":"UsersController_getUser","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Users"]}},"/users/revalidate":{"post":{"operationId":"UsersController_revalidate","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Users"]}},"/faq/{id}":{"delete":{"operationId":"FaqController_deleteFaq","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Faq"]},"get":{"operationId":"FaqController_getFaq","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Faq"]},"put":{"operationId":"FaqController_updateFaq","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFaqValidator"}}}},"responses":{"200":{"description":""}},"tags":["Faq"]}},"/faq/order":{"post":{"operationId":"FaqController_orderFaqs","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderValidator"}}}},"responses":{"201":{"description":""}},"tags":["Faq"]}},"/faq/{id}/category/{category}":{"put":{"operationId":"FaqController_changeFaqCategory","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"category","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Faq"]}},"/faq":{"post":{"operationId":"FaqController_createFaq","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFaqValidator"}}}},"responses":{"201":{"description":""}},"tags":["Faq"]}},"/faq/job":{"post":{"operationId":"FaqController_createJob","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesListValidator"}}}},"responses":{"201":{"description":""}},"tags":["Faq"]}},"/faq/jobs/questions":{"post":{"operationId":"FaqController_getJobQuestions","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnlyMessagesList"}}}},"responses":{"201":{"description":""}},"tags":["Faq"]}},"/faq/answers":{"post":{"operationId":"FaqController_getJobAnswers","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnsweredQuestion"}}}},"responses":{"201":{"description":""}},"tags":["Faq"]}},"/faq/jobs/{id}":{"get":{"operationId":"FaqController_getJobById","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Faq"]}},"/categories/order":{"post":{"operationId":"CategoriesController_orderCategories","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderValidator"}}}},"responses":{"201":{"description":""}},"tags":["Categories"]}},"/categories":{"get":{"operationId":"CategoriesController_getCategories","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Categories"]},"post":{"operationId":"CategoriesController_createCategory","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCategoryValidator"}}}},"responses":{"201":{"description":""}},"tags":["Categories"]}},"/categories/faq":{"get":{"operationId":"CategoriesController_getFaqs","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Categories"]}},"/categories/{id}":{"put":{"operationId":"CategoriesController_updateCategory","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCategoryValidator"}}}},"responses":{"200":{"description":""}},"tags":["Categories"]},"delete":{"operationId":"CategoriesController_deleteCategory","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCategoryValidator"}}}},"responses":{"200":{"description":""}},"tags":["Categories"]},"get":{"operationId":"CategoriesController_getCategory","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Categories"]}},"/settings":{"get":{"operationId":"SettingsController_getSettings","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Settings"]}},"/settings/check-subdomain":{"post":{"operationId":"SettingsController_checkSubdomain","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckSubdomainValidator"}}}},"responses":{"201":{"description":""}},"tags":["Settings"]}},"/settings/check-domain/{id}":{"get":{"operationId":"SettingsController_checkDomain","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Settings"]}},"/settings/delete-domain/{id}":{"delete":{"operationId":"SettingsController_deleteDomain","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}},"tags":["Settings"]}},"/settings/domain":{"post":{"operationId":"SettingsController_addDomain","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDomainValidator"}}}},"responses":{"201":{"description":""}},"tags":["Settings"]}},"/settings/subDomain":{"post":{"operationId":"SettingsController_subDomain","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckSubdomainValidator"}}}},"responses":{"201":{"description":""}},"tags":["Settings"]}},"/billing/check/{id}":{"get":{"operationId":"BillingController_checkId","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Billings"]}},"/billing/subscribe":{"post":{"operationId":"BillingController_subscribe","summary":"Subscribe to a plan","description":"Subscribe to a plan","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSubscribeValidator"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Billings"]}},"/billing/modify":{"post":{"operationId":"BillingController_modifyPayment","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Billings"]}},"/billing":{"get":{"operationId":"BillingController_getCurrentBilling","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Billings"]}},"/billing/cancel":{"post":{"operationId":"BillingController_cancel","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Billings"]}},"/styles":{"get":{"operationId":"StylesController_getStyles","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Styles"]},"put":{"operationId":"StylesController_updateStyles","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStyleValidator"}}}},"responses":{"200":{"description":""}},"tags":["Styles"]}},"/integrations":{"get":{"operationId":"IntegrationsController_getIntegrations","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Integrations"]},"post":{"operationId":"IntegrationsController_create","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIntegrationValidator"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Integrations"]}},"/integrations/{type}/add":{"get":{"operationId":"IntegrationsController_createIntegration","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}},{"name":"type","required":true,"in":"path","schema":{"enum":["slack","discord"],"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Integrations"]}},"/integrations/{id}":{"delete":{"operationId":"IntegrationsController_delete","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Integrations"]}},"/invite":{"post":{"operationId":"InviteController_create","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationsValidator"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Invitations"]}},"/invite/add":{"post":{"operationId":"InviteController_add","parameters":[{"name":"auth","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Invitations"]}}},"info":{"title":"crosspublic Swagger file","description":"API description","version":"1.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"OrganizationCreateValidator":{"type":"object","properties":{"serverName":{"type":"string"},"guildId":{"type":"string"},"isOwner":{"type":"boolean"},"internalId":{"type":"string"},"name":{"type":"string"}},"required":["serverName","guildId","isOwner","internalId","name"]},"RegistrationValidator":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string","minLength":3},"company":{"type":"string","minLength":3},"token":{"type":"string"}},"required":["email","password","company"]},"LoginValidator":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string","minLength":3}},"required":["email","password"]},"OrderListValidator":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"}},"required":["id","order"]},"OrderValidator":{"type":"object","properties":{"order":{"type":"array","items":{"$ref":"#/components/schemas/OrderListValidator"}}},"required":["order"]},"CreateFaqValidator":{"type":"object","properties":{"question":{"type":"string","minLength":3},"answer":{"type":"string","minLength":3},"categoryId":{"type":"string"}},"required":["question","answer","categoryId"]},"MessageList":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"]},"MessagesListValidator":{"type":"object","properties":{"reference":{"type":"string"},"messagesList":{"type":"array","items":{"$ref":"#/components/schemas/MessageList"}}},"required":["reference","messagesList"]},"OnlyMessagesList":{"type":"object","properties":{"messagesList":{"type":"array","items":{"$ref":"#/components/schemas/MessageList"}}},"required":["messagesList"]},"AnsweredQuestion":{"type":"object","properties":{"messagesList":{"type":"array","items":{"$ref":"#/components/schemas/MessageList"}},"question":{"type":"string"}},"required":["messagesList","question"]},"CreateCategoryValidator":{"type":"object","properties":{"name":{"type":"string","minLength":3},"editor":{"type":"string","minLength":3}},"required":["name","editor"]},"DeleteCategoryValidator":{"type":"object","properties":{"category":{"type":"string"}},"required":["category"]},"CheckSubdomainValidator":{"type":"object","properties":{"subDomain":{"type":"string","minLength":3}},"required":["subDomain"]},"AddDomainValidator":{"type":"object","properties":{"domain":{"type":"string","pattern":"/^(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}$/"}},"required":["domain"]},"BillingSubscribeValidator":{"type":"object","properties":{"period":{"type":"object","enum":["MONTHLY","YEARLY"]},"billing":{"type":"string","enum":["BASIC","PRO"]}},"required":["period","billing"]},"UpdateStyleValidator":{"type":"object","properties":{"name":{"type":"string","minLength":1},"topBarColor":{"type":"string"},"topBarTextColor":{"type":"string"},"backgroundColor":{"type":"string"},"pageTextColor":{"type":"string"},"pageBlockColor":{"type":"string"},"brandingText":{"type":"string"}},"required":["name","topBarColor","topBarTextColor","backgroundColor","pageTextColor","pageBlockColor","brandingText"]},"CreateIntegrationValidator":{"type":"object","properties":{"type":{"type":"string","enum":["discord","slack"]},"information":{"type":"object"}},"required":["type","information"]},"InvitationsValidator":{"type":"object","properties":{"type":{"type":"string","enum":["discord","slack"]},"information":{"type":"object"}},"required":["type","information"]}}}}