diff --git a/node-sdk/lib/demostf-api-types/package.json b/node-sdk/lib/demostf-api-types/package.json new file mode 100644 index 0000000..a388825 --- /dev/null +++ b/node-sdk/lib/demostf-api-types/package.json @@ -0,0 +1,15 @@ +{ + "name": "logstf-api-types", + "version": "0.0.0", + "license": "MIT", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "scripts": { + "build": "tsup" + }, + "devDependencies": { + "@types/node": "^18.11.17", + "tsup": "^6.5.0", + "typescript": "^4.9.4" + } +} diff --git a/node-sdk/lib/demostf-api-types/src/index.ts b/node-sdk/lib/demostf-api-types/src/index.ts new file mode 100644 index 0000000..e69de29 diff --git a/node-sdk/lib/demostf-api-types/src/types/demo.ts b/node-sdk/lib/demostf-api-types/src/types/demo.ts new file mode 100644 index 0000000..83ab9e9 --- /dev/null +++ b/node-sdk/lib/demostf-api-types/src/types/demo.ts @@ -0,0 +1,71 @@ +export type Demo = { + /** + * Unique ID of the Demo + */ + id: number; + + /** + * The download URL for the demo file + */ + url: string; + + /** + * The name of the demo file + */ + name: string; + + /** + * The name of server during the game + */ + server: string; + + /** + * The length of the match in seconds + */ + duration: number; + + /** + * The nickname of the user recording the demo + */ + nick: string; + + /** + * The name of the map that was played + */ + map: string; + + /** + * The time the demo was uploaded as a unix timestamp + */ + time: number; + + /** + * The name of the RED team during the match + */ + red: string; + + /** + * The name of the BLU team during the match + */ + blue: string; + + /** + * The ending score of the RED team + */ + redScore: number; + + /** + * The ending score of the BLU team + */ + blueScore: number; + + /** + * The number of players in the game + */ + playerCount: number; + + /** + * The unique id of the user who uploaded the demo + */ + uploader: number; +}; diff --git a/node-sdk/lib/demostf-api-types/tsconfig.json b/node-sdk/lib/demostf-api-types/tsconfig.json new file mode 100644 index 0000000..12430c4 --- /dev/null +++ b/node-sdk/lib/demostf-api-types/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "@sapphire/ts-config", + "compilerOptions": { + "rootDir": "src", + "module": "ESNext", + "target": "ESNext", + "outDir": "dist", + "emitDecoratorMetadata": false, + "tsBuildInfoFile": "dist/.tsbuildinfo", + "skipLibCheck": true, + "baseUrl": "src", + "lib": ["ESNext"], + "removeComments": true + } +} diff --git a/node-sdk/lib/demostf-api-types/tsup.config.ts b/node-sdk/lib/demostf-api-types/tsup.config.ts new file mode 100644 index 0000000..21aeb9a --- /dev/null +++ b/node-sdk/lib/demostf-api-types/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; + +export default defineConfig({ + clean: false, + bundle: false, + dts: true, + entry: ["src/**/*.ts", "!src/**/*.d.ts"], + format: ["esm", "cjs"], + minify: false, + tsconfig: "tsconfig.json", + target: "esnext", + splitting: false, + skipNodeModulesBundle: true, + sourcemap: true, + shims: false, + keepNames: true, +}); diff --git a/node-sdk/sdks/demostf/package.json b/node-sdk/sdks/demostf/package.json new file mode 100644 index 0000000..354d636 --- /dev/null +++ b/node-sdk/sdks/demostf/package.json @@ -0,0 +1,20 @@ +{ + "name": "demostf", + "version": "0.0.0", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "license": "MIT", + "private": false, + "scripts": { + "build": "tsup" + }, + "dependencies": { + "common": "*" + }, + "devDependencies": { + "@sapphire/ts-config": "^3.3.4", + "@types/node": "^18.11.17", + "tsup": "^6.5.0", + "typescript": "^4.9.4" + } +} diff --git a/node-sdk/sdks/demostf/src/demostf.ts b/node-sdk/sdks/demostf/src/demostf.ts new file mode 100644 index 0000000..ed2a7ea --- /dev/null +++ b/node-sdk/sdks/demostf/src/demostf.ts @@ -0,0 +1,7 @@ +export class Demostf { + #apiKey: string; + + constructor(apiKey: string) { + this.#apiKey = apiKey; + } +} diff --git a/node-sdk/sdks/demostf/src/index.ts b/node-sdk/sdks/demostf/src/index.ts new file mode 100644 index 0000000..e69de29 diff --git a/node-sdk/sdks/demostf/tsconfig.json b/node-sdk/sdks/demostf/tsconfig.json new file mode 100644 index 0000000..12430c4 --- /dev/null +++ b/node-sdk/sdks/demostf/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "@sapphire/ts-config", + "compilerOptions": { + "rootDir": "src", + "module": "ESNext", + "target": "ESNext", + "outDir": "dist", + "emitDecoratorMetadata": false, + "tsBuildInfoFile": "dist/.tsbuildinfo", + "skipLibCheck": true, + "baseUrl": "src", + "lib": ["ESNext"], + "removeComments": true + } +} diff --git a/node-sdk/sdks/demostf/tsup.config.ts b/node-sdk/sdks/demostf/tsup.config.ts new file mode 100644 index 0000000..ab302b2 --- /dev/null +++ b/node-sdk/sdks/demostf/tsup.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from "tsup"; + +export default defineConfig({ + clean: false, + bundle: false, + dts: false, + entry: ["src/**/*.ts", "!src/**/*.d.ts"], + format: ["esm", "cjs"], + minify: false, + tsconfig: "tsconfig.json", + target: "esnext", + splitting: false, + skipNodeModulesBundle: true, + sourcemap: true, + shims: false, + keepNames: true, +});