@did-space/core 0.2.123 → 0.2.124

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.
@@ -1,2 +1,8 @@
1
1
  export declare const APPS = "apps";
2
2
  export declare const DID_OBJECTS = ".did-objects";
3
+ export declare enum APP_BACKUP_STATUS {
4
+ DEFAULT = "DEFAULT",
5
+ PENDING = "PENDING",
6
+ SUCCEEDED = "SUCCEEDED",
7
+ FAILED = "FAILED"
8
+ }
@@ -1,5 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DID_OBJECTS = exports.APPS = void 0;
3
+ exports.APP_BACKUP_STATUS = exports.DID_OBJECTS = exports.APPS = void 0;
4
4
  exports.APPS = 'apps';
5
5
  exports.DID_OBJECTS = '.did-objects';
6
+ // eslint-disable-next-line @typescript-eslint/naming-convention
7
+ var APP_BACKUP_STATUS;
8
+ (function (APP_BACKUP_STATUS) {
9
+ APP_BACKUP_STATUS["DEFAULT"] = "DEFAULT";
10
+ APP_BACKUP_STATUS["PENDING"] = "PENDING";
11
+ APP_BACKUP_STATUS["SUCCEEDED"] = "SUCCEEDED";
12
+ APP_BACKUP_STATUS["FAILED"] = "FAILED";
13
+ })(APP_BACKUP_STATUS = exports.APP_BACKUP_STATUS || (exports.APP_BACKUP_STATUS = {}));
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- export * from './meta';
2
1
  export * from './configuration';
2
+ export * from './constants';
3
3
  export * from './drivers';
4
+ export * from './meta';
4
5
  export * from './protocols';
5
6
  export * from './schemas';
6
- export * from './utils';
7
7
  export * from './space';
8
+ export * from './utils';
package/dist/index.js CHANGED
@@ -14,11 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- // eslint-disable-next-line import/export
18
- __exportStar(require("./meta"), exports);
19
17
  __exportStar(require("./configuration"), exports);
18
+ __exportStar(require("./constants"), exports);
20
19
  __exportStar(require("./drivers"), exports);
20
+ __exportStar(require("./meta"), exports);
21
21
  __exportStar(require("./protocols"), exports);
22
22
  __exportStar(require("./schemas"), exports);
23
- __exportStar(require("./utils"), exports);
24
23
  __exportStar(require("./space"), exports);
24
+ __exportStar(require("./utils"), exports);
@@ -1,3 +1,4 @@
1
+ import { APP_BACKUP_STATUS } from '../../constants';
1
2
  export declare const APP_BACKUP_TYPE = "app-backup";
2
3
  export interface AppBackup {
3
4
  /**
@@ -35,6 +36,19 @@ export interface AppBackup {
35
36
  signerDid: string;
36
37
  appName: string;
37
38
  appDescription: string;
38
- createAt?: string;
39
+ /**
40
+ * @description
41
+ * @type {string}
42
+ * @memberof AppBackup
43
+ */
44
+ status: APP_BACKUP_STATUS;
45
+ /**
46
+ * @description 目前保存着错误消息
47
+ * @default ""
48
+ * @type {string}
49
+ * @memberof AppBackup
50
+ */
51
+ message: string;
52
+ createAt: string;
39
53
  updateAt?: string;
40
54
  }
@@ -43,6 +43,6 @@ export interface AppConnected {
43
43
  * @memberof AppBackup
44
44
  */
45
45
  serverDid: string;
46
- createAt?: string;
46
+ createAt: string;
47
47
  updateAt?: string;
48
48
  }
@@ -0,0 +1,20 @@
1
+ export declare const APP_DISCONNECT_TYPE = "app-disconnected";
2
+ /**
3
+ *
4
+ * @description
5
+ * @export
6
+ * @interface AppConnected
7
+ */
8
+ export interface AppDisconnected {
9
+ /**
10
+ *
11
+ * @description uid
12
+ * @link https://www.npmjs.com/package/nanoid?activeTab=readme
13
+ * @type {string}
14
+ * @memberof AppConnected
15
+ */
16
+ id: string;
17
+ type: 'app-disconnected';
18
+ createAt: string;
19
+ updateAt?: string;
20
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.APP_DISCONNECT_TYPE = void 0;
4
+ exports.APP_DISCONNECT_TYPE = 'app-disconnected';
@@ -1,3 +1,4 @@
1
+ import { APP_BACKUP_STATUS } from '../../constants';
1
2
  export declare const APP_RESTORE_TYPE = "app-restore";
2
3
  export interface AppRestore {
3
4
  /**
@@ -11,8 +12,29 @@ export interface AppRestore {
11
12
  type: 'app-restore';
12
13
  userDid: string;
13
14
  referrer: string;
15
+ /**
16
+ *
17
+ * @description 指向 server 的 did 地址
18
+ * @default ""
19
+ * @type {string}
20
+ * @memberof AppRestore
21
+ */
22
+ serverDid: string;
14
23
  appName: string;
15
24
  appDescription: string;
16
- createAt?: string;
25
+ /**
26
+ * @description
27
+ * @type {string}
28
+ * @memberof AppRestore
29
+ */
30
+ status: APP_BACKUP_STATUS;
31
+ /**
32
+ * @description 目前保存着错误消息
33
+ * @default ""
34
+ * @type {string}
35
+ * @memberof AppRestore
36
+ */
37
+ message: string;
38
+ createAt: string;
17
39
  updateAt?: string;
18
40
  }
@@ -1,5 +1,6 @@
1
1
  import { AppBackup } from './app-backup';
2
2
  import { AppConnected } from './app-connected';
3
+ import { AppDisconnected } from './app-disconnected';
3
4
  import { AppRestore } from './app-restore';
4
5
  export declare const APP_TYPE = "app";
5
6
  /**
@@ -20,6 +21,7 @@ export interface App {
20
21
  type: 'app';
21
22
  userDid: string;
22
23
  connected: Array<AppConnected>;
24
+ disconnected: Array<AppDisconnected>;
23
25
  backup: Array<AppBackup>;
24
26
  restore: Array<AppRestore>;
25
27
  createAt: string;
@@ -1,3 +1,4 @@
1
+ export * from './app-disconnected';
1
2
  export * from './app-backup';
2
3
  export * from './app-connected';
3
4
  export * from './app-restore';
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./app-disconnected"), exports);
17
18
  __exportStar(require("./app-backup"), exports);
18
19
  __exportStar(require("./app-connected"), exports);
19
20
  __exportStar(require("./app-restore"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@did-space/core",
3
- "version": "0.2.123",
3
+ "version": "0.2.124",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -47,5 +47,5 @@
47
47
  "ts-jest": "^28.0.6",
48
48
  "typescript": "^4.9.5"
49
49
  },
50
- "gitHead": "289dc2cbf76f26b370a7fc01e43a2f05a604d1fa"
50
+ "gitHead": "87d0be721af6b68a47ca537aaa1f669edbd0a858"
51
51
  }