8 Commits

Author SHA1 Message Date
7ba341203d Quick-fix
All checks were successful
Setup testing environment and test the code / build (push) Successful in 1m6s
Publish to NPM / build-and-publish (release) Successful in 36s
2026-04-08 16:44:41 +02:00
54d466fb27 Quick-fix
All checks were successful
Publish to NPM / build-and-publish (release) Successful in 34s
Setup testing environment and test the code / build (push) Successful in 1m30s
2026-04-08 16:37:32 +02:00
07d30f7e83 Quick-fix
All checks were successful
Setup testing environment and test the code / build (push) Successful in 1m28s
2026-04-08 14:22:58 +02:00
cd806b7d17 Update package.json
Some checks failed
Setup testing environment and test the code / build (push) Has been cancelled
2026-04-08 13:59:00 +02:00
7daf542961 Update .gitea/workflows/publish.yml
Some checks failed
Setup testing environment and test the code / build (push) Has been cancelled
2026-04-08 13:55:29 +02:00
f911224847 Update .gitea/workflows/publish.yml
Some checks failed
Setup testing environment and test the code / build (push) Has been cancelled
2026-04-08 13:53:45 +02:00
c8d2de9f9d Merge remote-tracking branch 'origin/main'
Some checks failed
Setup testing environment and test the code / build (push) Has been cancelled
2026-04-08 13:51:47 +02:00
f8de78f3ab Type fixes 2026-04-08 13:51:43 +02:00
9 changed files with 47 additions and 13 deletions

View File

@@ -22,8 +22,9 @@ jobs:
- name: Build TypeScript
run: npm run build
- name: Add NPM token
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
- name: Publish to NPM
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --access public

3
.gitignore vendored
View File

@@ -13,4 +13,5 @@ yarn-error.log*
.DS_Store
.env
.env.*
!.env.example
!.env.example
/dist

6
README.md Normal file
View File

@@ -0,0 +1,6 @@
# Chatenium SDK For TypeScript
A library for interacting with the Chatenium API.
## Quick Start
```aiignore
npm install @chatenium/chatenium-sdk
```

View File

@@ -1,8 +1,28 @@
{
"name": "chatenium-sdk",
"version": "1.0.0",
"name": "@chatenium/chatenium-sdk",
"version": "1.0.3",
"description": "A library for interacting with the Chatenium API",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.js"
},
"./core/*": "./dist/core/*.js",
"./services/*": "./dist/services/*.js",
"./domain/*": "./dist/domain/*.js",
"./mocks/*": "./dist/mocks/*.js",
"./storage/*": "./dist/storage/*.js"
},
"files": [
"dist",
"README.md",
"LICENSE"
],
"scripts": {
"build": "tsc",
"test": "vitest run",
@@ -15,7 +35,7 @@
"typescript": "^5.5.3",
"vitest": "^4.1.2"
},
"private": true,
"private": false,
"dependencies": {
"@faker-js/faker": "^10.4.0",
"axios": "^1.14.0",

View File

@@ -4,6 +4,9 @@ export interface SDKConfig {
wsUrl: string;
}
declare const process: any;
declare const require: any;
const isNode =
typeof process !== 'undefined' &&
typeof process.versions !== 'undefined' &&

View File

@@ -1,5 +1,5 @@
import {PublicUserData} from "./common.schema";
import {GIF} from "./userService.schema";
import {GIF, PersonalUserData} from "./userService.schema";
export interface Session {
userData: PersonalUserData

View File

@@ -11,11 +11,11 @@ export class KeyringMock implements KeyringAPI {
return this.ring[key];
}
getAll(): string[] {
return Object.keys(this.ring);
}
delete(key: string) {
delete this.ring[key];
}
flush() {
this.ring = {};
}
}

View File

@@ -4,7 +4,9 @@ import {FileUploadService} from "./fileUploadService";
describe("fileUploadService", () => {
it('should upload files', async () => {
const service = new FileUploadService("");
const uploadId = await service.uploadFiles("", "", [])
const uploadId = await service.uploadFiles("", "", [], {
fileProgressUpdate: () => {}
})
expect(uploadId).toBe("MockUploadId")
});
})

View File

@@ -4,6 +4,7 @@
"module": "commonjs",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"declaration": true,
"strict": true,
"skipLibCheck": true,
"outDir": "dist"