@hasna/files 0.2.0 → 0.2.1

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/cli/index.js CHANGED
@@ -2556,6 +2556,10 @@ function listFiles(opts = {}) {
2556
2556
  conditions.push("f.machine_id = ?");
2557
2557
  params.push(opts.machine_id);
2558
2558
  }
2559
+ if (opts.sync_status) {
2560
+ conditions.push("f.sync_status = ?");
2561
+ params.push(opts.sync_status);
2562
+ }
2559
2563
  if (opts.ext) {
2560
2564
  conditions.push("f.ext = ?");
2561
2565
  params.push(opts.ext.startsWith(".") ? opts.ext : `.${opts.ext}`);
package/dist/index.d.ts CHANGED
@@ -102,6 +102,8 @@ export interface SearchResult extends FileWithTags {
102
102
  rank?: number;
103
103
  }
104
104
 
105
+ export type SyncStatus = "local_only" | "synced" | "conflict";
106
+
105
107
  export interface ListFilesOptions {
106
108
  source_id?: string;
107
109
  machine_id?: string;
@@ -110,6 +112,7 @@ export interface ListFilesOptions {
110
112
  project_id?: string;
111
113
  ext?: string;
112
114
  status?: FileStatus;
115
+ sync_status?: SyncStatus;
113
116
  limit?: number;
114
117
  offset?: number;
115
118
  query?: string;
package/dist/index.js CHANGED
@@ -32210,6 +32210,10 @@ function listFiles(opts = {}) {
32210
32210
  conditions.push("f.machine_id = ?");
32211
32211
  params.push(opts.machine_id);
32212
32212
  }
32213
+ if (opts.sync_status) {
32214
+ conditions.push("f.sync_status = ?");
32215
+ params.push(opts.sync_status);
32216
+ }
32213
32217
  if (opts.ext) {
32214
32218
  conditions.push("f.ext = ?");
32215
32219
  params.push(opts.ext.startsWith(".") ? opts.ext : `.${opts.ext}`);