Skip to content

Commit cd9a5a2

Browse files
committed
feat: update changeset schema and config
1 parent 0321b4a commit cd9a5a2

File tree

13 files changed

+326
-109
lines changed

13 files changed

+326
-109
lines changed

.changeset/config.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
2-
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
2+
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
33
"changelog": ["@changesets/changelog-github", { "repo": "tkhq/sdk" }],
44
"commit": false,
55
"linked": [],
66
"access": "public",
77
"baseBranch": "main",
8+
"updateInternalDependencies": "patch",
89
"bumpVersionsWithWorkspaceProtocolOnly": true,
910
"ignore": [
1011
"@turnkey/jest-config",

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
uses: changesets/action@06245a4e0a36c064a573d4150030f5ec548e4fcc # v1.4.10
6060
with:
6161
version: pnpm run changeset version # Updates versions and changelog
62-
# publish: pnpm run changeset publish # Publishes to npm
62+
publish: pnpm run changeset publish # Publishes to npm
6363
env:
6464
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For changelog links
65-
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # For npm publish
65+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # For npm publish

packages/sdk-react/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"@turnkey/sdk-browser": "workspace:*",
6161
"@turnkey/sdk-server": "workspace:*",
6262
"@turnkey/wallet-stamper": "workspace:*",
63+
"@turnkey/sdk-types": "workspace:*",
6364
"libphonenumber-js": "^1.11.14",
6465
"next": "^15.2.3 ",
6566
"react-apple-login": "^1.1.6",

packages/sdk-react/src/components/auth/Auth.tsx

+2-5
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,8 @@ import { FilterType, OtpType, authErrors } from "./constants";
1818
import type { TurnkeyApiTypes, WalletAccount } from "@turnkey/sdk-browser";
1919
import { server } from "@turnkey/sdk-server";
2020
import parsePhoneNumberFromString from "libphonenumber-js";
21+
import { SessionType } from "@turnkey/sdk-types";
2122

22-
export enum SessionType {
23-
READ_ONLY = "SESSION_TYPE_READ_ONLY",
24-
READ_WRITE = "SESSION_TYPE_READ_WRITE",
25-
}
2623
export interface PasskeyConfig {
2724
displayName?: string;
2825
name?: string;
@@ -243,7 +240,7 @@ const Auth: React.FC<AuthProps> = ({
243240
const handleOtpLogin = async (
244241
type: FilterType.Email | FilterType.PhoneNumber,
245242
value: string,
246-
otpType: string,
243+
otpType: string
247244
) => {
248245
setLoading(otpType);
249246
const createSuborgData: Record<string, any> = {};

packages/sdk-types/README.md

Whitespace-only changes.

packages/sdk-types/package.json

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"name": "@turnkey/sdk-types",
3+
"version": "0.0.1",
4+
"main": "dist/index.js",
5+
"types": "dist/index.d.ts",
6+
"files": [
7+
"dist/**/*",
8+
"CHANGELOG.md"
9+
],
10+
"scripts": {
11+
"build": "rollup -c",
12+
"prepublishOnly": "pnpm run build",
13+
"clean": "rimraf ./dist ./.cache",
14+
"typecheck": "tsc -p tsconfig.typecheck.json"
15+
},
16+
"module": "./dist/index.mjs",
17+
"exports": {
18+
".": {
19+
"types": "./dist/index.d.ts",
20+
"import": "./dist/index.mjs",
21+
"require": "./dist/index.js",
22+
"default": "./dist/index.mjs"
23+
}
24+
},
25+
"license": "Apache-2.0",
26+
"description": "Turnkey SDK Types",
27+
"keywords": [
28+
"Turnkey"
29+
],
30+
"author": {
31+
"name": "Turnkey",
32+
"url": "https://turnkey.com"
33+
},
34+
"homepage": "https://github.com/tkhq/sdk/packages/sdk-types#readme",
35+
"bugs": {
36+
"url": "https://github.com/tkhq/sdk/issues"
37+
},
38+
"repository": {
39+
"type": "git",
40+
"url": "https://github.com/tkhq/sdk.git",
41+
"directory": "packages/sdk-types"
42+
},
43+
"publishConfig": {
44+
"access": "restricted"
45+
},
46+
"private": true,
47+
"devDependencies": {
48+
"typescript": "^5.4.3"
49+
},
50+
"engines": {
51+
"node": ">=18.0.0"
52+
}
53+
}

packages/sdk-types/rollup.config.mjs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import rollup from "../../rollup.config.base.mjs";
2+
3+
export default (options) => rollup();

packages/sdk-types/src/index.ts

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
export enum SessionType {
2+
READ_ONLY = "SESSION_TYPE_READ_ONLY",
3+
READ_WRITE = "SESSION_TYPE_READ_WRITE",
4+
}
5+
6+
export type Session = {
7+
sessionType: SessionType;
8+
userId: string;
9+
organizationId: string;
10+
expiry: number;
11+
token: string;
12+
};
13+
14+
export type SessionResponse = {
15+
session: Session;
16+
user: {
17+
id: string;
18+
name: string;
19+
email: string;
20+
organizationId: string;
21+
organizationName: string;
22+
};
23+
};

packages/sdk-types/tsconfig.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": "../../tsconfig.base.json",
3+
"compilerOptions": {
4+
"outDir": "./dist",
5+
"rootDir": "./src",
6+
"strict": true,
7+
"esModuleInterop": true,
8+
"skipLibCheck": true,
9+
"forceConsistentCasingInFileNames": true
10+
},
11+
"include": ["src/**/*"],
12+
"exclude": ["node_modules", "dist"]
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "../../tsconfig.base.json",
3+
"compilerOptions": {
4+
"noEmit": true,
5+
"tsBuildInfoFile": "./.cache/.typecheck.tsbuildinfo"
6+
},
7+
"include": ["src/**/*.ts"]
8+
}

packages/sdk-types/turbo.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": ["//"],
3+
"tasks": {
4+
"build": {
5+
"outputs": ["dist/**"]
6+
}
7+
}
8+
}

packages/sdk-types/typedoc.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"entryPoints": ["src/index.ts"],
3+
"excludeInternal": true,
4+
"includeVersion": true,
5+
"fileExtension": ".mdx",
6+
"plugin": ["typedoc-plugin-markdown"],
7+
"projectDocuments": ["documents/*.md"],
8+
"outputs": [
9+
{
10+
// requires typedoc-plugin-markdown
11+
"name": "markdown",
12+
"path": "./docs/markdown",
13+
"fileExtension": ".mdx"
14+
}
15+
]
16+
}

0 commit comments

Comments
 (0)