Skip to content

Commit

Permalink
Updates SDK Home to include TS SDK (#891)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickzelei committed Dec 18, 2023
1 parent 02c51ae commit ec9e324
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
20 changes: 15 additions & 5 deletions docs/protos/home.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,23 @@ Neosync, like many web services these days, is a full-fledged API. Check out the
All of our APIs are generated from Protobuf files. For this reason, a client can easily be generated in any of the many supported languages.
Internally, we make great use of the Go SDK as well as the TypeScript SDK.

## Generating a client
## Clients

### Go

The Go SDK can be easily generated, or the SDK that is committed to the Neosync repo may be freely imported and utilized.
See the [Go SDK](./go.mdx) page for more information on how to do this.
The Go SDK that is committed to the Neosync repo may be freely imported and utilized.
See the [Go SDK](./go.mdx) page for more information on how to use the SDK.

### Other languages
All of the generated code lives [here](https://github.com/nucleuscloud/neosync/tree/main/backend/gen/go/protos/mgmt/v1alpha1).

We are working on publishing Neosync SDKs in a few other languages, but as the Neosync protos are public, they can be downloaded separately and used to generate a client in the chosen language using `protoc` or `buf`.
### TypeScript

The TypeScript SDK is published to the `npm` registry. It is generated from Neosync protos and is used by the Neosync App.
See the [TS SDK](./typescript.mdx) page for more information on how to use the SDK.

All of the generated code lives [here](https://github.com/nucleuscloud/neosync/tree/main/frontend/packages/sdk).

### Protos

All of Neosync's protos are public and can be found [here](https://github.com/nucleuscloud/neosync/tree/main/backend/protos).
A new SDK can be easily generated by augmenting the `buf.gen.yaml` file, or providing a separate one when running the `buf` cli to generate a different SDK for other purposes.
2 changes: 1 addition & 1 deletion docs/protos/mgmt/v1alpha1/connection.proto.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ _**package** mgmt.v1alpha1_


### `AwsS3ConnectionConfig`
<ProtoMessage key={0} message={{"name":"AwsS3ConnectionConfig","longName":"AwsS3ConnectionConfig","fullName":"mgmt.v1alpha1.AwsS3ConnectionConfig","description":"","hasExtensions":false,"hasFields":true,"hasOneofs":true,"extensions":[],"fields":[{"name":"bucket_arn","description":"","label":"","type":"string","longType":"string","fullType":"string","ismap":false,"isoneof":false,"oneofdecl":"","defaultValue":""},{"name":"path_prefix","description":"","label":"optional","type":"string","longType":"string","fullType":"string","ismap":false,"isoneof":true,"oneofdecl":"_path_prefix","defaultValue":""},{"name":"credentials","description":"","label":"optional","type":"AwsS3Credentials","longType":"AwsS3Credentials","fullType":"mgmt.v1alpha1.AwsS3Credentials","ismap":false,"isoneof":true,"oneofdecl":"_credentials","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/connection.proto#awss3credentials"},{"name":"region","description":"","label":"optional","type":"string","longType":"string","fullType":"string","ismap":false,"isoneof":true,"oneofdecl":"_region","defaultValue":""},{"name":"endpoint","description":"","label":"optional","type":"string","longType":"string","fullType":"string","ismap":false,"isoneof":true,"oneofdecl":"_endpoint","defaultValue":""}]}} />
<ProtoMessage key={0} message={{"name":"AwsS3ConnectionConfig","longName":"AwsS3ConnectionConfig","fullName":"mgmt.v1alpha1.AwsS3ConnectionConfig","description":"","hasExtensions":false,"hasFields":true,"hasOneofs":true,"extensions":[],"fields":[{"name":"bucket_arn","description":"","label":"","type":"string","longType":"string","fullType":"string","ismap":false,"isoneof":false,"oneofdecl":"","defaultValue":"","options":{"deprecated":true}},{"name":"path_prefix","description":"","label":"optional","type":"string","longType":"string","fullType":"string","ismap":false,"isoneof":true,"oneofdecl":"_path_prefix","defaultValue":""},{"name":"credentials","description":"","label":"optional","type":"AwsS3Credentials","longType":"AwsS3Credentials","fullType":"mgmt.v1alpha1.AwsS3Credentials","ismap":false,"isoneof":true,"oneofdecl":"_credentials","defaultValue":"","typeLink":"/api/mgmt/v1alpha1/connection.proto#awss3credentials"},{"name":"region","description":"","label":"optional","type":"string","longType":"string","fullType":"string","ismap":false,"isoneof":true,"oneofdecl":"_region","defaultValue":""},{"name":"endpoint","description":"","label":"optional","type":"string","longType":"string","fullType":"string","ismap":false,"isoneof":true,"oneofdecl":"_endpoint","defaultValue":""},{"name":"bucket","description":"","label":"","type":"string","longType":"string","fullType":"string","ismap":false,"isoneof":false,"oneofdecl":"","defaultValue":""}]}} />


### `AwsS3Credentials`
Expand Down
5 changes: 5 additions & 0 deletions docs/protos/typescript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ import { DocPageHeader } from '@site/src/CustomComponents/DocPageHeader.tsx';
## Introduction

The Neosync TS SDK is publicly available and can be added to any TS/JS-based project.
This package supports both ES-Modules and CommonJS.

The correct entrypoint will be chosen based on using `import` or `require`.

The `tsup` package is used to generated the distributed code.

Neosync's Dashboard App is the primary user of the TS SDK today, and can be used as a reference for examples of how to use the SDK.

Expand Down

0 comments on commit ec9e324

Please sign in to comment.