@verdocs/js-sdk 1.0.23 → 1.0.28

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/Users/Types.d.ts CHANGED
@@ -1,7 +1,16 @@
1
1
  import { IGroup, IOrganization } from '../Organizations/Types';
2
2
  import { TRequestStatus } from '../HTTP/Types';
3
+ /**
4
+ * An operation within Verdocs the user may perform.
5
+ */
3
6
  export declare type TPermission = 'org:view' | 'member:view' | 'org:update' | 'member:add' | 'member:remove' | 'admin:add' | 'admin:remove' | 'org:delete' | 'org:transfer' | 'owner:add' | 'owner:remove' | 'template:creator:create:personal' | 'template:creator:visibility' | 'template:creator:create:org' | 'template:member:read' | 'template:member:write' | 'template:member:visibility' | 'template:creator:delete' | 'template:member:delete' | 'template:creator:create:public' | 'rform:access' | 'rcommon:access' | 'org:list' | 'org:create';
7
+ /**
8
+ * Plans provide access to Verdocs product features.
9
+ */
4
10
  export declare type TPlan = 'env:essential' | 'org:standard';
11
+ /**
12
+ * Roles provide access to groups of permissions.
13
+ */
5
14
  export declare type TRole = 'owner' | 'basic_user' | 'member';
6
15
  export interface IProfile {
7
16
  /** The unique ID of the profile */
@@ -37,12 +46,13 @@ export interface IActiveSession {
37
46
  email_verified: boolean;
38
47
  iat: number;
39
48
  exp: number;
40
- permissions: IPermission[];
41
- roles: IRole[];
49
+ permissions: TPermission[];
50
+ roles: TRole[];
42
51
  profile: IProfile;
43
52
  profile_id: string;
44
53
  organization_id: string;
45
54
  plans?: TPlan[];
55
+ [key: string]: any;
46
56
  }
47
57
  export interface IRole {
48
58
  /** Unique identifier for the role. */
package/Utils/DateTime.js CHANGED
@@ -37,5 +37,5 @@ export var formatShortTimeAgo = function (val) {
37
37
  if (timeDiff >= MINUTE) {
38
38
  return Math.floor(timeDiff / MINUTE) + 'Y';
39
39
  }
40
- return timeDiff + "S";
40
+ return "".concat(timeDiff, "S");
41
41
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdocs/js-sdk",
3
- "version": "1.0.23",
3
+ "version": "1.0.28",
4
4
  "private": false,
5
5
  "homepage": "https://github.com/Verdocs/js-sdk",
6
6
  "description": "Verdocs JS SDK",
@@ -23,20 +23,20 @@
23
23
  "url": "https://github.com/Verdocs/js-sdk/issues"
24
24
  },
25
25
  "scripts": {
26
- "build": "npm run clean && tsc && npm run lint && npm run docs",
26
+ "build": "npm run clean && npm run docs && tsc && npm run lint",
27
27
  "prepare": "npm run build",
28
28
  "prepublishOnly": "npm run lint",
29
- "OldprepublishOnly": "npm test && npm run lint",
30
29
  "preversion": "npm run lint",
31
30
  "version": "npm run format && git add -A src",
32
31
  "postversion": "git push && git push --tags",
33
32
  "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --config jestconfig.json",
34
33
  "format": "prettier --write \"src/**/*.ts\"",
35
34
  "lint": "tslint -p tsconfig.json",
36
- "docs-md": "typedoc",
37
- "docs-html": "typedoc --plugin none --out docs-html",
38
- "docs": "npm run docs-md && npm run docs-html && cp -aR docs-html/* ../partner-portal/site/static/js-sdk/",
39
- "clean": "rm -rf Documents HTTP Organizations Search Templates Users Utils index.js index.d.ts"
35
+ "docs-md": "typedoc --tsconfig ./tsconfig-typedoc.json",
36
+ "docs-html": "typedoc --tsconfig ./tsconfig-typedoc.json --plugin none --out docs-html",
37
+ "Xdocs-html": "typedoc --tsconfig ./tsconfig-typedoc.json --plugin ./typedoc-theme.tsx --out docs-html",
38
+ "docs": "rm -rf ../partner-portal/site/static/js-sdk/* && npm run docs-md && npm run docs-html && cp -aR docs-html/* ../partner-portal/site/static/js-sdk/",
39
+ "clean": "rm -rf Documents HTTP Organizations Search Templates Users Utils index.js index.d.ts docs docs-html"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public"
@@ -45,18 +45,18 @@
45
45
  "axios": "^0.21.1"
46
46
  },
47
47
  "peerDependencies": {
48
- "typescript": "4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x"
48
+ "typescript": "4.2.x || 4.3.x || 4.4.x || 4.5.x"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/jest": "^27.0.2",
52
52
  "jest": "^27.3.1",
53
53
  "jest-mock-axios": "^4.4.1",
54
- "prettier": "^2.4.1",
54
+ "prettier": "^2.5.1",
55
55
  "ts-jest": "^27.0.7",
56
56
  "tslint": "^6.1.3",
57
57
  "tslint-config-prettier": "^1.18.0",
58
- "typedoc": "^0.22.9",
59
- "typedoc-plugin-markdown": "^3.11.6",
60
- "typescript": "^4.4.4"
58
+ "typedoc": "^0.22.10",
59
+ "typedoc-plugin-markdown": "^3.11.9",
60
+ "typescript": "^4.5.4"
61
61
  }
62
62
  }
@@ -0,0 +1,25 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es5",
4
+ "module": "esnext",
5
+ "lib": ["es2017", "es7", "es6", "dom"],
6
+ "declaration": true,
7
+ "allowJs": true,
8
+ "outDir": "./",
9
+ "strict": true,
10
+ "esModuleInterop": true,
11
+ "moduleResolution": "node",
12
+ "jsx": "react",
13
+ "jsxFactory": "JSX.createElement",
14
+ "jsxFragmentFactory": "JSX.Fragment"
15
+ },
16
+ "include": ["src"],
17
+ "exclude": ["node_modules", "dist", "**/__tests__/*"],
18
+ "typedocOptions": {
19
+ "entryPoints": ["src/index.ts"],
20
+ "out": "docs",
21
+ "includeVersion": true,
22
+ "gitRevision": "main",
23
+ "hideGenerator": true
24
+ }
25
+ }