@blocklet/did-space-js 0.5.78 → 0.5.79

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.
@@ -40,7 +40,7 @@ class BackupBlockletCommand extends base_1.BaseCommand {
40
40
  if (res.data.errorCount !== 0) {
41
41
  await new put_app_backup_1.PutAppBackupCommand({
42
42
  id: appBackup.id,
43
- status: core_1.APP_BACKUP_STATUS.FAILED,
43
+ status: core_1.AuditLogStatus.FAILED,
44
44
  message: res?.statusMessage,
45
45
  }, this.context)
46
46
  .request()
@@ -50,7 +50,7 @@ class BackupBlockletCommand extends base_1.BaseCommand {
50
50
  // 仅仅是触发一下接口,更新一下 updateAt
51
51
  await new put_app_backup_1.PutAppBackupCommand({
52
52
  id: appBackup.id,
53
- status: core_1.APP_BACKUP_STATUS.SUCCEEDED,
53
+ status: core_1.AuditLogStatus.SUCCEEDED,
54
54
  }, this.context).request();
55
55
  return res;
56
56
  }
@@ -61,7 +61,7 @@ class BackupBlockletCommand extends base_1.BaseCommand {
61
61
  if (appBackup) {
62
62
  await new put_app_backup_1.PutAppBackupCommand({
63
63
  id: appBackup.id,
64
- status: core_1.APP_BACKUP_STATUS.FAILED,
64
+ status: core_1.AuditLogStatus.FAILED,
65
65
  message,
66
66
  }, this.context)
67
67
  .request()
@@ -41,7 +41,7 @@ class IncrementalBackupBlockletCommand extends base_1.BaseCommand {
41
41
  if (res.data.errorCount !== 0) {
42
42
  await new backup_1.PutAppBackupCommand({
43
43
  id: appBackup.id,
44
- status: core_1.APP_BACKUP_STATUS.FAILED,
44
+ status: core_1.AuditLogStatus.FAILED,
45
45
  message: res?.statusMessage,
46
46
  }, this.context)
47
47
  .request()
@@ -51,7 +51,7 @@ class IncrementalBackupBlockletCommand extends base_1.BaseCommand {
51
51
  // 仅仅是触发一下接口,更新一下 updateAt
52
52
  await new backup_1.PutAppBackupCommand({
53
53
  id: appBackup.id,
54
- status: core_1.APP_BACKUP_STATUS.SUCCEEDED,
54
+ status: core_1.AuditLogStatus.SUCCEEDED,
55
55
  }, this.context).request();
56
56
  return res;
57
57
  }
@@ -62,7 +62,7 @@ class IncrementalBackupBlockletCommand extends base_1.BaseCommand {
62
62
  if (appBackup) {
63
63
  await new backup_1.PutAppBackupCommand({
64
64
  id: appBackup.id,
65
- status: core_1.APP_BACKUP_STATUS.FAILED,
65
+ status: core_1.AuditLogStatus.FAILED,
66
66
  message,
67
67
  }, this.context)
68
68
  .request()
@@ -37,7 +37,7 @@ class RestoreBlockletCommand extends base_1.BaseCommand {
37
37
  if (res.data.errorCount !== 0) {
38
38
  await new put_app_restore_1.PutAppRestoreCommand({
39
39
  id: appRestore.id,
40
- status: core_1.APP_BACKUP_STATUS.FAILED,
40
+ status: core_1.AuditLogStatus.FAILED,
41
41
  message: res?.statusMessage,
42
42
  }, this.context)
43
43
  .request()
@@ -47,7 +47,7 @@ class RestoreBlockletCommand extends base_1.BaseCommand {
47
47
  // 仅仅是触发一下接口,更新一下 updateAt
48
48
  await new put_app_restore_1.PutAppRestoreCommand({
49
49
  id: appRestore.id,
50
- status: core_1.APP_BACKUP_STATUS.SUCCEEDED,
50
+ status: core_1.AuditLogStatus.SUCCEEDED,
51
51
  }, this.context).request();
52
52
  return res;
53
53
  }
@@ -58,7 +58,7 @@ class RestoreBlockletCommand extends base_1.BaseCommand {
58
58
  if (appRestore) {
59
59
  await new put_app_restore_1.PutAppRestoreCommand({
60
60
  id: appRestore.id,
61
- status: core_1.APP_BACKUP_STATUS.FAILED,
61
+ status: core_1.AuditLogStatus.FAILED,
62
62
  message,
63
63
  }, this.context)
64
64
  .request()
@@ -1,4 +1,3 @@
1
- import axios from 'axios';
2
1
  export declare const MIN: number;
3
- export declare const api: axios.AxiosInstance;
2
+ export declare const api: import("axios").AxiosInstance;
4
3
  export declare const gotApi: import("got").Got;
@@ -1,8 +1,16 @@
1
- import { AppBackup } from '@did-space/core';
1
+ import { AppBackup, AuditLogStatus } from '@did-space/core';
2
2
  import type { ObjectSchema } from 'joi';
3
3
  import type { CommandOutput } from '../../protocol';
4
+ export type AppBackupData = AppBackup & {
5
+ id: string;
6
+ userDid: string;
7
+ status: AuditLogStatus;
8
+ message: string;
9
+ createdAt: string;
10
+ updatedAt: string;
11
+ };
4
12
  export declare const PostAppBackupCommandInputSchema: ObjectSchema<any>;
5
- export interface PostAppBackupCommandInput extends Pick<AppBackup, 'userDid' | 'referrer' | 'appName' | 'appDescription' | 'serverDid' | 'signerDid'> {
13
+ export interface PostAppBackupCommandInput extends Pick<AppBackupData, 'userDid' | 'referrer' | 'appName' | 'appDescription' | 'serverDid' | 'signerDid'> {
6
14
  }
7
- export interface PostAppBackupCommandOutput extends CommandOutput<Required<AppBackup>> {
15
+ export interface PostAppBackupCommandOutput extends CommandOutput<Required<AppBackupData>> {
8
16
  }
@@ -1,7 +1,7 @@
1
- import { AppBackup } from '@did-space/core';
2
1
  import type { ObjectSchema } from 'joi';
3
2
  import type { CommandOutput } from '../../protocol';
3
+ import { AppBackupData } from './post-app-backup-command';
4
4
  export declare const PutAppBackupCommandInputSchema: ObjectSchema<any>;
5
- export type PutAppBackupCommandInput = Required<Pick<AppBackup, 'id'>> & Partial<AppBackup>;
6
- export interface PutAppBackupCommandOutput extends CommandOutput<Required<AppBackup>> {
5
+ export type PutAppBackupCommandInput = Required<Pick<AppBackupData, 'id'>> & Partial<AppBackupData>;
6
+ export interface PutAppBackupCommandOutput extends CommandOutput<Required<AppBackupData>> {
7
7
  }
@@ -8,11 +8,11 @@ exports.PutAppBackupCommandInputSchema = validator_1.Joi.object({
8
8
  updateAt: validator_1.Joi.string()
9
9
  .optional()
10
10
  .default(() => new Date().toISOString()),
11
- // 默认是 APP_BACKUP_STATUS.DEFAULT 是因为我要兼容以前的旧版本的数据
11
+ // 默认是 AuditLogStatus.DEFAULT 是因为我要兼容以前的旧版本的数据
12
12
  status: validator_1.Joi.string()
13
13
  .optional()
14
14
  .allow('')
15
- .valid(...Object.values(core_1.APP_BACKUP_STATUS))
16
- .default(core_1.APP_BACKUP_STATUS.DEFAULT),
15
+ .valid(...Object.values(core_1.AuditLogStatus))
16
+ .default(core_1.AuditLogStatus.DEFAULT),
17
17
  message: validator_1.Joi.string().optional().allow('').default(''),
18
18
  });
@@ -1,8 +1,16 @@
1
- import { AppRestore } from '@did-space/core';
1
+ import { AppRestore, AuditLogStatus } from '@did-space/core';
2
2
  import type { ObjectSchema } from 'joi';
3
3
  import { CommandOutput } from '../../protocol/command.protocol';
4
+ export type AppRestoreData = AppRestore & {
5
+ id: string;
6
+ userDid: string;
7
+ status: AuditLogStatus;
8
+ message: string;
9
+ createdAt: string;
10
+ updatedAt: string;
11
+ };
4
12
  export declare const PostAppRestoreCommandInputSchema: ObjectSchema<any>;
5
- export interface PostAppRestoreCommandInput extends Pick<AppRestore, 'userDid' | 'referrer' | 'serverDid'> {
13
+ export interface PostAppRestoreCommandInput extends Pick<AppRestoreData, 'userDid' | 'referrer' | 'serverDid'> {
6
14
  }
7
- export interface PostAppRestoreCommandOutput extends CommandOutput<Required<AppRestore>> {
15
+ export interface PostAppRestoreCommandOutput extends CommandOutput<Required<AppRestoreData>> {
8
16
  }
@@ -1,7 +1,7 @@
1
- import { AppRestore } from '@did-space/core';
2
1
  import type { ObjectSchema } from 'joi';
3
2
  import type { CommandOutput } from '../../protocol';
3
+ import { AppRestoreData } from './post-app-restore-command';
4
4
  export declare const PutAppRestoreCommandInputSchema: ObjectSchema<any>;
5
- export type PutAppRestoreCommandInput = Required<Pick<AppRestore, 'id'>> & Partial<AppRestore>;
6
- export interface PutAppRestoreCommandOutput extends CommandOutput<Required<AppRestore>> {
5
+ export type PutAppRestoreCommandInput = Required<Pick<AppRestoreData, 'id'>> & Partial<AppRestoreData>;
6
+ export interface PutAppRestoreCommandOutput extends CommandOutput<Required<AppRestoreData>> {
7
7
  }
@@ -8,11 +8,11 @@ exports.PutAppRestoreCommandInputSchema = validator_1.Joi.object({
8
8
  updateAt: validator_1.Joi.string()
9
9
  .optional()
10
10
  .default(() => new Date().toISOString()),
11
- // 默认是 APP_BACKUP_STATUS.DEFAULT 是因为我要兼容以前的旧版本的数据
11
+ // 默认是 AuditLogStatus.DEFAULT 是因为我要兼容以前的旧版本的数据
12
12
  status: validator_1.Joi.string()
13
13
  .optional()
14
14
  .allow('')
15
- .valid(...Object.values(core_1.APP_BACKUP_STATUS))
16
- .default(core_1.APP_BACKUP_STATUS.DEFAULT),
15
+ .valid(...Object.values(core_1.AuditLogStatus))
16
+ .default(core_1.AuditLogStatus.DEFAULT),
17
17
  message: validator_1.Joi.string().optional().allow('').default(''),
18
18
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/did-space-js",
3
- "version": "0.5.78",
3
+ "version": "0.5.79",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -29,19 +29,19 @@
29
29
  "link": "yarn link"
30
30
  },
31
31
  "dependencies": {
32
- "@arcblock/did": "^1.18.152",
33
- "@arcblock/jwt": "^1.18.152",
34
- "@arcblock/validator": "^1.18.152",
35
- "@blocklet/env": "^1.16.34-beta-20241129-100152-679bd732",
36
- "@did-space/core": "^0.5.78",
37
- "@ocap/mcrypto": "^1.18.152",
38
- "@ocap/util": "^1.18.152",
39
- "@ocap/wallet": "^1.18.152",
32
+ "@arcblock/did": "^1.18.160",
33
+ "@arcblock/jwt": "^1.18.160",
34
+ "@arcblock/validator": "^1.18.160",
35
+ "@blocklet/env": "^1.16.34-beta-20241207-134904-3c3d9a35",
36
+ "@did-space/core": "^0.5.79",
37
+ "@ocap/mcrypto": "^1.18.160",
38
+ "@ocap/util": "^1.18.160",
39
+ "@ocap/wallet": "^1.18.160",
40
40
  "agentkeepalive": "^4.5.0",
41
- "axios": "^1.7.8",
41
+ "axios": "^1.7.9",
42
42
  "base64-url": "^2.3.3",
43
43
  "dayjs": "^1.11.13",
44
- "debug": "^4.3.7",
44
+ "debug": "^4.4.0",
45
45
  "filehound": "^1.17.6",
46
46
  "form-data": "^4.0.1",
47
47
  "fs-extra": "^11.2.0",
@@ -57,7 +57,7 @@
57
57
  "p-queue": "6.6.2",
58
58
  "ufo": "^1.5.4",
59
59
  "xbytes": "^1.9.1",
60
- "zod": "^3.23.8"
60
+ "zod": "^3.24.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@arcblock/eslint-config-ts": "^0.3.3",
@@ -76,5 +76,5 @@
76
76
  "ts-jest": "^28.0.8",
77
77
  "typescript": "^4.9.5"
78
78
  },
79
- "gitHead": "a78e40b323dff7d1dd378b6b2ef8fd805df4df4d"
79
+ "gitHead": "5961ad5182992541aedf083537cf33abed98ba4f"
80
80
  }