verteilen-core 1.4.80 → 1.4.81

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.
@@ -21,6 +21,21 @@ export declare enum AuthService {
21
21
  CLERK = 2,
22
22
  SUPABASE = 3
23
23
  }
24
+ export declare enum ContentType {
25
+ LOCAL = 0,
26
+ EXTERNAL = 1,
27
+ SERVICE = 2
28
+ }
29
+ export declare enum ContentDB {
30
+ FTP = 0,
31
+ MONGODB = 1
32
+ }
33
+ export declare enum ContentService {
34
+ MONGODB = 0,
35
+ DYNAMODB = 1,
36
+ COSMOS = 2,
37
+ BIGTABLE = 3
38
+ }
24
39
  /**
25
40
  * **Backend Interface**\
26
41
  * The backend object must contain some utility functions\
@@ -284,18 +299,29 @@ export interface ServerSetupAuth {
284
299
  db_username?: string;
285
300
  db_password?: string;
286
301
  }
302
+ export interface ServerSetupContent {
303
+ content_type: ContentType;
304
+ content_service: ContentService;
305
+ content_db: ContentDB;
306
+ api_key?: string;
307
+ db_url?: string;
308
+ db_username?: string;
309
+ db_password?: string;
310
+ }
287
311
  export interface ServerSetting {
288
312
  open_guest: boolean;
289
313
  auth: ServerSetupAuth;
314
+ content: ServerSetupContent;
290
315
  }
291
316
  export interface ServerSetupRoot {
292
317
  root_username: string;
293
318
  root_password: string;
294
319
  }
295
320
  export interface ServerSetupRequire {
296
- setting?: ServerSetting;
297
- root?: ServerSetupRoot;
321
+ setting: ServerSetting;
322
+ root: ServerSetupRoot;
298
323
  }
324
+ export declare const CreateServerSetupRequire: () => ServerSetupRequire;
299
325
  export declare const CreateRootLocalPermission: () => LocalPermission;
300
326
  export declare const CreateRootPermission: () => GlobalPermission;
301
327
  export declare const CreateRootUser: () => UserProfile;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CreateRootUser = exports.CreateRootPermission = exports.CreateRootLocalPermission = exports.PermissionType = exports.UserType = exports.ACLType = exports.AuthService = exports.AuthDB = exports.AuthType = void 0;
3
+ exports.CreateRootUser = exports.CreateRootPermission = exports.CreateRootLocalPermission = exports.CreateServerSetupRequire = exports.PermissionType = exports.UserType = exports.ACLType = exports.ContentService = exports.ContentDB = exports.ContentType = exports.AuthService = exports.AuthDB = exports.AuthType = void 0;
4
4
  const uuid_1 = require("uuid");
5
5
  var AuthType;
6
6
  (function (AuthType) {
@@ -20,6 +20,24 @@ var AuthService;
20
20
  AuthService[AuthService["CLERK"] = 2] = "CLERK";
21
21
  AuthService[AuthService["SUPABASE"] = 3] = "SUPABASE";
22
22
  })(AuthService || (exports.AuthService = AuthService = {}));
23
+ var ContentType;
24
+ (function (ContentType) {
25
+ ContentType[ContentType["LOCAL"] = 0] = "LOCAL";
26
+ ContentType[ContentType["EXTERNAL"] = 1] = "EXTERNAL";
27
+ ContentType[ContentType["SERVICE"] = 2] = "SERVICE";
28
+ })(ContentType || (exports.ContentType = ContentType = {}));
29
+ var ContentDB;
30
+ (function (ContentDB) {
31
+ ContentDB[ContentDB["FTP"] = 0] = "FTP";
32
+ ContentDB[ContentDB["MONGODB"] = 1] = "MONGODB";
33
+ })(ContentDB || (exports.ContentDB = ContentDB = {}));
34
+ var ContentService;
35
+ (function (ContentService) {
36
+ ContentService[ContentService["MONGODB"] = 0] = "MONGODB";
37
+ ContentService[ContentService["DYNAMODB"] = 1] = "DYNAMODB";
38
+ ContentService[ContentService["COSMOS"] = 2] = "COSMOS";
39
+ ContentService[ContentService["BIGTABLE"] = 3] = "BIGTABLE";
40
+ })(ContentService || (exports.ContentService = ContentService = {}));
23
41
  /**
24
42
  * **Access Control Type**\
25
43
  * Ot will have effect on permission value
@@ -53,6 +71,28 @@ var PermissionType;
53
71
  PermissionType[PermissionType["LIB"] = 7] = "LIB";
54
72
  PermissionType[PermissionType["LOG"] = 8] = "LOG";
55
73
  })(PermissionType || (exports.PermissionType = PermissionType = {}));
74
+ const CreateServerSetupRequire = () => {
75
+ return {
76
+ setting: {
77
+ open_guest: false,
78
+ auth: {
79
+ auth_type: AuthType.SELF,
80
+ auth_service: AuthService.FIREBASE,
81
+ auth_db: AuthDB.SQLITE3
82
+ },
83
+ content: {
84
+ content_type: ContentType.LOCAL,
85
+ content_service: ContentService.MONGODB,
86
+ content_db: ContentDB.FTP
87
+ }
88
+ },
89
+ root: {
90
+ root_username: "",
91
+ root_password: ""
92
+ }
93
+ };
94
+ };
95
+ exports.CreateServerSetupRequire = CreateServerSetupRequire;
56
96
  const CreateRootLocalPermission = () => {
57
97
  return {
58
98
  view: true,
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/interface/server.ts"],"names":[],"mappings":";;;AAaA,+BAAmC;AAEnC,IAAY,QAIX;AAJD,WAAY,QAAQ;IAChB,uCAAI,CAAA;IACJ,+CAAQ,CAAA;IACR,6CAAO,CAAA;AACX,CAAC,EAJW,QAAQ,wBAAR,QAAQ,QAInB;AAED,IAAY,MAGX;AAHD,WAAY,MAAM;IACd,yCAAO,CAAA;IACP,yCAAO,CAAA;AACX,CAAC,EAHW,MAAM,sBAAN,MAAM,QAGjB;AAED,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,qDAAQ,CAAA;IACR,+CAAK,CAAA;IACL,+CAAK,CAAA;IACL,qDAAQ,CAAA;AACZ,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AA2KD;;;GAGG;AACH,IAAY,OAIX;AAJD,WAAY,OAAO;IACf,yCAAM,CAAA;IACN,+CAAS,CAAA;IACT,2CAAO,CAAA;AACX,CAAC,EAJW,OAAO,uBAAP,OAAO,QAIlB;AACD;;;GAGG;AACH,IAAY,QAKX;AALD,WAAY,QAAQ;IAChB,uCAAI,CAAA;IACJ,yCAAK,CAAA;IACL,yCAAK,CAAA;IACL,uCAAI,CAAA;AACR,CAAC,EALW,QAAQ,wBAAR,QAAQ,QAKnB;AAED,IAAY,cAUX;AAVD,WAAY,cAAc;IACtB,mDAAI,CAAA;IACJ,yDAAO,CAAA;I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,CAAA;IACD,MAAM,GAAG,GAAoB;QACzB,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,IAAI;QACV,GAAG,EAAE,IAAI;QACT,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;QACd,GAAG,EAAE,IAAI;QACT,GAAG,EAAE,IAAI;QACT,WAAW,EAAE,IAAI;KACpB,CAAA;IACD,OAAO,GAAG,CAAA;AACd,CAAC,CAAA;AApBY,QAAA,oBAAoB,wBAoBhC;AAEM,MAAM,cAAc,GAAG,GAAe,EAAE;IAC3C,OAAO;QACH,IAAI,EAAE,IAAA,SAAM,GAAE;QACd,KAAK,EAAE,IAAA,SAAM,GAAE;QACf,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,UAAU,EAAE;YACR,GAAG,EAAE,IAAI;YACT,GAAG,EAAE,IAAI;YACT,IAAI,EAAE,EAAE;YACR,KAAK,EAAE,MAAM;YACb,YAAY,EAAE,KAAK;YACnB,YAAY,EAAE,EAAE;YAChB,SAAS,EAAE,IAAI;SAClB;QACD,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,WAAW;QACxB,iBAAiB,EAAE,IAAA,4BAAoB,GAAE;KAC5C,CAAA;AACL,CAAC,CAAA;AAlBY,QAAA,cAAc,kBAkB1B"}
package/dist/lan/en.json CHANGED
@@ -4,6 +4,28 @@
4
4
  "unverify": "Un verify",
5
5
  "no-permission-action": "You have no permission"
6
6
  },
7
+ "setup": {
8
+ "title": "Server Setup",
9
+ "auth": "Authentication",
10
+ "auth_type": "Authentication Method",
11
+ "auth_types": {
12
+ "self": "Self Auth",
13
+ "external": "External",
14
+ "service": "Service"
15
+ },
16
+ "auth_db": "Authentication Database",
17
+ "auth_service": "Authentication Service",
18
+ "content": "Content",
19
+ "content_type": "Content Method",
20
+ "content_types": {
21
+ "local": "Store Local",
22
+ "external": "External",
23
+ "service": "Service"
24
+ },
25
+ "content_db": "Content Database",
26
+ "content_service": "Content Service",
27
+ "open_guest": "Guest Login"
28
+ },
7
29
  "login": {
8
30
  "title": "Account Login",
9
31
  "submit": "Submit",
@@ -4,6 +4,28 @@
4
4
  "unverify": "尚未驗證",
5
5
  "no-permission-action": "你沒有權限做此動作"
6
6
  },
7
+ "setup": {
8
+ "title": "伺服器設置",
9
+ "auth": "認證",
10
+ "auth_type": "認證方法",
11
+ "auth_types": {
12
+ "self": "自行認證",
13
+ "external": "外部認證",
14
+ "service": "雲端認證"
15
+ },
16
+ "auth_db": "認證資料庫",
17
+ "auth_service": "認證雲端",
18
+ "content": "內容",
19
+ "content_type": "內容方法",
20
+ "content_types": {
21
+ "local": "本地儲存",
22
+ "external": "外部儲存",
23
+ "service": "雲端儲存"
24
+ },
25
+ "content_db": "內容資料庫",
26
+ "content_service": "內容雲端",
27
+ "open_guest": "遊客登入"
28
+ },
7
29
  "login": {
8
30
  "title": "帳號登入",
9
31
  "submit": "登入",
@@ -23,6 +23,28 @@ export declare const i18nDefaultData: {
23
23
  unverify: string;
24
24
  "no-permission-action": string;
25
25
  };
26
+ setup: {
27
+ title: string;
28
+ auth: string;
29
+ auth_type: string;
30
+ auth_types: {
31
+ self: string;
32
+ external: string;
33
+ service: string;
34
+ };
35
+ auth_db: string;
36
+ auth_service: string;
37
+ content: string;
38
+ content_type: string;
39
+ content_types: {
40
+ local: string;
41
+ external: string;
42
+ service: string;
43
+ };
44
+ content_db: string;
45
+ content_service: string;
46
+ open_guest: string;
47
+ };
26
48
  login: {
27
49
  title: string;
28
50
  submit: string;
@@ -488,6 +510,28 @@ export declare const i18nDefaultData: {
488
510
  unverify: string;
489
511
  "no-permission-action": string;
490
512
  };
513
+ setup: {
514
+ title: string;
515
+ auth: string;
516
+ auth_type: string;
517
+ auth_types: {
518
+ self: string;
519
+ external: string;
520
+ service: string;
521
+ };
522
+ auth_db: string;
523
+ auth_service: string;
524
+ content: string;
525
+ content_type: string;
526
+ content_types: {
527
+ local: string;
528
+ external: string;
529
+ service: string;
530
+ };
531
+ content_db: string;
532
+ content_service: string;
533
+ open_guest: string;
534
+ };
491
535
  login: {
492
536
  title: string;
493
537
  submit: string;
@@ -960,6 +1004,28 @@ export declare const i18n: import("vue-i18n").I18n<{
960
1004
  unverify: string;
961
1005
  "no-permission-action": string;
962
1006
  };
1007
+ setup: {
1008
+ title: string;
1009
+ auth: string;
1010
+ auth_type: string;
1011
+ auth_types: {
1012
+ self: string;
1013
+ external: string;
1014
+ service: string;
1015
+ };
1016
+ auth_db: string;
1017
+ auth_service: string;
1018
+ content: string;
1019
+ content_type: string;
1020
+ content_types: {
1021
+ local: string;
1022
+ external: string;
1023
+ service: string;
1024
+ };
1025
+ content_db: string;
1026
+ content_service: string;
1027
+ open_guest: string;
1028
+ };
963
1029
  login: {
964
1030
  title: string;
965
1031
  submit: string;
@@ -1425,6 +1491,28 @@ export declare const i18n: import("vue-i18n").I18n<{
1425
1491
  unverify: string;
1426
1492
  "no-permission-action": string;
1427
1493
  };
1494
+ setup: {
1495
+ title: string;
1496
+ auth: string;
1497
+ auth_type: string;
1498
+ auth_types: {
1499
+ self: string;
1500
+ external: string;
1501
+ service: string;
1502
+ };
1503
+ auth_db: string;
1504
+ auth_service: string;
1505
+ content: string;
1506
+ content_type: string;
1507
+ content_types: {
1508
+ local: string;
1509
+ external: string;
1510
+ service: string;
1511
+ };
1512
+ content_db: string;
1513
+ content_service: string;
1514
+ open_guest: string;
1515
+ };
1428
1516
  login: {
1429
1517
  title: string;
1430
1518
  submit: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verteilen-core",
3
- "version": "1.4.80",
3
+ "version": "1.4.81",
4
4
  "license": "MIT",
5
5
  "homepage": "https://verteilen.github.io/wiki/",
6
6
  "author": "Elly",