@haex-space/vault-sdk 2.5.34 → 2.5.35
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-B5sRb-z5.d.mts} +17 -1
- package/dist/{client-t6HbiM76.d.ts → client-C1V7rmBP.d.ts} +17 -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
|
@@ -132,10 +132,18 @@ interface SyncRule {
|
|
|
132
132
|
backendIds: string[];
|
|
133
133
|
direction: SyncDirection;
|
|
134
134
|
enabled: boolean;
|
|
135
|
+
/** Gitignore-like patterns for files/folders to exclude from sync */
|
|
136
|
+
ignorePatterns: string[];
|
|
137
|
+
/** Default conflict resolution strategy for this sync rule */
|
|
138
|
+
conflictStrategy: ConflictStrategy;
|
|
135
139
|
createdAt: string;
|
|
136
140
|
updatedAt: string;
|
|
137
141
|
}
|
|
138
142
|
type SyncDirection = "up" | "down" | "both";
|
|
143
|
+
/** Conflict resolution strategy for sync rules */
|
|
144
|
+
type ConflictStrategy = "local" | "remote" | "newer" | "ask" | "keepBoth";
|
|
145
|
+
/** Conflict strategy constants */
|
|
146
|
+
declare const CONFLICT_STRATEGY: Record<string, ConflictStrategy>;
|
|
139
147
|
interface SyncStatus {
|
|
140
148
|
isSyncing: boolean;
|
|
141
149
|
pendingUploads: number;
|
|
@@ -168,12 +176,20 @@ interface AddSyncRuleOptions {
|
|
|
168
176
|
localPath: string;
|
|
169
177
|
backendIds: string[];
|
|
170
178
|
direction?: SyncDirection;
|
|
179
|
+
/** Gitignore-like patterns for files/folders to exclude from sync */
|
|
180
|
+
ignorePatterns?: string[];
|
|
181
|
+
/** Default conflict resolution strategy (defaults to 'ask') */
|
|
182
|
+
conflictStrategy?: ConflictStrategy;
|
|
171
183
|
}
|
|
172
184
|
interface UpdateSyncRuleOptions {
|
|
173
185
|
ruleId: string;
|
|
174
186
|
backendIds?: string[];
|
|
175
187
|
direction?: SyncDirection;
|
|
176
188
|
enabled?: boolean;
|
|
189
|
+
/** Gitignore-like patterns for files/folders to exclude from sync */
|
|
190
|
+
ignorePatterns?: string[];
|
|
191
|
+
/** Default conflict resolution strategy */
|
|
192
|
+
conflictStrategy?: ConflictStrategy;
|
|
177
193
|
}
|
|
178
194
|
interface ListFilesOptions {
|
|
179
195
|
spaceId: string;
|
|
@@ -513,4 +529,4 @@ declare class HaexVaultSdk {
|
|
|
513
529
|
private log;
|
|
514
530
|
}
|
|
515
531
|
|
|
516
|
-
export { type AddBackendOptions as A, type BackendConfig as B, type
|
|
532
|
+
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 };
|
|
@@ -132,10 +132,18 @@ interface SyncRule {
|
|
|
132
132
|
backendIds: string[];
|
|
133
133
|
direction: SyncDirection;
|
|
134
134
|
enabled: boolean;
|
|
135
|
+
/** Gitignore-like patterns for files/folders to exclude from sync */
|
|
136
|
+
ignorePatterns: string[];
|
|
137
|
+
/** Default conflict resolution strategy for this sync rule */
|
|
138
|
+
conflictStrategy: ConflictStrategy;
|
|
135
139
|
createdAt: string;
|
|
136
140
|
updatedAt: string;
|
|
137
141
|
}
|
|
138
142
|
type SyncDirection = "up" | "down" | "both";
|
|
143
|
+
/** Conflict resolution strategy for sync rules */
|
|
144
|
+
type ConflictStrategy = "local" | "remote" | "newer" | "ask" | "keepBoth";
|
|
145
|
+
/** Conflict strategy constants */
|
|
146
|
+
declare const CONFLICT_STRATEGY: Record<string, ConflictStrategy>;
|
|
139
147
|
interface SyncStatus {
|
|
140
148
|
isSyncing: boolean;
|
|
141
149
|
pendingUploads: number;
|
|
@@ -168,12 +176,20 @@ interface AddSyncRuleOptions {
|
|
|
168
176
|
localPath: string;
|
|
169
177
|
backendIds: string[];
|
|
170
178
|
direction?: SyncDirection;
|
|
179
|
+
/** Gitignore-like patterns for files/folders to exclude from sync */
|
|
180
|
+
ignorePatterns?: string[];
|
|
181
|
+
/** Default conflict resolution strategy (defaults to 'ask') */
|
|
182
|
+
conflictStrategy?: ConflictStrategy;
|
|
171
183
|
}
|
|
172
184
|
interface UpdateSyncRuleOptions {
|
|
173
185
|
ruleId: string;
|
|
174
186
|
backendIds?: string[];
|
|
175
187
|
direction?: SyncDirection;
|
|
176
188
|
enabled?: boolean;
|
|
189
|
+
/** Gitignore-like patterns for files/folders to exclude from sync */
|
|
190
|
+
ignorePatterns?: string[];
|
|
191
|
+
/** Default conflict resolution strategy */
|
|
192
|
+
conflictStrategy?: ConflictStrategy;
|
|
177
193
|
}
|
|
178
194
|
interface ListFilesOptions {
|
|
179
195
|
spaceId: string;
|
|
@@ -513,4 +529,4 @@ declare class HaexVaultSdk {
|
|
|
513
529
|
private log;
|
|
514
530
|
}
|
|
515
531
|
|
|
516
|
-
export { type AddBackendOptions as A, type BackendConfig as B, type
|
|
532
|
+
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-B5sRb-z5.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-B5sRb-z5.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-C1V7rmBP.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-C1V7rmBP.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;
|