Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: generate JS SDK with openapi spec #434

Merged
merged 48 commits into from
Aug 18, 2024

Conversation

himanshu-dixit
Copy link
Collaborator

No description provided.

@himanshu-dixit himanshu-dixit force-pushed the ft-generate-js-sdk-with-openapi-spec branch from 04addac to b737466 Compare August 14, 2024 07:05
@@ -2,9 +2,10 @@ import { OpenAI } from "openai";
import { OpenAIToolSet } from "composio-core";

const toolset = new OpenAIToolSet({
apiKey: process.env.COMPOSIO_API_KEY,
apiKey: "cc0fu8lookgq1ov8z4xx9n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to revert this change

@@ -0,0 +1,4 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should not be commited

@@ -4,7 +4,8 @@
"description": "",
"main": "demo.mjs",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"debug": "COMPOSIO_API_KEY=cc0fu8lookgq1ov8z4xx9n node sample.mjs"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove COMPOSIO_API_KEY environment variable

//@ts-ignore
import { defineConfig } from "@hey-api/openapi-ts";

export default defineConfig({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this file do and shouldn't it be pointed to staging/prod (with additional support for process.env.BACKEND_URL)

js/src/sdk/client/core/OpenAPI.ts Show resolved Hide resolved
js/src/sdk/models/Entity.ts Outdated Show resolved Hide resolved
@@ -71,8 +76,9 @@ export class Triggers {
});
}

async unsubscribe() {
const clientId = await this.client.getClientId();
static async unsubscribe() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to remove singleton pattern

@himanshu-dixit himanshu-dixit merged commit 43e4e6c into master Aug 18, 2024
6 checks passed
@himanshu-dixit himanshu-dixit deleted the ft-generate-js-sdk-with-openapi-spec branch August 18, 2024 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants