@varity-labs/types 2.0.0-alpha.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.
@@ -0,0 +1,532 @@
1
+ /**
2
+ * Varity Storage Migration Types
3
+ *
4
+ * Type definitions for migrating data from traditional cloud storage
5
+ * (AWS S3, GCP GCS, Azure Blob) to Varity's decentralized storage architecture.
6
+ *
7
+ * Supports:
8
+ * - Batch migration jobs
9
+ * - Progress tracking
10
+ * - Error handling and retry logic
11
+ * - Integrity verification
12
+ * - Migration from multiple sources
13
+ */
14
+ import { StorageLayer, StorageTier } from './storage';
15
+ /**
16
+ * Migration job lifecycle status
17
+ */
18
+ export declare enum MigrationStatus {
19
+ /** Job created but not started */
20
+ PENDING = "pending",
21
+ /** Job is currently running */
22
+ RUNNING = "running",
23
+ /** Job is temporarily paused */
24
+ PAUSED = "paused",
25
+ /** Job completed successfully */
26
+ COMPLETED = "completed",
27
+ /** Job failed with errors */
28
+ FAILED = "failed",
29
+ /** Job was cancelled by user */
30
+ CANCELLED = "cancelled",
31
+ /** Job is being validated */
32
+ VALIDATING = "validating",
33
+ /** Job is in retry state */
34
+ RETRYING = "retrying"
35
+ }
36
+ /**
37
+ * Migration phase
38
+ */
39
+ export declare enum MigrationPhase {
40
+ /** Discovering objects to migrate */
41
+ DISCOVERY = "discovery",
42
+ /** Transferring data */
43
+ TRANSFER = "transfer",
44
+ /** Verifying integrity */
45
+ VERIFICATION = "verification",
46
+ /** Cleaning up source (if configured) */
47
+ CLEANUP = "cleanup",
48
+ /** Completed */
49
+ DONE = "done"
50
+ }
51
+ /**
52
+ * Migration source types
53
+ */
54
+ export declare enum MigrationSource {
55
+ /** AWS S3 */
56
+ AWS_S3 = "aws-s3",
57
+ /** Google Cloud Storage */
58
+ GCP_GCS = "gcp-gcs",
59
+ /** Azure Blob Storage */
60
+ AZURE_BLOB = "azure-blob",
61
+ /** Local filesystem */
62
+ LOCAL_FILESYSTEM = "local-filesystem",
63
+ /** HTTP/HTTPS URLs */
64
+ HTTP = "http",
65
+ /** FTP/SFTP */
66
+ FTP = "ftp",
67
+ /** Another Varity storage layer */
68
+ VARITY = "varity"
69
+ }
70
+ /**
71
+ * Migration target (always Varity)
72
+ */
73
+ export declare enum MigrationTarget {
74
+ /** Varity Filecoin/IPFS storage */
75
+ VARITY_FILECOIN = "varity-filecoin",
76
+ /** Varity S3-compatible storage */
77
+ VARITY_S3_COMPATIBLE = "varity-s3-compatible",
78
+ /** Varity GCS-compatible storage */
79
+ VARITY_GCS_COMPATIBLE = "varity-gcs-compatible"
80
+ }
81
+ /**
82
+ * Migration job
83
+ */
84
+ export interface MigrationJob {
85
+ /** Unique job ID */
86
+ id: string;
87
+ /** Job name */
88
+ name: string;
89
+ /** Job description */
90
+ description?: string;
91
+ /** Source configuration */
92
+ source: MigrationSourceConfig;
93
+ /** Target configuration */
94
+ target: MigrationTargetConfig;
95
+ /** Current status */
96
+ status: MigrationStatus;
97
+ /** Current phase */
98
+ phase: MigrationPhase;
99
+ /** Created timestamp */
100
+ createdAt: Date;
101
+ /** Started timestamp */
102
+ startedAt?: Date;
103
+ /** Completed timestamp */
104
+ completedAt?: Date;
105
+ /** Last updated timestamp */
106
+ lastUpdated: Date;
107
+ /** Progress information */
108
+ progress: MigrationProgress;
109
+ /** Configuration options */
110
+ config: MigrationConfig;
111
+ /** Errors encountered */
112
+ errors: MigrationError[];
113
+ /** Warnings */
114
+ warnings: MigrationWarning[];
115
+ /** Created by user */
116
+ createdBy?: string;
117
+ /** Scheduled start time */
118
+ scheduledAt?: Date;
119
+ /** Parent job ID (for sub-jobs) */
120
+ parentJobId?: string;
121
+ /** Tags for organization */
122
+ tags?: Record<string, string>;
123
+ /** Metadata */
124
+ metadata?: Record<string, any>;
125
+ }
126
+ /**
127
+ * Migration source configuration
128
+ */
129
+ export interface MigrationSourceConfig {
130
+ /** Source type */
131
+ type: MigrationSource;
132
+ /** Bucket/container name */
133
+ bucket: string;
134
+ /** Region (for cloud providers) */
135
+ region?: string;
136
+ /** Credentials */
137
+ credentials: MigrationCredentials;
138
+ /** Prefix filter (e.g., 'folder/subfolder/') */
139
+ prefix?: string;
140
+ /** Filters for selective migration */
141
+ filters?: MigrationFilter[];
142
+ /** Custom endpoint (for S3-compatible) */
143
+ endpoint?: string;
144
+ /** Additional source-specific config */
145
+ sourceConfig?: Record<string, any>;
146
+ }
147
+ /**
148
+ * Migration target configuration
149
+ */
150
+ export interface MigrationTargetConfig {
151
+ /** Target type */
152
+ type: MigrationTarget;
153
+ /** Varity storage layer */
154
+ layer: StorageLayer;
155
+ /** Storage tier */
156
+ tier?: StorageTier;
157
+ /** Target bucket (if using S3/GCS compatible) */
158
+ bucket?: string;
159
+ /** Enable encryption */
160
+ encrypt: boolean;
161
+ /** Wallet address for encryption */
162
+ walletAddress?: string;
163
+ /** Namespace prefix */
164
+ namespacePrefix?: string;
165
+ /** Pin to IPFS (for Filecoin backend) */
166
+ pin?: boolean;
167
+ /** Additional target-specific config */
168
+ targetConfig?: Record<string, any>;
169
+ }
170
+ /**
171
+ * Migration credentials
172
+ */
173
+ export interface MigrationCredentials {
174
+ /** AWS credentials */
175
+ aws?: {
176
+ accessKeyId: string;
177
+ secretAccessKey: string;
178
+ sessionToken?: string;
179
+ };
180
+ /** GCP credentials */
181
+ gcp?: {
182
+ projectId: string;
183
+ clientEmail: string;
184
+ privateKey: string;
185
+ };
186
+ /** Azure credentials */
187
+ azure?: {
188
+ accountName: string;
189
+ accountKey: string;
190
+ sasToken?: string;
191
+ };
192
+ /** HTTP credentials */
193
+ http?: {
194
+ username?: string;
195
+ password?: string;
196
+ headers?: Record<string, string>;
197
+ };
198
+ /** FTP credentials */
199
+ ftp?: {
200
+ host: string;
201
+ port: number;
202
+ username: string;
203
+ password: string;
204
+ secure?: boolean;
205
+ };
206
+ }
207
+ /**
208
+ * Migration progress tracking
209
+ */
210
+ export interface MigrationProgress {
211
+ /** Total objects discovered */
212
+ totalObjects: number;
213
+ /** Objects completed successfully */
214
+ completedObjects: number;
215
+ /** Objects that failed */
216
+ failedObjects: number;
217
+ /** Objects skipped */
218
+ skippedObjects: number;
219
+ /** Objects currently in progress */
220
+ inProgressObjects: number;
221
+ /** Total bytes to transfer */
222
+ totalBytes: number;
223
+ /** Bytes transferred successfully */
224
+ transferredBytes: number;
225
+ /** Bytes failed */
226
+ failedBytes: number;
227
+ /** Overall percentage complete (0-100) */
228
+ percentage: number;
229
+ /** Estimated time remaining (seconds) */
230
+ estimatedTimeRemaining?: number;
231
+ /** Current transfer speed (bytes/second) */
232
+ currentSpeed: number;
233
+ /** Average transfer speed (bytes/second) */
234
+ averageSpeed: number;
235
+ /** Objects per second */
236
+ objectsPerSecond: number;
237
+ /** Start time */
238
+ startTime?: Date;
239
+ /** Time spent in each phase */
240
+ phaseTimings?: Record<MigrationPhase, number>;
241
+ }
242
+ /**
243
+ * Migration statistics
244
+ */
245
+ export interface MigrationStats {
246
+ /** Job ID */
247
+ jobId: string;
248
+ /** Total objects processed */
249
+ totalObjects: number;
250
+ /** Success count */
251
+ successCount: number;
252
+ /** Failure count */
253
+ failureCount: number;
254
+ /** Skip count */
255
+ skipCount: number;
256
+ /** Total bytes transferred */
257
+ totalBytes: number;
258
+ /** Average object size */
259
+ averageObjectSize: number;
260
+ /** Total duration (seconds) */
261
+ totalDuration: number;
262
+ /** Average speed (bytes/second) */
263
+ averageSpeed: number;
264
+ /** Peak speed (bytes/second) */
265
+ peakSpeed: number;
266
+ /** Cost estimate */
267
+ costEstimate?: {
268
+ sourceCost: number;
269
+ targetCost: number;
270
+ transferCost: number;
271
+ currency: string;
272
+ };
273
+ }
274
+ /**
275
+ * Migration configuration options
276
+ */
277
+ export interface MigrationConfig {
278
+ /** Number of concurrent transfers */
279
+ concurrency: number;
280
+ /** Batch size for listing operations */
281
+ batchSize: number;
282
+ /** Verify data integrity after transfer */
283
+ verifyIntegrity: boolean;
284
+ /** Delete source objects after successful transfer */
285
+ deleteSource: boolean;
286
+ /** Dry run (don't actually transfer) */
287
+ dryRun: boolean;
288
+ /** Support resumable transfers */
289
+ resumable: boolean;
290
+ /** Skip objects that already exist in target */
291
+ skipExisting: boolean;
292
+ /** Overwrite existing objects in target */
293
+ overwriteExisting: boolean;
294
+ /** Preserve object metadata */
295
+ preserveMetadata: boolean;
296
+ /** Preserve timestamps */
297
+ preserveTimestamps: boolean;
298
+ /** Retry configuration */
299
+ retry: MigrationRetryConfig;
300
+ /** Bandwidth limit (bytes/second, 0 = unlimited) */
301
+ bandwidthLimit?: number;
302
+ /** Notification configuration */
303
+ notifications?: MigrationNotificationConfig;
304
+ /** Checkpointing interval (seconds) */
305
+ checkpointInterval?: number;
306
+ /** Maximum object size (bytes, 0 = unlimited) */
307
+ maxObjectSize?: number;
308
+ /** Minimum object size (bytes) */
309
+ minObjectSize?: number;
310
+ }
311
+ /**
312
+ * Retry configuration
313
+ */
314
+ export interface MigrationRetryConfig {
315
+ /** Maximum number of retries */
316
+ maxRetries: number;
317
+ /** Initial delay (milliseconds) */
318
+ initialDelayMs: number;
319
+ /** Maximum delay (milliseconds) */
320
+ maxDelayMs: number;
321
+ /** Backoff multiplier */
322
+ backoffMultiplier: number;
323
+ /** Retry only on specific errors */
324
+ retryableErrors?: string[];
325
+ }
326
+ /**
327
+ * Notification configuration
328
+ */
329
+ export interface MigrationNotificationConfig {
330
+ /** Enable notifications */
331
+ enabled: boolean;
332
+ /** Notification channels */
333
+ channels: MigrationNotificationChannel[];
334
+ /** Notify on job start */
335
+ onStart: boolean;
336
+ /** Notify on job completion */
337
+ onComplete: boolean;
338
+ /** Notify on job failure */
339
+ onFailure: boolean;
340
+ /** Notify on warnings */
341
+ onWarning: boolean;
342
+ /** Notification frequency (for progress updates, seconds) */
343
+ progressInterval?: number;
344
+ }
345
+ /**
346
+ * Notification channel
347
+ */
348
+ export interface MigrationNotificationChannel {
349
+ /** Channel type */
350
+ type: 'email' | 'webhook' | 'slack' | 'sns' | 'pubsub';
351
+ /** Channel-specific configuration */
352
+ config: Record<string, any>;
353
+ }
354
+ /**
355
+ * Migration filter for selective migration
356
+ */
357
+ export interface MigrationFilter {
358
+ /** Filter type */
359
+ type: 'include' | 'exclude';
360
+ /** Pattern (glob or regex) */
361
+ pattern: string;
362
+ /** Pattern type */
363
+ patternType?: 'glob' | 'regex';
364
+ /** Case sensitive */
365
+ caseSensitive?: boolean;
366
+ /** Filter field */
367
+ field?: 'key' | 'size' | 'modified' | 'storageClass' | 'contentType';
368
+ /** Operator (for numeric/date filters) */
369
+ operator?: 'gt' | 'lt' | 'eq' | 'gte' | 'lte' | 'ne';
370
+ /** Value (for comparison filters) */
371
+ value?: any;
372
+ }
373
+ /**
374
+ * Migration error
375
+ */
376
+ export interface MigrationError {
377
+ /** Object key that failed */
378
+ objectKey: string;
379
+ /** Error code */
380
+ errorCode: string;
381
+ /** Error message */
382
+ error: string;
383
+ /** Stack trace */
384
+ stackTrace?: string;
385
+ /** Timestamp */
386
+ timestamp: Date;
387
+ /** Retryable */
388
+ retryable: boolean;
389
+ /** Retry count */
390
+ retryCount: number;
391
+ /** Phase when error occurred */
392
+ phase: MigrationPhase;
393
+ /** Additional details */
394
+ details?: Record<string, any>;
395
+ }
396
+ /**
397
+ * Migration warning
398
+ */
399
+ export interface MigrationWarning {
400
+ /** Object key */
401
+ objectKey?: string;
402
+ /** Warning type */
403
+ type: 'metadata_loss' | 'permission_change' | 'size_limit' | 'other';
404
+ /** Warning message */
405
+ message: string;
406
+ /** Timestamp */
407
+ timestamp: Date;
408
+ /** Severity */
409
+ severity: 'low' | 'medium' | 'high';
410
+ }
411
+ /**
412
+ * Migration verification result
413
+ */
414
+ export interface MigrationVerification {
415
+ /** Job ID */
416
+ jobId: string;
417
+ /** Verification passed */
418
+ verified: boolean;
419
+ /** Total objects to verify */
420
+ totalObjects: number;
421
+ /** Verified objects */
422
+ verifiedObjects: number;
423
+ /** Failed verification objects */
424
+ failedObjects: number;
425
+ /** Missing objects in target */
426
+ missingObjects: string[];
427
+ /** Corrupted objects (hash mismatch) */
428
+ corruptedObjects: string[];
429
+ /** Verification details */
430
+ details: VerificationDetail[];
431
+ /** Verification started */
432
+ startedAt: Date;
433
+ /** Verification completed */
434
+ completedAt?: Date;
435
+ /** Verification duration (seconds) */
436
+ duration?: number;
437
+ }
438
+ /**
439
+ * Verification detail for a single object
440
+ */
441
+ export interface VerificationDetail {
442
+ /** Object key */
443
+ key: string;
444
+ /** Source hash */
445
+ sourceHash: string;
446
+ /** Target hash */
447
+ targetHash: string;
448
+ /** Hashes match */
449
+ match: boolean;
450
+ /** Source size */
451
+ sourceSize: number;
452
+ /** Target size */
453
+ targetSize: number;
454
+ /** Sizes match */
455
+ sizeMatch: boolean;
456
+ /** Metadata match */
457
+ metadataMatch?: boolean;
458
+ /** Error message (if verification failed) */
459
+ error?: string;
460
+ }
461
+ /**
462
+ * Migration schedule
463
+ */
464
+ export interface MigrationSchedule {
465
+ /** Schedule ID */
466
+ id: string;
467
+ /** Job ID or template */
468
+ jobId: string;
469
+ /** Schedule type */
470
+ type: 'once' | 'recurring' | 'cron';
471
+ /** Start time (for 'once') */
472
+ startTime?: Date;
473
+ /** Cron expression (for 'cron') */
474
+ cronExpression?: string;
475
+ /** Recurrence rule (for 'recurring') */
476
+ recurrenceRule?: MigrationRecurrenceRule;
477
+ /** Schedule enabled */
478
+ enabled: boolean;
479
+ /** Next run time */
480
+ nextRun?: Date;
481
+ /** Last run time */
482
+ lastRun?: Date;
483
+ /** Timezone */
484
+ timezone?: string;
485
+ }
486
+ /**
487
+ * Recurrence rule
488
+ */
489
+ export interface MigrationRecurrenceRule {
490
+ /** Frequency */
491
+ frequency: 'hourly' | 'daily' | 'weekly' | 'monthly';
492
+ /** Interval */
493
+ interval: number;
494
+ /** Days of week (for weekly, 0 = Sunday) */
495
+ daysOfWeek?: number[];
496
+ /** Day of month (for monthly) */
497
+ dayOfMonth?: number;
498
+ /** Hour of day */
499
+ hour?: number;
500
+ /** Minute of hour */
501
+ minute?: number;
502
+ /** End date */
503
+ endDate?: Date;
504
+ /** Max occurrences */
505
+ maxOccurrences?: number;
506
+ }
507
+ /**
508
+ * Migration template for reusable configurations
509
+ */
510
+ export interface MigrationTemplate {
511
+ /** Template ID */
512
+ id: string;
513
+ /** Template name */
514
+ name: string;
515
+ /** Template description */
516
+ description?: string;
517
+ /** Source configuration template */
518
+ sourceTemplate: Partial<MigrationSourceConfig>;
519
+ /** Target configuration template */
520
+ targetTemplate: Partial<MigrationTargetConfig>;
521
+ /** Config template */
522
+ configTemplate: Partial<MigrationConfig>;
523
+ /** Template tags */
524
+ tags?: Record<string, string>;
525
+ /** Created by */
526
+ createdBy?: string;
527
+ /** Created at */
528
+ createdAt: Date;
529
+ /** Updated at */
530
+ updatedAt: Date;
531
+ }
532
+ //# sourceMappingURL=migration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration.d.ts","sourceRoot":"","sources":["../src/migration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAMrD;;GAEG;AACH,oBAAY,eAAe;IACzB,kCAAkC;IAClC,OAAO,YAAY;IAEnB,+BAA+B;IAC/B,OAAO,YAAY;IAEnB,gCAAgC;IAChC,MAAM,WAAW;IAEjB,iCAAiC;IACjC,SAAS,cAAc;IAEvB,6BAA6B;IAC7B,MAAM,WAAW;IAEjB,gCAAgC;IAChC,SAAS,cAAc;IAEvB,6BAA6B;IAC7B,UAAU,eAAe;IAEzB,4BAA4B;IAC5B,QAAQ,aAAa;CACtB;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,qCAAqC;IACrC,SAAS,cAAc;IAEvB,wBAAwB;IACxB,QAAQ,aAAa;IAErB,0BAA0B;IAC1B,YAAY,iBAAiB;IAE7B,yCAAyC;IACzC,OAAO,YAAY;IAEnB,gBAAgB;IAChB,IAAI,SAAS;CACd;AAMD;;GAEG;AACH,oBAAY,eAAe;IACzB,aAAa;IACb,MAAM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ACtB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAMD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,kBAAkB;IAClB,EAAE,EAAE,MAAM,CAAA;IAEV,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAA;IAEZ,2BAA2B;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,oCAAoC;IACpC,cAAc,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAA;IAE9C,oCAAoC;IACpC,cAAc,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAA;IAE9C,sBAAsB;IACtB,cAAc,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;IAExC,oBAAoB;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAE7B,iBAAiB;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,iBAAiB;IACjB,SAAS,EAAE,IAAI,CAAA;IAEf,iBAAiB;IACjB,SAAS,EAAE,IAAI,CAAA;CAChB"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Varity Storage Migration Types
3
+ *
4
+ * Type definitions for migrating data from traditional cloud storage
5
+ * (AWS S3, GCP GCS, Azure Blob) to Varity's decentralized storage architecture.
6
+ *
7
+ * Supports:
8
+ * - Batch migration jobs
9
+ * - Progress tracking
10
+ * - Error handling and retry logic
11
+ * - Integrity verification
12
+ * - Migration from multiple sources
13
+ */
14
+ // ============================================================================
15
+ // Migration Job Status
16
+ // ============================================================================
17
+ /**
18
+ * Migration job lifecycle status
19
+ */
20
+ export var MigrationStatus;
21
+ (function (MigrationStatus) {
22
+ /** Job created but not started */
23
+ MigrationStatus["PENDING"] = "pending";
24
+ /** Job is currently running */
25
+ MigrationStatus["RUNNING"] = "running";
26
+ /** Job is temporarily paused */
27
+ MigrationStatus["PAUSED"] = "paused";
28
+ /** Job completed successfully */
29
+ MigrationStatus["COMPLETED"] = "completed";
30
+ /** Job failed with errors */
31
+ MigrationStatus["FAILED"] = "failed";
32
+ /** Job was cancelled by user */
33
+ MigrationStatus["CANCELLED"] = "cancelled";
34
+ /** Job is being validated */
35
+ MigrationStatus["VALIDATING"] = "validating";
36
+ /** Job is in retry state */
37
+ MigrationStatus["RETRYING"] = "retrying";
38
+ })(MigrationStatus || (MigrationStatus = {}));
39
+ /**
40
+ * Migration phase
41
+ */
42
+ export var MigrationPhase;
43
+ (function (MigrationPhase) {
44
+ /** Discovering objects to migrate */
45
+ MigrationPhase["DISCOVERY"] = "discovery";
46
+ /** Transferring data */
47
+ MigrationPhase["TRANSFER"] = "transfer";
48
+ /** Verifying integrity */
49
+ MigrationPhase["VERIFICATION"] = "verification";
50
+ /** Cleaning up source (if configured) */
51
+ MigrationPhase["CLEANUP"] = "cleanup";
52
+ /** Completed */
53
+ MigrationPhase["DONE"] = "done";
54
+ })(MigrationPhase || (MigrationPhase = {}));
55
+ // ============================================================================
56
+ // Migration Sources and Targets
57
+ // ============================================================================
58
+ /**
59
+ * Migration source types
60
+ */
61
+ export var MigrationSource;
62
+ (function (MigrationSource) {
63
+ /** AWS S3 */
64
+ MigrationSource["AWS_S3"] = "aws-s3";
65
+ /** Google Cloud Storage */
66
+ MigrationSource["GCP_GCS"] = "gcp-gcs";
67
+ /** Azure Blob Storage */
68
+ MigrationSource["AZURE_BLOB"] = "azure-blob";
69
+ /** Local filesystem */
70
+ MigrationSource["LOCAL_FILESYSTEM"] = "local-filesystem";
71
+ /** HTTP/HTTPS URLs */
72
+ MigrationSource["HTTP"] = "http";
73
+ /** FTP/SFTP */
74
+ MigrationSource["FTP"] = "ftp";
75
+ /** Another Varity storage layer */
76
+ MigrationSource["VARITY"] = "varity";
77
+ })(MigrationSource || (MigrationSource = {}));
78
+ /**
79
+ * Migration target (always Varity)
80
+ */
81
+ export var MigrationTarget;
82
+ (function (MigrationTarget) {
83
+ /** Varity Filecoin/IPFS storage */
84
+ MigrationTarget["VARITY_FILECOIN"] = "varity-filecoin";
85
+ /** Varity S3-compatible storage */
86
+ MigrationTarget["VARITY_S3_COMPATIBLE"] = "varity-s3-compatible";
87
+ /** Varity GCS-compatible storage */
88
+ MigrationTarget["VARITY_GCS_COMPATIBLE"] = "varity-gcs-compatible";
89
+ })(MigrationTarget || (MigrationTarget = {}));
90
+ // NOTE: Types are declared above and exported via interface/enum declarations