From 32c985be44de3031c9496ee1390b87635e5707d3 Mon Sep 17 00:00:00 2001 From: Cameron Steele Date: Thu, 12 Sep 2024 12:16:27 -0500 Subject: [PATCH] liblab API documentation update --- api-reference/openapi.json | 2186 ++++++++++++++++++++++++++++++++++-- 1 file changed, 2084 insertions(+), 102 deletions(-) diff --git a/api-reference/openapi.json b/api-reference/openapi.json index b1509be..baaa08a 100644 --- a/api-reference/openapi.json +++ b/api-reference/openapi.json @@ -1,195 +1,2177 @@ { - "openapi": "3.0.1", + "openapi": "3.0.2", "info": { - "title": "OpenAPI Plant Store", - "description": "A sample API that uses a plant store as an example to demonstrate features in the OpenAPI specification", - "license": { - "name": "MIT" + "title": "CELITECH API", + "version": "1.1.0", + "contact": { + "name": "CELITECH", + "email": "support@celitech.com" }, - "version": "1.0.0" + "description": "Welcome to the CELITECH API documentation!\n\nUseful links: [Homepage](https://www.celitech.com) | [Support email](mailto:support@celitech.com) | [Blog](https://www.celitech.com/blog/)\n\n# Introduction\n\nThis guide is your go-to resource for the CELITECH API, with full documentation and schemas.\n\nNeed help? Email us at support@celitech.com.\n\n\"Partners\" refers to online service providers that use our eSIM API. Access levels include Gold, Platinum, and Diamond.\n\n## API\n\nThe CELITECH API is designed for use by partner platforms, including both web and mobile applications. It's assumed all endpoint calls are initiated from the backend of an integrated platform.\n\nAPI URL: `https://api.celitech.net/v1`\n\n## Authentication & Authorization\nCELITECH API uses the OAuth 2.0 protocol for authentication and authorization.\nThe endpoints are protected using client credentials flow which is based on a token exchange. The token has a defined life span (typically 1 hour), after which a new token must be obtained.\n\nTo begin, obtain OAuth 2.0 client credentials ( **CLIENT_ID** & **CLIENT_SECRET** ) from the [CELITECH Dashboard](https://www.dashboard.celitech.com/). Then your client application requests an access token from the CELITECH Authorization Server, extracts a token from the response, and sends the token to the CELITECH API that you want to access.\n\nSecurity Scheme Type: `OAuth2`\n\nFlow type: `clientCredentials`\n\nToken URL: `https://auth.celitech.net/oauth2/token`\n", + "x-logo": { + "url": "/logo.png", + "altText": "CELITECH API" + } }, "servers": [ { - "url": "http://sandbox.mintlify.com" + "url": "https://api.celitech.net/v1" } ], + "components": { + "securitySchemes": { + "oAuth2ClientCredentials": { + "type": "oauth2", + "flows": { + "clientCredentials": { + "tokenUrl": "https://auth.celitech.net/oauth2/token", + "scopes": {} + } + } + } + } + }, "security": [ { - "bearerAuth": [] + "oAuth2ClientCredentials": [] } ], "paths": { - "/plants": { + "/destinations": { + "get": { + "summary": "List Destinations", + "operationId": "listDestinations", + "description": "List Destinations", + "tags": [ + "Destinations" + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "destinations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "France", + "description": "Name of the destination" + }, + "destination": { + "type": "string", + "example": "FRA", + "description": "ISO representation of the destination" + }, + "supportedCountries": { + "type": "array", + "example": [ + "France" + ], + "items": { + "type": "string" + }, + "description": "This array indicates the geographical area covered by a specific destination. If the destination represents a single country, the array will include that country. However, if the destination represents a broader regional scope, the array will be populated with the names of the countries belonging to that region." + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "this is an example error message", + "description": "Message of the error" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "this is an example error message", + "description": "Message of the error" + } + } + } + } + } + } + }, + "x-codeSamples": [ + { + "lang": "typescript", + "source": "import { CelitechSdk } from 'celitech-sdk';\n\n(async () => {\n const celitechSdk = new CelitechSdk({\n token: 'YOUR_TOKEN',\n });\n\n const { data } = await celitechSdk.destinations.listDestinations();\n\n console.log(data);\n})();\n```\n\n