Skip to content

Commit 948a9ea

Browse files
feature: this commit introduces a new publishable artifact to comanda, a typescript SDK for consumption by the comanda ecosystem.
1 parent 5ad7887 commit 948a9ea

7 files changed

Lines changed: 116 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
node_modules/
2+
.git/
3+
.gitignore
4+
source/
5+
tsconfig.json
6+
*.ts
7+
!dist/**/*.d.ts
8+
.eslintrc.json
9+
.prettierrc.json
10+
jest.config.js
11+
scripts/
12+
.vscode/
13+
.DS_Store
14+
*.log
15+
npm-debug.log*
16+
yarn-error.log*
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"name": "@comanda/sdk",
3+
"version": "1.0.0",
4+
"description": "Comanda SDK - contracts and HTTP clients for the comanda ecosystem",
5+
"main": "dist/index.js",
6+
"types": "dist/index.d.ts",
7+
"exports": {
8+
".": {
9+
"import": "./dist/index.mjs",
10+
"require": "./dist/index.js",
11+
"types": "./dist/index.d.ts"
12+
},
13+
"./contracts": {
14+
"import": "./dist/contracts/index.mjs",
15+
"require": "./dist/contracts/index.js",
16+
"types": "./dist/contracts/index.d.ts"
17+
},
18+
"./clients": {
19+
"import": "./dist/clients/index.mjs",
20+
"require": "./dist/clients/index.js",
21+
"types": "./dist/clients/index.d.ts"
22+
}
23+
},
24+
"files": [
25+
"dist",
26+
"README.md",
27+
"LICENSE"
28+
],
29+
"scripts": {
30+
"build": "tsc",
31+
"build:mjs": "npm run build && node scripts/generate-mjs.js",
32+
"dev": "tsc --watch",
33+
"prepublishOnly": "npm run build"
34+
},
35+
"keywords": [
36+
"comanda",
37+
"sdk",
38+
"http-client",
39+
"contracts"
40+
],
41+
"author": "Comanda",
42+
"license": "MIT",
43+
"devDependencies": {
44+
"@types/node": "^20.10.0",
45+
"typescript": "^5.3.3"
46+
},
47+
"dependencies": {
48+
"axios": "^1.6.2"
49+
},
50+
"publishConfig": {
51+
"access": "public"
52+
}
53+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { ProfileCreationScheme } from "../transport/profiles/profile-creation-scheme";
2+
3+
export class ProfilesClient {
4+
public static async createOwner(parameters: ProfileCreationScheme): Promise<void> {
5+
}
6+
7+
public static async createCustomer(parameters: ProfileCreationScheme): Promise<void> {
8+
}
9+
}

Artifacts/Comanda.Internal.Sdk/source/index.ts

Whitespace-only changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export type ProfileCreationScheme = {
2+
firstName: string;
3+
lastName: string;
4+
phoneNumber: string;
5+
email: string;
6+
userId: string;
7+
username: string;
8+
};
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export type ProfileScheme = {
2+
identifier: string;
3+
firstName: string;
4+
lastName: string;
5+
phoneNumber: string;
6+
email: string;
7+
userId: string;
8+
username: string;
9+
};
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2020",
4+
"module": "commonjs",
5+
"lib": ["ES2020"],
6+
"declaration": true,
7+
"declarationMap": true,
8+
"outDir": "./dist",
9+
"rootDir": "./source",
10+
"composite": false,
11+
"strict": true,
12+
"esModuleInterop": true,
13+
"skipLibCheck": true,
14+
"forceConsistentCasingInFileNames": true,
15+
"resolveJsonModule": true,
16+
"moduleResolution": "node",
17+
"allowSyntheticDefaultImports": true
18+
},
19+
"include": ["source"],
20+
"exclude": ["node_modules", "dist"]
21+
}

0 commit comments

Comments
 (0)