@budibase/pro 3.34.5 → 3.34.7

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.
@@ -7,11 +7,11 @@ import * as features from "../features";
7
7
  */
8
8
  declare const pkg: {
9
9
  isEnabled: typeof features.isBackupsEnabled;
10
- triggerAppRestore: (appId: string, backupId: string, nameForBackup: string, createdBy?: string | undefined) => Promise<Promise<void | {
10
+ triggerWorkspaceRestore: (workspaceId: string, backupId: string, nameForBackup: string, createdBy?: string | undefined) => Promise<Promise<void | {
11
11
  restoreId: string;
12
12
  metadata: any;
13
13
  }>>;
14
- triggerAppBackup: (appId: string, trigger: BackupTrigger, opts?: {
14
+ triggerWorkspaceBackup: (workspaceId: string, trigger: BackupTrigger, opts?: {
15
15
  createdBy?: string;
16
16
  name?: string;
17
17
  } | undefined) => Promise<Promise<string | undefined>>;
@@ -19,22 +19,22 @@ declare const pkg: {
19
19
  metadata: import("@budibase/types").WorkspaceBackup;
20
20
  stream: import("stream").Readable;
21
21
  }>>;
22
- downloadAppBackup: (backupId: string) => Promise<Promise<string>>;
23
- fetchAppBackups: (appId: string, opts?: BackupFetchOpts | undefined) => Promise<Promise<{
22
+ downloadWorkspaceBackup: (backupId: string) => Promise<Promise<string>>;
23
+ fetchWorkspaceBackups: (workspaceId: string, opts?: BackupFetchOpts | undefined) => Promise<Promise<{
24
24
  data: import("@budibase/types").WorkspaceBackup[];
25
25
  hasNextPage: boolean;
26
26
  nextPage?: string;
27
27
  totalRows: number;
28
28
  }>>;
29
- storeAppBackupMetadata: (metadata: WorkspaceBackupMetadata, opts?: {
29
+ storeWorkspaceBackupMetadata: (metadata: WorkspaceBackupMetadata, opts?: {
30
30
  filename?: string;
31
31
  } | undefined) => Promise<Promise<import("@budibase/types").PutResponse>>;
32
32
  updateBackupStatus: (id: string, status: BackupStatus, contents?: WorkspaceBackupContents | undefined, filename?: string | undefined) => Promise<Promise<import("@budibase/types").PutResponse>>;
33
33
  updateRestoreStatus: (id: string, rev: string, status: BackupStatus) => Promise<Promise<import("@budibase/types").PutResponse>>;
34
- getAppBackup: (backupId: string) => Promise<Promise<import("@budibase/types").WorkspaceBackup>>;
35
- updateAppBackup: (backupId: string, backupName: string) => Promise<Promise<import("@budibase/types").PutResponse>>;
36
- deleteAppBackup: (backupId: string) => Promise<Promise<void>>;
37
- deleteAppBackups: (backupIds: string[]) => Promise<Promise<({
34
+ getWorkspaceBackup: (backupId: string) => Promise<Promise<import("@budibase/types").WorkspaceBackup>>;
35
+ updateWorkspaceBackup: (backupId: string, backupName: string) => Promise<Promise<import("@budibase/types").PutResponse>>;
36
+ deleteWorkspaceBackup: (backupId: string) => Promise<Promise<void>>;
37
+ deleteWorkspaceBackups: (backupIds: string[]) => Promise<Promise<({
38
38
  backupId: string;
39
39
  success: boolean;
40
40
  error?: undefined;
@@ -43,6 +43,6 @@ declare const pkg: {
43
43
  success: boolean;
44
44
  error: string;
45
45
  })[]>>;
46
- trackBackupError: (appId: string, backupId: string, error: string) => Promise<Promise<void>>;
46
+ trackBackupError: (workspaceId: string, backupId: string, error: string) => Promise<Promise<void>>;
47
47
  };
48
48
  export default pkg;
@@ -6,11 +6,11 @@ declare const _default: {
6
6
  init: (opts: BackupInitOpts) => Promise<void>;
7
7
  getBackupQueue: typeof getBackupQueue;
8
8
  isEnabled: typeof import("../features").isBackupsEnabled;
9
- triggerAppRestore: (appId: string, backupId: string, nameForBackup: string, createdBy?: string | undefined) => Promise<Promise<void | {
9
+ triggerWorkspaceRestore: (workspaceId: string, backupId: string, nameForBackup: string, createdBy?: string | undefined) => Promise<Promise<void | {
10
10
  restoreId: string;
11
11
  metadata: any;
12
12
  }>>;
13
- triggerAppBackup: (appId: string, trigger: import("packages/types/dist").BackupTrigger, opts?: {
13
+ triggerWorkspaceBackup: (workspaceId: string, trigger: import("packages/types/dist").BackupTrigger, opts?: {
14
14
  createdBy?: string;
15
15
  name?: string;
16
16
  } | undefined) => Promise<Promise<string | undefined>>;
@@ -18,22 +18,22 @@ declare const _default: {
18
18
  metadata: import("packages/types/dist").WorkspaceBackup;
19
19
  stream: import("stream").Readable;
20
20
  }>>;
21
- downloadAppBackup: (backupId: string) => Promise<Promise<string>>;
22
- fetchAppBackups: (appId: string, opts?: import("packages/types/dist").BackupFetchOpts | undefined) => Promise<Promise<{
21
+ downloadWorkspaceBackup: (backupId: string) => Promise<Promise<string>>;
22
+ fetchWorkspaceBackups: (workspaceId: string, opts?: import("packages/types/dist").BackupFetchOpts | undefined) => Promise<Promise<{
23
23
  data: import("packages/types/dist").WorkspaceBackup[];
24
24
  hasNextPage: boolean;
25
25
  nextPage?: string;
26
26
  totalRows: number;
27
27
  }>>;
28
- storeAppBackupMetadata: (metadata: import("packages/types/dist").WorkspaceBackupMetadata, opts?: {
28
+ storeWorkspaceBackupMetadata: (metadata: import("packages/types/dist").WorkspaceBackupMetadata, opts?: {
29
29
  filename?: string;
30
30
  } | undefined) => Promise<Promise<import("packages/types/dist").PutResponse>>;
31
31
  updateBackupStatus: (id: string, status: import("packages/types/dist").BackupStatus, contents?: import("packages/types/dist").WorkspaceBackupContents | undefined, filename?: string | undefined) => Promise<Promise<import("packages/types/dist").PutResponse>>;
32
32
  updateRestoreStatus: (id: string, rev: string, status: import("packages/types/dist").BackupStatus) => Promise<Promise<import("packages/types/dist").PutResponse>>;
33
- getAppBackup: (backupId: string) => Promise<Promise<import("packages/types/dist").WorkspaceBackup>>;
34
- updateAppBackup: (backupId: string, backupName: string) => Promise<Promise<import("packages/types/dist").PutResponse>>;
35
- deleteAppBackup: (backupId: string) => Promise<Promise<void>>;
36
- deleteAppBackups: (backupIds: string[]) => Promise<Promise<({
33
+ getWorkspaceBackup: (backupId: string) => Promise<Promise<import("packages/types/dist").WorkspaceBackup>>;
34
+ updateWorkspaceBackup: (backupId: string, backupName: string) => Promise<Promise<import("packages/types/dist").PutResponse>>;
35
+ deleteWorkspaceBackup: (backupId: string) => Promise<Promise<void>>;
36
+ deleteWorkspaceBackups: (backupIds: string[]) => Promise<Promise<({
37
37
  backupId: string;
38
38
  success: boolean;
39
39
  error?: undefined;
@@ -42,6 +42,6 @@ declare const _default: {
42
42
  success: boolean;
43
43
  error: string;
44
44
  })[]>>;
45
- trackBackupError: (appId: string, backupId: string, error: string) => Promise<Promise<void>>;
45
+ trackBackupError: (workspaceId: string, backupId: string, error: string) => Promise<Promise<void>>;
46
46
  };
47
47
  export default _default;
@@ -5,26 +5,31 @@ export interface InitOpts {
5
5
  export interface BackupInitOpts {
6
6
  processing: BackupProcessingOpts;
7
7
  }
8
- export interface ImportAppConfig {
9
- file: {
10
- type: string;
8
+ export interface ImportWorkspaceConfig {
9
+ file?: {
10
+ type?: string;
11
11
  path: string;
12
+ password?: string;
12
13
  };
13
- key: string;
14
+ key?: string;
14
15
  }
15
- export interface ImportAppOpts {
16
+ export interface ImportWorkspaceOpts {
16
17
  updateAttachmentColumns?: boolean;
17
18
  importObjStoreContents?: boolean;
18
19
  objectStoreAppId?: string;
19
20
  }
20
- type ExportAppFn = (devAppId: string, opts: {
21
+ export type ExportWorkspaceFn = (devWorkspaceId: string, opts: {
21
22
  tar: boolean;
23
+ excludeRows?: boolean;
24
+ encryptPassword?: string;
25
+ exportPath?: string;
26
+ filter?: string;
22
27
  }) => Promise<string>;
23
- type ImportAppFn = (targetWorkspaceId: string, destinationDb: Database, config: ImportAppConfig, opts?: ImportAppOpts) => Promise<string>;
24
- type StatsFn = (devAppId: string) => Promise<WorkspaceBackupContents>;
28
+ export type ImportWorkspaceFn = (targetWorkspaceId: string, destinationDb: Database, config: ImportWorkspaceConfig, opts?: ImportWorkspaceOpts) => Promise<string>;
29
+ type StatsFn = (devWorkspaceId: string) => Promise<WorkspaceBackupContents>;
25
30
  export interface BackupProcessingOpts {
26
- exportAppFn: ExportAppFn;
27
- importAppFn: ImportAppFn;
31
+ exportWorkspaceFn: ExportWorkspaceFn;
32
+ importWorkspaceFn: ImportWorkspaceFn;
28
33
  statsFn: StatsFn;
29
34
  }
30
35
  export {};
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "dist"
5
5
  ],
6
6
  "license": "UNLICENSED",
7
- "version": "3.34.5",
7
+ "version": "3.34.7",
8
8
  "description": "Budibase Pro (Backend)",
9
9
  "main": "dist/index.js",
10
10
  "types": "dist/index.d.ts",
@@ -19,7 +19,7 @@
19
19
  "@budibase/types": "*",
20
20
  "@koa/router": "15.3.0",
21
21
  "bull": "4.10.1",
22
- "dd-trace": "5.56.0",
22
+ "dd-trace": "5.92.0",
23
23
  "jsonwebtoken": "9.0.2",
24
24
  "lru-cache": "^7.14.1",
25
25
  "memorystream": "^0.3.1",
@@ -65,5 +65,5 @@
65
65
  }
66
66
  }
67
67
  },
68
- "gitHead": "3cd6b13566b94f609768435eba58baec699ce040"
68
+ "gitHead": "0842f52bf3b8700529e56800ef866175e2850e19"
69
69
  }