Skip to content

Commit 8c0364f

Browse files
authored
Merge pull request #1 from KusionStack/api-sdk
feat: add kusion server API client and SDKs
2 parents 8480eaa + 888f0ef commit 8c0364f

File tree

262 files changed

+20113
-82
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

262 files changed

+20113
-82
lines changed

.eslintignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Build outputs
2+
dist/
3+
docs/
4+
5+
# Dependencies
6+
node_modules/
7+
8+
# Generated files
9+
*.gen.ts
10+
*.gen.js

.eslintrc.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
root: true,
3+
parser: '@typescript-eslint/parser',
4+
plugins: ['@typescript-eslint'],
5+
extends: [
6+
'eslint:recommended',
7+
'plugin:@typescript-eslint/recommended',
8+
],
9+
};

.github/workflows/docs.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'docs/**'
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Deploy to GitHub Pages
16+
uses: JamesIves/github-pages-deploy-action@4.1.4
17+
with:
18+
branch: gh-pages
19+
folder: docs

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
**/yarn.lock
2+
**/package-lock.json
3+
# Dependencies
4+
node_modules/
5+
**/node_modules/
6+
# Build outputs
7+
dist/
8+

.npmignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Source
2+
src/
3+
examples/
4+
openapi-ts.config.ts
5+
6+
# Config files
7+
.eslintrc
8+
.eslintignore
9+
tsconfig.json
10+
tsconfig.build.json
11+
typedoc.json
12+
13+
# Development files
14+
.github/
15+
docs/
16+
api/
17+
CLA.md
18+
19+
# Git files
20+
.git/
21+
.gitignore
22+
23+
# Dependencies
24+
node_modules/
25+
yarn.lock
26+
package-lock.json
27+
28+
# Only include dist folder for npm package
29+
!dist/

README.md

Lines changed: 62 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,70 @@
1-
# .github
1+
# Kusion API Client SDK
22

3-
* [Overview](#overview)
4-
* [GitHub files](#github-files)
5-
* [Contributing](#contributing)
3+
A TypeScript SDK for interacting with the Kusion Server API.
64

7-
## Overview
5+
## Installation
86

9-
This repository stores
10-
[default GitHub template files](https://help.github.com/en/articles/creating-a-default-community-health-file-for-your-organization).
11-
These files apply to all other KusionStack repositories that do not have
12-
their own versions in their `.github/` directory.
7+
Using npm:
8+
```bash
9+
npm install @kusionstack/kusion-api-client-sdk
10+
```
1311

14-
## GitHub files
12+
Using yarn:
13+
```bash
14+
yarn add @kusionstack/kusion-api-client-sdk
15+
```
1516

16-
See [our `.github` documentation](.github/README-templates.md).
17+
## Quick Start
18+
19+
```typescript
20+
import { client, SourceService } from '@kusionstack/kusion-api-client-sdk';
21+
22+
// Configure the client
23+
client.setConfig({
24+
baseUrl: 'http://localhost:80'
25+
});
26+
27+
// Use the SDK
28+
async function example() {
29+
try {
30+
const sources = await SourceService.listSource();
31+
console.log('Sources:', sources.data);
32+
} catch (error) {
33+
console.error('Error:', error);
34+
}
35+
}
36+
```
37+
38+
## Features
39+
40+
- 🔒 Type-safe API interactions
41+
- 🚀 Promise-based async operations
42+
- ⚡️ Modern TypeScript support
43+
- 🛠 Built-in error handling
44+
45+
## Documentation
46+
47+
Visit our [API documentation](https://kusionstack.github.io/kusion-typescript-sdk/)
48+
For examples, please refer to:
49+
50+
- [Example Usage](examples/)
1751

1852
## Contributing
1953

20-
See [the contributing document](CONTRIBUTING.md).
54+
We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details.
55+
56+
## License
57+
58+
This project is licensed under the [Apache License 2.0](LICENSE).
59+
60+
## Support
61+
62+
If you encounter any issues or have questions:
63+
- Open an [issue](https://github.com/KusionStack/kusion/issues)
64+
- Join our community discussions
65+
- Check our [documentation](docs/)
66+
67+
## Related Projects
68+
69+
- [Kusion](https://github.com/KusionStack/kusion) - The main Kusion project
70+
- [KusionStack](https://github.com/KusionStack) - The KusionStack organization

0 commit comments

Comments
 (0)