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

[api] Update ts and go api files (devbox run gen) #354

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

mikeland73
Copy link
Contributor

@mikeland73 mikeland73 commented Jul 24, 2024

Summary

  • Update api gen files with newest package name.
  • Update ts/package.json to get it ready for publish.

How was it tested?

devbox -c api/ts build
devbox -c api/ts lint
devbox -c api/ts fmt

@mikeland73 mikeland73 requested review from loreto and LucilleH July 24, 2024 00:26
@mikeland73 mikeland73 changed the title [api] Update api [api] Update ts and go api files (devbox run gen) Jul 24, 2024
import { SandboxService } from '@jetify/client';

const transport = createConnectTransport({
baseUrl: process.env.JETIFY_API_URL || 'https://api.jetpack.io',
Copy link
Contributor

@LucilleH LucilleH Jul 24, 2024

Choose a reason for hiding this comment

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

jetpack.io? I forgot we did not migrate the apisvc domain 😮‍💨

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I realized while testing as well. We should do that at some point.


const client = createPromiseClient(SandboxService, transport);

const response = await client.createSandbox(
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if this is the best interface for the user. Ideally, our package does the above (connect transport, etc) under the hood:

const client = new JetifyClient({ accessToken: process.env.JETIFY_API_TOKEN })

const response = await client.createSandbox(...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

100% agreed. I just want to get this out there as version 0.1.0-dev and then iterate.

I'm sure there will be opinions on what the interface should be, so I would rather have those in follow up.

@mikeland73 mikeland73 merged commit 1f49592 into main Jul 24, 2024
1 check passed
@mikeland73 mikeland73 deleted the landau/update-api branch July 24, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants