@hautechai/sdk 0.0.1
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/.env.example +5 -0
- package/.github/workflows/main.yml +43 -0
- package/LICENSE +19 -0
- package/README.md +62 -0
- package/dist/autogenerated/api.d.ts +3347 -0
- package/dist/autogenerated/api.js +4118 -0
- package/dist/autogenerated/base.d.ts +66 -0
- package/dist/autogenerated/base.js +59 -0
- package/dist/autogenerated/common.d.ts +65 -0
- package/dist/autogenerated/common.js +133 -0
- package/dist/autogenerated/configuration.d.ts +91 -0
- package/dist/autogenerated/configuration.js +39 -0
- package/dist/autogenerated/index.d.ts +13 -0
- package/dist/autogenerated/index.js +15 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/sdk/accounts/index.d.ts +13 -0
- package/dist/sdk/accounts/index.js +17 -0
- package/dist/sdk/api.d.ts +23 -0
- package/dist/sdk/api.js +48 -0
- package/dist/sdk/balances/index.d.ts +12 -0
- package/dist/sdk/balances/index.js +19 -0
- package/dist/sdk/collections/index.d.ts +28 -0
- package/dist/sdk/collections/index.js +31 -0
- package/dist/sdk/groups/index.d.ts +24 -0
- package/dist/sdk/groups/index.js +31 -0
- package/dist/sdk/images/index.d.ts +16 -0
- package/dist/sdk/images/index.js +36 -0
- package/dist/sdk/index.d.ts +167 -0
- package/dist/sdk/index.js +35 -0
- package/dist/sdk/operations/index.d.ts +42 -0
- package/dist/sdk/operations/index.js +64 -0
- package/dist/sdk/operations/updater.d.ts +11 -0
- package/dist/sdk/operations/updater.js +23 -0
- package/dist/sdk/stacks/index.d.ts +25 -0
- package/dist/sdk/stacks/index.js +30 -0
- package/dist/sdk/storage/index.d.ts +18 -0
- package/dist/sdk/storage/index.js +27 -0
- package/dist/sdk/utils/index.d.ts +5 -0
- package/dist/sdk/utils/index.js +6 -0
- package/dist/token/index.d.ts +15 -0
- package/dist/token/index.js +38 -0
- package/dist/token/permissions.d.ts +3 -0
- package/dist/token/permissions.js +40 -0
- package/dist/types.d.ts +54 -0
- package/dist/types.js +4 -0
- package/jest.setup.js +5 -0
- package/openapitools.json +7 -0
- package/package.json +37 -0
- package/scripts/generate.sh +3 -0
- package/tsconfig.json +14 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export const defaultPermissions = {
|
|
2
|
+
access: { add: true, read: true, remove: true },
|
|
3
|
+
accounts: { create: false, read: false },
|
|
4
|
+
balances: { read: true, self: { read: true, update: false }, update: false },
|
|
5
|
+
collections: {
|
|
6
|
+
children: { add: true, read: true, remove: true },
|
|
7
|
+
create: true,
|
|
8
|
+
parents: { add: true, read: true, remove: true },
|
|
9
|
+
read: true,
|
|
10
|
+
stacks: { add: true, remove: true },
|
|
11
|
+
update: true,
|
|
12
|
+
},
|
|
13
|
+
groups: { accounts: { add: false, read: true, remove: false }, create: false, delete: false, read: true },
|
|
14
|
+
images: { create: true, read: true },
|
|
15
|
+
operations: { create: true, read: true, metadata: { update: true } },
|
|
16
|
+
pipelines: { create: true, read: true, update: true },
|
|
17
|
+
poses: { create: true, read: true },
|
|
18
|
+
stacks: { create: true, operations: { add: true, remove: true }, read: true, metadata: { update: true } },
|
|
19
|
+
storage: { create: true, delete: true, read: true, update: true },
|
|
20
|
+
};
|
|
21
|
+
export const defaultRootPermissions = {
|
|
22
|
+
access: { add: true, read: true, remove: true },
|
|
23
|
+
accounts: { create: true, read: true },
|
|
24
|
+
balances: { read: true, self: { read: true, update: true }, update: true },
|
|
25
|
+
collections: {
|
|
26
|
+
children: { add: true, read: true, remove: true },
|
|
27
|
+
create: true,
|
|
28
|
+
parents: { add: true, read: true, remove: true },
|
|
29
|
+
read: true,
|
|
30
|
+
stacks: { add: true, remove: true },
|
|
31
|
+
update: true,
|
|
32
|
+
},
|
|
33
|
+
groups: { accounts: { add: true, read: true, remove: true }, create: true, delete: true, read: true },
|
|
34
|
+
images: { create: true, read: true },
|
|
35
|
+
operations: { create: true, read: true, metadata: { update: true } },
|
|
36
|
+
pipelines: { create: true, read: true, update: true },
|
|
37
|
+
poses: { create: true, read: true },
|
|
38
|
+
stacks: { create: true, operations: { add: true, remove: true }, read: true, metadata: { update: true } },
|
|
39
|
+
storage: { create: true, delete: true, read: true, update: true },
|
|
40
|
+
};
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export interface SDKOptions {
|
|
2
|
+
authToken: () => string | Promise<string>;
|
|
3
|
+
endpoint?: string;
|
|
4
|
+
}
|
|
5
|
+
export type ListProps = {
|
|
6
|
+
cursor?: string;
|
|
7
|
+
limit?: number;
|
|
8
|
+
orderBy?: 'createdAt_ASC' | 'createdAt_DESC' | 'updatedAt_ASC' | 'updatedAt_DESC';
|
|
9
|
+
};
|
|
10
|
+
type Add = {
|
|
11
|
+
add: boolean;
|
|
12
|
+
};
|
|
13
|
+
type Remove = {
|
|
14
|
+
remove: boolean;
|
|
15
|
+
};
|
|
16
|
+
type Create = {
|
|
17
|
+
create: boolean;
|
|
18
|
+
};
|
|
19
|
+
type Delete = {
|
|
20
|
+
delete: boolean;
|
|
21
|
+
};
|
|
22
|
+
type Read = {
|
|
23
|
+
read: boolean;
|
|
24
|
+
};
|
|
25
|
+
type Update = {
|
|
26
|
+
update: boolean;
|
|
27
|
+
};
|
|
28
|
+
export interface MethodsPermissions {
|
|
29
|
+
access: Add & Read & Remove;
|
|
30
|
+
accounts: Create & Read;
|
|
31
|
+
balances: Read & Update & {
|
|
32
|
+
self: Read & Update;
|
|
33
|
+
};
|
|
34
|
+
collections: Create & Read & Update & {
|
|
35
|
+
children: Add & Read & Remove;
|
|
36
|
+
parents: Add & Read & Remove;
|
|
37
|
+
stacks: Add & Remove;
|
|
38
|
+
};
|
|
39
|
+
groups: Create & Read & Delete & {
|
|
40
|
+
accounts: Add & Remove & Read;
|
|
41
|
+
};
|
|
42
|
+
images: Create & Read;
|
|
43
|
+
operations: Create & Read & {
|
|
44
|
+
metadata: Update;
|
|
45
|
+
};
|
|
46
|
+
pipelines: Create & Read & Update;
|
|
47
|
+
poses: Create & Read;
|
|
48
|
+
stacks: Create & Read & {
|
|
49
|
+
operations: Add & Remove;
|
|
50
|
+
metadata: Update;
|
|
51
|
+
};
|
|
52
|
+
storage: Create & Delete & Read & Update;
|
|
53
|
+
}
|
|
54
|
+
export {};
|
package/dist/types.js
ADDED
package/jest.setup.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hautechai/sdk",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/HautechAI/sdk"
|
|
9
|
+
},
|
|
10
|
+
"main": "dist/index.js",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"generate": "./scripts/generate.sh",
|
|
14
|
+
"lint": "nx run-many --all --target=lint",
|
|
15
|
+
"lint:fix": "nx run-many --all --target=lint --fix",
|
|
16
|
+
"test": "jest"
|
|
17
|
+
},
|
|
18
|
+
"description": "Hautech SDK",
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"axios": "1.6.1",
|
|
21
|
+
"jsonwebtoken": "8.5.1",
|
|
22
|
+
"pusher-js": "8.4.0-rc2"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@openapitools/openapi-generator-cli": "2.15.3",
|
|
26
|
+
"@types/jest": "29.5.12",
|
|
27
|
+
"@types/jsonwebtoken": "9.0.7",
|
|
28
|
+
"@types/node": "22.5.2",
|
|
29
|
+
"dotenv": "16.4.7",
|
|
30
|
+
"jest": "29.7.0",
|
|
31
|
+
"jest-environment-jsdom": "29.7.0",
|
|
32
|
+
"ts-jest": "29.2.5",
|
|
33
|
+
"ts-node": "10.9.2",
|
|
34
|
+
"tslib": "2.7.0",
|
|
35
|
+
"typescript": "5.5.4"
|
|
36
|
+
}
|
|
37
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"declaration": true,
|
|
4
|
+
"esModuleInterop": true,
|
|
5
|
+
"jsx": "react",
|
|
6
|
+
"lib": ["DOM", "DOM.Iterable", "ES2022"],
|
|
7
|
+
"module": "ES2022",
|
|
8
|
+
"moduleResolution": "Node",
|
|
9
|
+
"outDir": "./dist",
|
|
10
|
+
"strict": true,
|
|
11
|
+
"target": "ES2020"
|
|
12
|
+
},
|
|
13
|
+
"include": ["src/**/*"]
|
|
14
|
+
}
|