@appwrite.io/console 12.0.0 → 12.2.0

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.
@@ -1,6 +1,7 @@
1
1
  import { Client } from '../client';
2
2
  import type { Models } from '../models';
3
3
  import { AppwriteMigrationResource } from '../enums/appwrite-migration-resource';
4
+ import { OnDuplicate } from '../enums/on-duplicate';
4
5
  import { FirebaseMigrationResource } from '../enums/firebase-migration-resource';
5
6
  import { NHostMigrationResource } from '../enums/n-host-migration-resource';
6
7
  import { SupabaseMigrationResource } from '../enums/supabase-migration-resource';
@@ -39,6 +40,7 @@ export declare class Migrations {
39
40
  * @param {string} params.endpoint - Source Appwrite endpoint
40
41
  * @param {string} params.projectId - Source Project ID
41
42
  * @param {string} params.apiKey - Source API Key
43
+ * @param {OnDuplicate} params.onDuplicate - Behavior when a row with an existing $id is encountered. "fail" (default): abort on first conflict. "skip": silently ignore. "overwrite": replace existing row.
42
44
  * @throws {AppwriteException}
43
45
  * @returns {Promise<Models.Migration>}
44
46
  */
@@ -47,6 +49,7 @@ export declare class Migrations {
47
49
  endpoint: string;
48
50
  projectId: string;
49
51
  apiKey: string;
52
+ onDuplicate?: OnDuplicate;
50
53
  }): Promise<Models.Migration>;
51
54
  /**
52
55
  * Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project.
@@ -55,11 +58,12 @@ export declare class Migrations {
55
58
  * @param {string} endpoint - Source Appwrite endpoint
56
59
  * @param {string} projectId - Source Project ID
57
60
  * @param {string} apiKey - Source API Key
61
+ * @param {OnDuplicate} onDuplicate - Behavior when a row with an existing $id is encountered. "fail" (default): abort on first conflict. "skip": silently ignore. "overwrite": replace existing row.
58
62
  * @throws {AppwriteException}
59
63
  * @returns {Promise<Models.Migration>}
60
64
  * @deprecated Use the object parameter style method for a better developer experience.
61
65
  */
62
- createAppwriteMigration(resources: AppwriteMigrationResource[], endpoint: string, projectId: string, apiKey: string): Promise<Models.Migration>;
66
+ createAppwriteMigration(resources: AppwriteMigrationResource[], endpoint: string, projectId: string, apiKey: string, onDuplicate?: OnDuplicate): Promise<Models.Migration>;
63
67
  /**
64
68
  * Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
65
69
  *
@@ -138,6 +142,7 @@ export declare class Migrations {
138
142
  * @param {string} params.fileId - File ID.
139
143
  * @param {string} params.resourceId - Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.
140
144
  * @param {boolean} params.internalFile - Is the file stored in an internal bucket?
145
+ * @param {OnDuplicate} params.onDuplicate - Behavior when a row with an existing $id is encountered. "fail" (default): abort on first conflict. "skip": silently ignore. "overwrite": replace existing row.
141
146
  * @throws {AppwriteException}
142
147
  * @returns {Promise<Models.Migration>}
143
148
  */
@@ -146,6 +151,7 @@ export declare class Migrations {
146
151
  fileId: string;
147
152
  resourceId: string;
148
153
  internalFile?: boolean;
154
+ onDuplicate?: OnDuplicate;
149
155
  }): Promise<Models.Migration>;
150
156
  /**
151
157
  * Import documents from a CSV file into your Appwrite database. This endpoint allows you to import documents from a CSV file uploaded to Appwrite Storage bucket.
@@ -154,11 +160,12 @@ export declare class Migrations {
154
160
  * @param {string} fileId - File ID.
155
161
  * @param {string} resourceId - Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.
156
162
  * @param {boolean} internalFile - Is the file stored in an internal bucket?
163
+ * @param {OnDuplicate} onDuplicate - Behavior when a row with an existing $id is encountered. "fail" (default): abort on first conflict. "skip": silently ignore. "overwrite": replace existing row.
157
164
  * @throws {AppwriteException}
158
165
  * @returns {Promise<Models.Migration>}
159
166
  * @deprecated Use the object parameter style method for a better developer experience.
160
167
  */
161
- createCSVImport(bucketId: string, fileId: string, resourceId: string, internalFile?: boolean): Promise<Models.Migration>;
168
+ createCSVImport(bucketId: string, fileId: string, resourceId: string, internalFile?: boolean, onDuplicate?: OnDuplicate): Promise<Models.Migration>;
162
169
  /**
163
170
  * Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project.
164
171
  *
@@ -244,6 +251,7 @@ export declare class Migrations {
244
251
  * @param {string} params.fileId - File ID.
245
252
  * @param {string} params.resourceId - Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.
246
253
  * @param {boolean} params.internalFile - Is the file stored in an internal bucket?
254
+ * @param {OnDuplicate} params.onDuplicate - Behavior when a row with an existing $id is encountered. "fail" (default): abort on first conflict. "skip": silently ignore. "overwrite": replace existing row.
247
255
  * @throws {AppwriteException}
248
256
  * @returns {Promise<Models.Migration>}
249
257
  */
@@ -252,6 +260,7 @@ export declare class Migrations {
252
260
  fileId: string;
253
261
  resourceId: string;
254
262
  internalFile?: boolean;
263
+ onDuplicate?: OnDuplicate;
255
264
  }): Promise<Models.Migration>;
256
265
  /**
257
266
  * Import documents from a JSON file into your Appwrite database. This endpoint allows you to import documents from a JSON file uploaded to Appwrite Storage bucket.
@@ -261,11 +270,12 @@ export declare class Migrations {
261
270
  * @param {string} fileId - File ID.
262
271
  * @param {string} resourceId - Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.
263
272
  * @param {boolean} internalFile - Is the file stored in an internal bucket?
273
+ * @param {OnDuplicate} onDuplicate - Behavior when a row with an existing $id is encountered. "fail" (default): abort on first conflict. "skip": silently ignore. "overwrite": replace existing row.
264
274
  * @throws {AppwriteException}
265
275
  * @returns {Promise<Models.Migration>}
266
276
  * @deprecated Use the object parameter style method for a better developer experience.
267
277
  */
268
- createJSONImport(bucketId: string, fileId: string, resourceId: string, internalFile?: boolean): Promise<Models.Migration>;
278
+ createJSONImport(bucketId: string, fileId: string, resourceId: string, internalFile?: boolean, onDuplicate?: OnDuplicate): Promise<Models.Migration>;
269
279
  /**
270
280
  * Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project.
271
281
  *