@haex-space/vault-sdk 2.5.34 → 2.5.37
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/dist/{client-BkN93lDI.d.mts → client-BF1XJY-3.d.mts} +19 -1
- package/dist/{client-t6HbiM76.d.ts → client-D1sxoc42.d.ts} +19 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -1
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js.map +1 -1
- package/dist/react.mjs.map +1 -1
- package/dist/runtime/nuxt.plugin.client.d.mts +1 -1
- package/dist/runtime/nuxt.plugin.client.d.ts +1 -1
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs.map +1 -1
- package/dist/svelte.d.mts +1 -1
- package/dist/svelte.d.ts +1 -1
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs.map +1 -1
- package/dist/vue.d.mts +1 -1
- package/dist/vue.d.ts +1 -1
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -127,15 +127,25 @@ interface S3BackendConfig {
|
|
|
127
127
|
type BackendConfig = S3BackendConfig;
|
|
128
128
|
interface SyncRule {
|
|
129
129
|
id: string;
|
|
130
|
+
/** Device ID this sync rule belongs to (local paths are device-specific) */
|
|
131
|
+
deviceId: string;
|
|
130
132
|
spaceId: string;
|
|
131
133
|
localPath: string;
|
|
132
134
|
backendIds: string[];
|
|
133
135
|
direction: SyncDirection;
|
|
134
136
|
enabled: boolean;
|
|
137
|
+
/** Gitignore-like patterns for files/folders to exclude from sync */
|
|
138
|
+
ignorePatterns: string[];
|
|
139
|
+
/** Default conflict resolution strategy for this sync rule */
|
|
140
|
+
conflictStrategy: ConflictStrategy;
|
|
135
141
|
createdAt: string;
|
|
136
142
|
updatedAt: string;
|
|
137
143
|
}
|
|
138
144
|
type SyncDirection = "up" | "down" | "both";
|
|
145
|
+
/** Conflict resolution strategy for sync rules */
|
|
146
|
+
type ConflictStrategy = "local" | "remote" | "newer" | "ask" | "keepBoth";
|
|
147
|
+
/** Conflict strategy constants */
|
|
148
|
+
declare const CONFLICT_STRATEGY: Record<string, ConflictStrategy>;
|
|
139
149
|
interface SyncStatus {
|
|
140
150
|
isSyncing: boolean;
|
|
141
151
|
pendingUploads: number;
|
|
@@ -168,12 +178,20 @@ interface AddSyncRuleOptions {
|
|
|
168
178
|
localPath: string;
|
|
169
179
|
backendIds: string[];
|
|
170
180
|
direction?: SyncDirection;
|
|
181
|
+
/** Gitignore-like patterns for files/folders to exclude from sync */
|
|
182
|
+
ignorePatterns?: string[];
|
|
183
|
+
/** Default conflict resolution strategy (defaults to 'ask') */
|
|
184
|
+
conflictStrategy?: ConflictStrategy;
|
|
171
185
|
}
|
|
172
186
|
interface UpdateSyncRuleOptions {
|
|
173
187
|
ruleId: string;
|
|
174
188
|
backendIds?: string[];
|
|
175
189
|
direction?: SyncDirection;
|
|
176
190
|
enabled?: boolean;
|
|
191
|
+
/** Gitignore-like patterns for files/folders to exclude from sync */
|
|
192
|
+
ignorePatterns?: string[];
|
|
193
|
+
/** Default conflict resolution strategy */
|
|
194
|
+
conflictStrategy?: ConflictStrategy;
|
|
177
195
|
}
|
|
178
196
|
interface ListFilesOptions {
|
|
179
197
|
spaceId: string;
|
|
@@ -513,4 +531,4 @@ declare class HaexVaultSdk {
|
|
|
513
531
|
private log;
|
|
514
532
|
}
|
|
515
533
|
|
|
516
|
-
export { type AddBackendOptions as A, type BackendConfig as B, type
|
|
534
|
+
export { type AddBackendOptions as A, type BackendConfig as B, type ConflictStrategy as C, DatabaseAPI as D, FilesystemAPI as F, HaexVaultSdk as H, type ListFilesOptions as L, PermissionsAPI as P, StorageAPI as S, type UpdateSyncRuleOptions as U, WebAPI as W, FileSyncAPI as a, type FileSpace as b, type FileInfo as c, type FileSyncState as d, type StorageBackendInfo as e, type StorageBackendType as f, type S3BackendConfig as g, type SyncRule as h, type SyncDirection as i, type SyncStatus as j, type SyncError as k, type SyncProgress as l, type CreateSpaceOptions as m, type AddSyncRuleOptions as n, type ScanLocalOptions as o, type UploadFileOptions as p, type DownloadFileOptions as q, type LocalFileInfo as r, FILE_SYNC_STATE as s, SYNC_DIRECTION as t, STORAGE_BACKEND_TYPE as u, CONFLICT_STRATEGY as v };
|
|
@@ -127,15 +127,25 @@ interface S3BackendConfig {
|
|
|
127
127
|
type BackendConfig = S3BackendConfig;
|
|
128
128
|
interface SyncRule {
|
|
129
129
|
id: string;
|
|
130
|
+
/** Device ID this sync rule belongs to (local paths are device-specific) */
|
|
131
|
+
deviceId: string;
|
|
130
132
|
spaceId: string;
|
|
131
133
|
localPath: string;
|
|
132
134
|
backendIds: string[];
|
|
133
135
|
direction: SyncDirection;
|
|
134
136
|
enabled: boolean;
|
|
137
|
+
/** Gitignore-like patterns for files/folders to exclude from sync */
|
|
138
|
+
ignorePatterns: string[];
|
|
139
|
+
/** Default conflict resolution strategy for this sync rule */
|
|
140
|
+
conflictStrategy: ConflictStrategy;
|
|
135
141
|
createdAt: string;
|
|
136
142
|
updatedAt: string;
|
|
137
143
|
}
|
|
138
144
|
type SyncDirection = "up" | "down" | "both";
|
|
145
|
+
/** Conflict resolution strategy for sync rules */
|
|
146
|
+
type ConflictStrategy = "local" | "remote" | "newer" | "ask" | "keepBoth";
|
|
147
|
+
/** Conflict strategy constants */
|
|
148
|
+
declare const CONFLICT_STRATEGY: Record<string, ConflictStrategy>;
|
|
139
149
|
interface SyncStatus {
|
|
140
150
|
isSyncing: boolean;
|
|
141
151
|
pendingUploads: number;
|
|
@@ -168,12 +178,20 @@ interface AddSyncRuleOptions {
|
|
|
168
178
|
localPath: string;
|
|
169
179
|
backendIds: string[];
|
|
170
180
|
direction?: SyncDirection;
|
|
181
|
+
/** Gitignore-like patterns for files/folders to exclude from sync */
|
|
182
|
+
ignorePatterns?: string[];
|
|
183
|
+
/** Default conflict resolution strategy (defaults to 'ask') */
|
|
184
|
+
conflictStrategy?: ConflictStrategy;
|
|
171
185
|
}
|
|
172
186
|
interface UpdateSyncRuleOptions {
|
|
173
187
|
ruleId: string;
|
|
174
188
|
backendIds?: string[];
|
|
175
189
|
direction?: SyncDirection;
|
|
176
190
|
enabled?: boolean;
|
|
191
|
+
/** Gitignore-like patterns for files/folders to exclude from sync */
|
|
192
|
+
ignorePatterns?: string[];
|
|
193
|
+
/** Default conflict resolution strategy */
|
|
194
|
+
conflictStrategy?: ConflictStrategy;
|
|
177
195
|
}
|
|
178
196
|
interface ListFilesOptions {
|
|
179
197
|
spaceId: string;
|
|
@@ -513,4 +531,4 @@ declare class HaexVaultSdk {
|
|
|
513
531
|
private log;
|
|
514
532
|
}
|
|
515
533
|
|
|
516
|
-
export { type AddBackendOptions as A, type BackendConfig as B, type
|
|
534
|
+
export { type AddBackendOptions as A, type BackendConfig as B, type ConflictStrategy as C, DatabaseAPI as D, FilesystemAPI as F, HaexVaultSdk as H, type ListFilesOptions as L, PermissionsAPI as P, StorageAPI as S, type UpdateSyncRuleOptions as U, WebAPI as W, FileSyncAPI as a, type FileSpace as b, type FileInfo as c, type FileSyncState as d, type StorageBackendInfo as e, type StorageBackendType as f, type S3BackendConfig as g, type SyncRule as h, type SyncDirection as i, type SyncStatus as j, type SyncError as k, type SyncProgress as l, type CreateSpaceOptions as m, type AddSyncRuleOptions as n, type ScanLocalOptions as o, type UploadFileOptions as p, type DownloadFileOptions as q, type LocalFileInfo as r, FILE_SYNC_STATE as s, SYNC_DIRECTION as t, STORAGE_BACKEND_TYPE as u, CONFLICT_STRATEGY as v };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as HaexVaultSdk } from './client-
|
|
2
|
-
export { A as AddBackendOptions,
|
|
1
|
+
import { H as HaexVaultSdk } from './client-BF1XJY-3.mjs';
|
|
2
|
+
export { A as AddBackendOptions, n as AddSyncRuleOptions, B as BackendConfig, v as CONFLICT_STRATEGY, C as ConflictStrategy, m as CreateSpaceOptions, D as DatabaseAPI, q as DownloadFileOptions, s as FILE_SYNC_STATE, c as FileInfo, b as FileSpace, a as FileSyncAPI, d as FileSyncState, F as FilesystemAPI, L as ListFilesOptions, r as LocalFileInfo, P as PermissionsAPI, g as S3BackendConfig, u as STORAGE_BACKEND_TYPE, t as SYNC_DIRECTION, o as ScanLocalOptions, e as StorageBackendInfo, f as StorageBackendType, i as SyncDirection, k as SyncError, l as SyncProgress, h as SyncRule, j as SyncStatus, U as UpdateSyncRuleOptions, p as UploadFileOptions, W as WebAPI } from './client-BF1XJY-3.mjs';
|
|
3
3
|
import { E as ExtensionManifest, H as HaexHubConfig } from './types-DiXJ5SF6.mjs';
|
|
4
4
|
export { A as ApplicationContext, t as AuthorizedClient, B as BlockedClient, C as ContextChangedEvent, F as DEFAULT_TIMEOUT, o as DatabaseColumnInfo, m as DatabaseExecuteParams, k as DatabasePermission, d as DatabasePermissionRequest, l as DatabaseQueryParams, D as DatabaseQueryResult, n as DatabaseTableInfo, U as EXTERNAL_EVENTS, z as ErrorCode, g as EventCallback, a as ExtensionInfo, v as ExternalAuthDecision, x as ExternalConnection, J as ExternalConnectionErrorCode, I as ExternalConnectionState, V as ExternalEvent, s as ExternalRequest, r as ExternalRequestEvent, e as ExternalRequestHandler, f as ExternalResponse, O as HAEXTENSION_EVENTS, j as HaexHubEvent, h as HaexHubRequest, i as HaexHubResponse, N as HaexVaultSdkError, Q as HaextensionEvent, u as PendingAuthorization, P as PermissionResponse, y as PermissionStatus, R as RequestedExtension, p as SearchQuery, q as SearchRequestEvent, S as SearchResult, w as SessionAuthorization, T as TABLE_SEPARATOR, W as WebRequestOptions, c as WebResponse, L as canExternalClientSendRequests, G as getTableName, K as isExternalClientConnected } from './types-DiXJ5SF6.mjs';
|
|
5
5
|
export { H as HaextensionConfig } from './config-D_HXjsEV.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as HaexVaultSdk } from './client-
|
|
2
|
-
export { A as AddBackendOptions,
|
|
1
|
+
import { H as HaexVaultSdk } from './client-D1sxoc42.js';
|
|
2
|
+
export { A as AddBackendOptions, n as AddSyncRuleOptions, B as BackendConfig, v as CONFLICT_STRATEGY, C as ConflictStrategy, m as CreateSpaceOptions, D as DatabaseAPI, q as DownloadFileOptions, s as FILE_SYNC_STATE, c as FileInfo, b as FileSpace, a as FileSyncAPI, d as FileSyncState, F as FilesystemAPI, L as ListFilesOptions, r as LocalFileInfo, P as PermissionsAPI, g as S3BackendConfig, u as STORAGE_BACKEND_TYPE, t as SYNC_DIRECTION, o as ScanLocalOptions, e as StorageBackendInfo, f as StorageBackendType, i as SyncDirection, k as SyncError, l as SyncProgress, h as SyncRule, j as SyncStatus, U as UpdateSyncRuleOptions, p as UploadFileOptions, W as WebAPI } from './client-D1sxoc42.js';
|
|
3
3
|
import { E as ExtensionManifest, H as HaexHubConfig } from './types-DiXJ5SF6.js';
|
|
4
4
|
export { A as ApplicationContext, t as AuthorizedClient, B as BlockedClient, C as ContextChangedEvent, F as DEFAULT_TIMEOUT, o as DatabaseColumnInfo, m as DatabaseExecuteParams, k as DatabasePermission, d as DatabasePermissionRequest, l as DatabaseQueryParams, D as DatabaseQueryResult, n as DatabaseTableInfo, U as EXTERNAL_EVENTS, z as ErrorCode, g as EventCallback, a as ExtensionInfo, v as ExternalAuthDecision, x as ExternalConnection, J as ExternalConnectionErrorCode, I as ExternalConnectionState, V as ExternalEvent, s as ExternalRequest, r as ExternalRequestEvent, e as ExternalRequestHandler, f as ExternalResponse, O as HAEXTENSION_EVENTS, j as HaexHubEvent, h as HaexHubRequest, i as HaexHubResponse, N as HaexVaultSdkError, Q as HaextensionEvent, u as PendingAuthorization, P as PermissionResponse, y as PermissionStatus, R as RequestedExtension, p as SearchQuery, q as SearchRequestEvent, S as SearchResult, w as SessionAuthorization, T as TABLE_SEPARATOR, W as WebRequestOptions, c as WebResponse, L as canExternalClientSendRequests, G as getTableName, K as isExternalClientConnected } from './types-DiXJ5SF6.js';
|
|
5
5
|
export { H as HaextensionConfig } from './config-D_HXjsEV.js';
|
package/dist/index.js
CHANGED
|
@@ -673,6 +673,18 @@ var STORAGE_BACKEND_TYPE = {
|
|
|
673
673
|
GDRIVE: "gdrive",
|
|
674
674
|
DROPBOX: "dropbox"
|
|
675
675
|
};
|
|
676
|
+
var CONFLICT_STRATEGY = {
|
|
677
|
+
/** Always prefer local version */
|
|
678
|
+
LOCAL: "local",
|
|
679
|
+
/** Always prefer remote version */
|
|
680
|
+
REMOTE: "remote",
|
|
681
|
+
/** Prefer newer version (Last-Writer-Wins) */
|
|
682
|
+
NEWER: "newer",
|
|
683
|
+
/** Ask user to resolve each conflict manually */
|
|
684
|
+
ASK: "ask",
|
|
685
|
+
/** Keep both versions (create conflict copy) */
|
|
686
|
+
KEEP_BOTH: "keepBoth"
|
|
687
|
+
};
|
|
676
688
|
var FileSyncAPI = class {
|
|
677
689
|
constructor(client) {
|
|
678
690
|
this.client = client;
|
|
@@ -2557,6 +2569,7 @@ function createHaexVaultSdk(config = {}) {
|
|
|
2557
2569
|
return new HaexVaultSdk(config);
|
|
2558
2570
|
}
|
|
2559
2571
|
|
|
2572
|
+
exports.CONFLICT_STRATEGY = CONFLICT_STRATEGY;
|
|
2560
2573
|
exports.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT;
|
|
2561
2574
|
exports.DatabaseAPI = DatabaseAPI;
|
|
2562
2575
|
exports.EXTERNAL_EVENTS = EXTERNAL_EVENTS;
|