@buildbase/sdk 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +238 -55
- package/dist/index.esm.js +5 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/saas-os.css +1 -1
- package/dist/types/contexts/AuthContext/index.d.ts +2 -2
- package/dist/types/contexts/AuthContext/reducer.d.ts +0 -1
- package/dist/types/contexts/OSContext/actions.d.ts +2 -0
- package/dist/types/contexts/OSContext/index.d.ts +2 -2
- package/dist/types/contexts/OSContext/reducer.d.ts +1 -1
- package/dist/types/contexts/OSContext/types.d.ts +4 -0
- package/dist/types/contexts/WorkspaceContext/index.d.ts +2 -2
- package/dist/types/contexts/index.d.ts +3 -3
- package/dist/types/contexts/shared/useAppSelector.d.ts +1 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/types/lib/api-client.d.ts +7 -11
- package/dist/types/providers/auth/hooks.d.ts +1 -1
- package/dist/types/providers/auth/types.d.ts +12 -4
- package/dist/types/providers/auth/utils.d.ts +32 -7
- package/dist/types/providers/constants.d.ts +2 -0
- package/dist/types/providers/events/EventEmitter.d.ts +81 -0
- package/dist/types/providers/events/index.d.ts +2 -0
- package/dist/types/providers/events/types.d.ts +61 -0
- package/dist/types/providers/os/hooks.d.ts +5 -0
- package/dist/types/providers/os/types.d.ts +9 -1
- package/dist/types/providers/types.d.ts +9 -0
- package/dist/types/providers/workspace/api.d.ts +13 -3
- package/dist/types/providers/workspace/hooks.d.ts +16 -3
- package/dist/types/providers/workspace/ui/SettingsDanger.d.ts +6 -0
- package/dist/types/providers/workspace/ui/SettingsDialog.d.ts +1 -1
- package/dist/types/providers/workspace/ui/Skeleton.d.ts +1 -0
- package/package.json +12 -5
|
@@ -20,11 +20,21 @@ export declare class WorkspaceApi {
|
|
|
20
20
|
addUser(workspaceId: string, config: {
|
|
21
21
|
email: string;
|
|
22
22
|
role: string;
|
|
23
|
-
}): Promise<
|
|
23
|
+
}): Promise<{
|
|
24
|
+
userId: string;
|
|
25
|
+
workspace: IWorkspace;
|
|
26
|
+
message: string;
|
|
27
|
+
}>;
|
|
24
28
|
removeUser(workspaceId: string, userId: string): Promise<{
|
|
25
|
-
|
|
29
|
+
userId: string;
|
|
30
|
+
workspace: IWorkspace;
|
|
31
|
+
message: string;
|
|
32
|
+
}>;
|
|
33
|
+
updateUser(workspaceId: string, userId: string, data: Partial<IWorkspaceUser>): Promise<{
|
|
34
|
+
userId: string;
|
|
35
|
+
workspace: IWorkspace;
|
|
36
|
+
message: string;
|
|
26
37
|
}>;
|
|
27
|
-
updateUser(workspaceId: string, userId: string, data: Partial<IWorkspaceUser>): Promise<IWorkspaceUser>;
|
|
28
38
|
getFeatures(): Promise<IWorkspaceFeature[]>;
|
|
29
39
|
updateFeature(workspaceId: string, key: string, value: boolean): Promise<IWorkspace>;
|
|
30
40
|
getWorkspace(workspaceId: string): Promise<IWorkspace>;
|
|
@@ -20,11 +20,24 @@ export declare const useSaaSWorkspaces: () => {
|
|
|
20
20
|
switching: boolean;
|
|
21
21
|
updateWorkspace: (ws: IWorkspace, _data: Partial<IWorkspace>) => Promise<void>;
|
|
22
22
|
getUsers: (workspaceId: string) => Promise<IWorkspaceUser[]>;
|
|
23
|
-
addUser: (workspaceId: string, email: string, role: string) => Promise<
|
|
23
|
+
addUser: (workspaceId: string, email: string, role: string) => Promise<{
|
|
24
|
+
userId: string;
|
|
25
|
+
workspace: IWorkspace;
|
|
26
|
+
message: string;
|
|
27
|
+
}>;
|
|
24
28
|
removeUser: (workspaceId: string, userId: string) => Promise<{
|
|
25
|
-
|
|
29
|
+
userId: string;
|
|
30
|
+
workspace: IWorkspace;
|
|
31
|
+
message: string;
|
|
32
|
+
}>;
|
|
33
|
+
updateUser: (workspaceId: string, userId: string, config: Partial<IWorkspaceUser>) => Promise<{
|
|
34
|
+
userId: string;
|
|
35
|
+
workspace: IWorkspace;
|
|
36
|
+
message: string;
|
|
26
37
|
}>;
|
|
27
|
-
updateUser: (workspaceId: string, userId: string, config: Partial<IWorkspaceUser>) => Promise<IWorkspaceUser>;
|
|
28
38
|
getProfile: () => Promise<IUser>;
|
|
29
39
|
updateUserProfile: (config: Partial<IUser>) => Promise<IUser>;
|
|
40
|
+
deleteWorkspace: (workspaceId: string) => Promise<{
|
|
41
|
+
success: boolean;
|
|
42
|
+
}>;
|
|
30
43
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IWorkspace } from '../types';
|
|
3
|
-
export type WorkspaceSettingsSection = 'profile' | 'general' | 'users' | 'features';
|
|
3
|
+
export type WorkspaceSettingsSection = 'profile' | 'general' | 'users' | 'features' | 'danger';
|
|
4
4
|
declare const WorkspaceSettingsDialog: React.FC<{
|
|
5
5
|
workspace: IWorkspace;
|
|
6
6
|
onClose: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function SettingSkeleton(): import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,16 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buildbase/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A SDK for Buildbase",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.esm.js",
|
|
8
8
|
"browser": "dist/index.esm.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/index.esm.js",
|
|
13
|
+
"require": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts"
|
|
15
|
+
},
|
|
16
|
+
"./dist/saas-os.css": "./dist/saas-os.css"
|
|
17
|
+
},
|
|
10
18
|
"files": [
|
|
11
19
|
"dist",
|
|
12
20
|
"README.md"
|
|
13
21
|
],
|
|
22
|
+
"sideEffects": [
|
|
23
|
+
"**/*.css"
|
|
24
|
+
],
|
|
14
25
|
"scripts": {
|
|
15
26
|
"build": "rollup -c",
|
|
16
27
|
"dev": "rollup -c -w",
|
|
@@ -41,10 +52,7 @@
|
|
|
41
52
|
"cmdk": "^1.1.1",
|
|
42
53
|
"date-fns": "^4.1.0",
|
|
43
54
|
"javascript-time-ago": "^2.5.11",
|
|
44
|
-
"jwt-decode": "^4.0.0",
|
|
45
55
|
"lucide-react": "^0.544.0",
|
|
46
|
-
"luxon": "^3.7.2",
|
|
47
|
-
"moment": "^2.30.1",
|
|
48
56
|
"react-day-picker": "^9.7.0",
|
|
49
57
|
"react-hook-form": "^7.60.0",
|
|
50
58
|
"tailwind-merge": "^3.3.1",
|
|
@@ -83,7 +91,6 @@
|
|
|
83
91
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
84
92
|
"@rollup/plugin-terser": "^0.4.0",
|
|
85
93
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
86
|
-
"@types/luxon": "^3.7.1",
|
|
87
94
|
"@types/react": "^19.0.0",
|
|
88
95
|
"@types/react-dom": "^19.0.0",
|
|
89
96
|
"autoprefixer": "^10.4.16",
|