@appwrite.io/console 12.1.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.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@appwrite.io/console",
3
3
  "homepage": "https://appwrite.io/support",
4
4
  "description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
5
- "version": "12.1.0",
5
+ "version": "12.2.0",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "dist/cjs/sdk.js",
8
8
  "exports": {
@@ -1,4 +1,4 @@
1
- export declare enum MethodId {
1
+ export declare enum AuthMethod {
2
2
  Emailpassword = "email-password",
3
3
  Magicurl = "magic-url",
4
4
  Emailotp = "email-otp",
@@ -41,5 +41,7 @@ export declare enum OAuthProvider {
41
41
  Yammer = "yammer",
42
42
  Yandex = "yandex",
43
43
  Zoho = "zoho",
44
- Zoom = "zoom"
44
+ Zoom = "zoom",
45
+ GithubImagine = "githubImagine",
46
+ GoogleImagine = "googleImagine"
45
47
  }
@@ -0,0 +1,5 @@
1
+ export declare enum OnDuplicate {
2
+ Fail = "fail",
3
+ Skip = "skip",
4
+ Overwrite = "overwrite"
5
+ }
@@ -1,4 +1,4 @@
1
- export declare enum PolicyId {
1
+ export declare enum ProjectPolicy {
2
2
  Passworddictionary = "password-dictionary",
3
3
  Passwordhistory = "password-history",
4
4
  Passwordpersonaldata = "password-personal-data",
@@ -1,6 +1,5 @@
1
1
  export declare enum ProxyRuleStatus {
2
- Created = "created",
2
+ Unverified = "unverified",
3
3
  Verifying = "verifying",
4
- Verified = "verified",
5
- Unverified = "unverified"
4
+ Verified = "verified"
6
5
  }
@@ -64,6 +64,8 @@ export declare enum Scopes {
64
64
  TargetsWrite = "targets.write",
65
65
  MessagesRead = "messages.read",
66
66
  MessagesWrite = "messages.write",
67
+ RulesRead = "rules.read",
68
+ RulesWrite = "rules.write",
67
69
  WebhooksRead = "webhooks.read",
68
70
  WebhooksWrite = "webhooks.write",
69
71
  LocaleRead = "locale.read",
@@ -76,8 +78,6 @@ export declare enum Scopes {
76
78
  SchedulesWrite = "schedules.write",
77
79
  VcsRead = "vcs.read",
78
80
  VcsWrite = "vcs.write",
79
- RulesRead = "rules.read",
80
- RulesWrite = "rules.write",
81
81
  BackupsPoliciesRead = "backups.policies.read",
82
82
  BackupsPoliciesWrite = "backups.policies.write",
83
83
  ArchivesRead = "archives.read",
package/types/index.d.ts CHANGED
@@ -79,12 +79,13 @@ export { ResourceType } from './enums/resource-type';
79
79
  export { MessagePriority } from './enums/message-priority';
80
80
  export { SmtpEncryption } from './enums/smtp-encryption';
81
81
  export { AppwriteMigrationResource } from './enums/appwrite-migration-resource';
82
+ export { OnDuplicate } from './enums/on-duplicate';
82
83
  export { FirebaseMigrationResource } from './enums/firebase-migration-resource';
83
84
  export { NHostMigrationResource } from './enums/n-host-migration-resource';
84
85
  export { SupabaseMigrationResource } from './enums/supabase-migration-resource';
85
86
  export { Addon } from './enums/addon';
86
- export { MethodId } from './enums/method-id';
87
- export { PolicyId } from './enums/policy-id';
87
+ export { AuthMethod } from './enums/auth-method';
88
+ export { ProjectPolicy } from './enums/project-policy';
88
89
  export { ProtocolId } from './enums/protocol-id';
89
90
  export { ServiceId } from './enums/service-id';
90
91
  export { Secure } from './enums/secure';
package/types/models.d.ts CHANGED
@@ -854,7 +854,7 @@ export declare namespace Models {
854
854
  /**
855
855
  * Collection attributes.
856
856
  */
857
- attributes: (Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeVarchar | Models.AttributeText | Models.AttributeMediumtext | Models.AttributeLongtext | Models.AttributeString)[];
857
+ attributes: (Models.AttributeBoolean | Models.AttributeBigint | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeVarchar | Models.AttributeText | Models.AttributeMediumtext | Models.AttributeLongtext | Models.AttributeString)[];
858
858
  /**
859
859
  * Collection indexes.
860
860
  */
@@ -879,7 +879,7 @@ export declare namespace Models {
879
879
  /**
880
880
  * List of attributes.
881
881
  */
882
- attributes: (Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeVarchar | Models.AttributeText | Models.AttributeMediumtext | Models.AttributeLongtext | Models.AttributeString)[];
882
+ attributes: (Models.AttributeBoolean | Models.AttributeBigint | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeVarchar | Models.AttributeText | Models.AttributeMediumtext | Models.AttributeLongtext | Models.AttributeString)[];
883
883
  };
884
884
  /**
885
885
  * AttributeString
@@ -979,6 +979,55 @@ export declare namespace Models {
979
979
  */
980
980
  default?: number;
981
981
  };
982
+ /**
983
+ * AttributeBigInt
984
+ */
985
+ export type AttributeBigint = {
986
+ /**
987
+ * Attribute Key.
988
+ */
989
+ key: string;
990
+ /**
991
+ * Attribute type.
992
+ */
993
+ type: string;
994
+ /**
995
+ * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
996
+ */
997
+ status: AttributeStatus;
998
+ /**
999
+ * Error message. Displays error generated on failure of creating or deleting an attribute.
1000
+ */
1001
+ error: string;
1002
+ /**
1003
+ * Is attribute required?
1004
+ */
1005
+ required: boolean;
1006
+ /**
1007
+ * Is attribute an array?
1008
+ */
1009
+ array?: boolean;
1010
+ /**
1011
+ * Attribute creation date in ISO 8601 format.
1012
+ */
1013
+ $createdAt: string;
1014
+ /**
1015
+ * Attribute update date in ISO 8601 format.
1016
+ */
1017
+ $updatedAt: string;
1018
+ /**
1019
+ * Minimum value to enforce for new documents.
1020
+ */
1021
+ min?: number | bigint;
1022
+ /**
1023
+ * Maximum value to enforce for new documents.
1024
+ */
1025
+ max?: number | bigint;
1026
+ /**
1027
+ * Default value for attribute when not provided. Cannot be set when attribute is required.
1028
+ */
1029
+ default?: number | bigint;
1030
+ };
982
1031
  /**
983
1032
  * AttributeFloat
984
1033
  */
@@ -1995,7 +2044,7 @@ export declare namespace Models {
1995
2044
  /**
1996
2045
  * Table columns.
1997
2046
  */
1998
- columns: (Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnVarchar | Models.ColumnText | Models.ColumnMediumtext | Models.ColumnLongtext | Models.ColumnString)[];
2047
+ columns: (Models.ColumnBoolean | Models.ColumnBigint | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnVarchar | Models.ColumnText | Models.ColumnMediumtext | Models.ColumnLongtext | Models.ColumnString)[];
1999
2048
  /**
2000
2049
  * Table indexes.
2001
2050
  */
@@ -2020,7 +2069,7 @@ export declare namespace Models {
2020
2069
  /**
2021
2070
  * List of columns.
2022
2071
  */
2023
- columns: (Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnVarchar | Models.ColumnText | Models.ColumnMediumtext | Models.ColumnLongtext | Models.ColumnString)[];
2072
+ columns: (Models.ColumnBoolean | Models.ColumnBigint | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnVarchar | Models.ColumnText | Models.ColumnMediumtext | Models.ColumnLongtext | Models.ColumnString)[];
2024
2073
  };
2025
2074
  /**
2026
2075
  * ColumnString
@@ -2120,6 +2169,55 @@ export declare namespace Models {
2120
2169
  */
2121
2170
  default?: number;
2122
2171
  };
2172
+ /**
2173
+ * ColumnBigInt
2174
+ */
2175
+ export type ColumnBigint = {
2176
+ /**
2177
+ * Column Key.
2178
+ */
2179
+ key: string;
2180
+ /**
2181
+ * Column type.
2182
+ */
2183
+ type: string;
2184
+ /**
2185
+ * Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
2186
+ */
2187
+ status: ColumnStatus;
2188
+ /**
2189
+ * Error message. Displays error generated on failure of creating or deleting an column.
2190
+ */
2191
+ error: string;
2192
+ /**
2193
+ * Is column required?
2194
+ */
2195
+ required: boolean;
2196
+ /**
2197
+ * Is column an array?
2198
+ */
2199
+ array?: boolean;
2200
+ /**
2201
+ * Column creation date in ISO 8601 format.
2202
+ */
2203
+ $createdAt: string;
2204
+ /**
2205
+ * Column update date in ISO 8601 format.
2206
+ */
2207
+ $updatedAt: string;
2208
+ /**
2209
+ * Minimum value to enforce for new documents.
2210
+ */
2211
+ min?: number | bigint;
2212
+ /**
2213
+ * Maximum value to enforce for new documents.
2214
+ */
2215
+ max?: number | bigint;
2216
+ /**
2217
+ * Default value for column when not provided. Cannot be set when column is required.
2218
+ */
2219
+ default?: number | bigint;
2220
+ };
2123
2221
  /**
2124
2222
  * ColumnFloat
2125
2223
  */
@@ -6096,11 +6194,11 @@ export declare namespace Models {
6096
6194
  /**
6097
6195
  * OpenID Connect token endpoint URL.
6098
6196
  */
6099
- tokenUrl: string;
6197
+ tokenURL: string;
6100
6198
  /**
6101
6199
  * OpenID Connect user info endpoint URL.
6102
6200
  */
6103
- userInfoUrl: string;
6201
+ userInfoURL: string;
6104
6202
  };
6105
6203
  /**
6106
6204
  * OAuth2Okta
@@ -7895,7 +7993,7 @@ export declare namespace Models {
7895
7993
  */
7896
7994
  deploymentResourceType?: ProxyRuleDeploymentResourceType;
7897
7995
  /**
7898
- * ID deployment's resource. Used if type is "deployment"
7996
+ * ID of deployment's resource (site or function ID). Used if type is "deployment"
7899
7997
  */
7900
7998
  deploymentResourceId: string;
7901
7999
  /**
@@ -7903,7 +8001,7 @@ export declare namespace Models {
7903
8001
  */
7904
8002
  deploymentVcsProviderBranch: string;
7905
8003
  /**
7906
- * Domain verification status. Possible values are "created", "verifying", "verified" and "unverified"
8004
+ * Domain verification status. Possible values are "unverified", "verifying", "verified"
7907
8005
  */
7908
8006
  status: ProxyRuleStatus;
7909
8007
  /**
@@ -8956,7 +9054,7 @@ export declare namespace Models {
8956
9054
  */
8957
9055
  size: number;
8958
9056
  /**
8959
- * The status of the archive creation. Possible values: pending, processing, uploading, completed, failed.
9057
+ * The status of the archive creation. Possible values: pending, processing, uploading, completed, failed, skipped.
8960
9058
  */
8961
9059
  status: string;
8962
9060
  /**
@@ -454,6 +454,92 @@ export declare class Databases {
454
454
  * @deprecated Use the object parameter style method for a better developer experience.
455
455
  */
456
456
  listAttributes(databaseId: string, collectionId: string, queries?: string[], total?: boolean): Promise<Models.AttributeList>;
457
+ /**
458
+ * Create a bigint attribute. Optionally, minimum and maximum values can be provided.
459
+ *
460
+ *
461
+ * @param {string} params.databaseId - Database ID.
462
+ * @param {string} params.collectionId - Collection ID.
463
+ * @param {string} params.key - Attribute Key.
464
+ * @param {boolean} params.required - Is attribute required?
465
+ * @param {number | bigint} params.min - Minimum value
466
+ * @param {number | bigint} params.max - Maximum value
467
+ * @param {number | bigint} params.xdefault - Default value. Cannot be set when attribute is required.
468
+ * @param {boolean} params.array - Is attribute an array?
469
+ * @throws {AppwriteException}
470
+ * @returns {Promise<Models.AttributeBigint>}
471
+ * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createBigIntColumn` instead.
472
+ */
473
+ createBigIntAttribute(params: {
474
+ databaseId: string;
475
+ collectionId: string;
476
+ key: string;
477
+ required: boolean;
478
+ min?: number | bigint;
479
+ max?: number | bigint;
480
+ xdefault?: number | bigint;
481
+ array?: boolean;
482
+ }): Promise<Models.AttributeBigint>;
483
+ /**
484
+ * Create a bigint attribute. Optionally, minimum and maximum values can be provided.
485
+ *
486
+ *
487
+ * @param {string} databaseId - Database ID.
488
+ * @param {string} collectionId - Collection ID.
489
+ * @param {string} key - Attribute Key.
490
+ * @param {boolean} required - Is attribute required?
491
+ * @param {number | bigint} min - Minimum value
492
+ * @param {number | bigint} max - Maximum value
493
+ * @param {number | bigint} xdefault - Default value. Cannot be set when attribute is required.
494
+ * @param {boolean} array - Is attribute an array?
495
+ * @throws {AppwriteException}
496
+ * @returns {Promise<Models.AttributeBigint>}
497
+ * @deprecated Use the object parameter style method for a better developer experience.
498
+ */
499
+ createBigIntAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean): Promise<Models.AttributeBigint>;
500
+ /**
501
+ * Update a bigint attribute. Changing the `default` value will not update already existing documents.
502
+ *
503
+ *
504
+ * @param {string} params.databaseId - Database ID.
505
+ * @param {string} params.collectionId - Collection ID.
506
+ * @param {string} params.key - Attribute Key.
507
+ * @param {boolean} params.required - Is attribute required?
508
+ * @param {number | bigint} params.xdefault - Default value. Cannot be set when attribute is required.
509
+ * @param {number | bigint} params.min - Minimum value
510
+ * @param {number | bigint} params.max - Maximum value
511
+ * @param {string} params.newKey - New Attribute Key.
512
+ * @throws {AppwriteException}
513
+ * @returns {Promise<Models.AttributeBigint>}
514
+ * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateBigIntColumn` instead.
515
+ */
516
+ updateBigIntAttribute(params: {
517
+ databaseId: string;
518
+ collectionId: string;
519
+ key: string;
520
+ required: boolean;
521
+ xdefault?: number | bigint;
522
+ min?: number | bigint;
523
+ max?: number | bigint;
524
+ newKey?: string;
525
+ }): Promise<Models.AttributeBigint>;
526
+ /**
527
+ * Update a bigint attribute. Changing the `default` value will not update already existing documents.
528
+ *
529
+ *
530
+ * @param {string} databaseId - Database ID.
531
+ * @param {string} collectionId - Collection ID.
532
+ * @param {string} key - Attribute Key.
533
+ * @param {boolean} required - Is attribute required?
534
+ * @param {number | bigint} xdefault - Default value. Cannot be set when attribute is required.
535
+ * @param {number | bigint} min - Minimum value
536
+ * @param {number | bigint} max - Maximum value
537
+ * @param {string} newKey - New Attribute Key.
538
+ * @throws {AppwriteException}
539
+ * @returns {Promise<Models.AttributeBigint>}
540
+ * @deprecated Use the object parameter style method for a better developer experience.
541
+ */
542
+ updateBigIntAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string): Promise<Models.AttributeBigint>;
457
543
  /**
458
544
  * Create a boolean attribute.
459
545
  *
@@ -721,25 +721,32 @@ export declare class Functions {
721
721
  * Get a list of all variables of a specific function.
722
722
  *
723
723
  * @param {string} params.functionId - Function unique ID.
724
+ * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, resourceType, resourceId, secret
725
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
724
726
  * @throws {AppwriteException}
725
727
  * @returns {Promise<Models.VariableList>}
726
728
  */
727
729
  listVariables(params: {
728
730
  functionId: string;
731
+ queries?: string[];
732
+ total?: boolean;
729
733
  }): Promise<Models.VariableList>;
730
734
  /**
731
735
  * Get a list of all variables of a specific function.
732
736
  *
733
737
  * @param {string} functionId - Function unique ID.
738
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, resourceType, resourceId, secret
739
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
734
740
  * @throws {AppwriteException}
735
741
  * @returns {Promise<Models.VariableList>}
736
742
  * @deprecated Use the object parameter style method for a better developer experience.
737
743
  */
738
- listVariables(functionId: string): Promise<Models.VariableList>;
744
+ listVariables(functionId: string, queries?: string[], total?: boolean): Promise<Models.VariableList>;
739
745
  /**
740
746
  * Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.
741
747
  *
742
748
  * @param {string} params.functionId - Function unique ID.
749
+ * @param {string} params.variableId - Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
743
750
  * @param {string} params.key - Variable key. Max length: 255 chars.
744
751
  * @param {string} params.value - Variable value. Max length: 8192 chars.
745
752
  * @param {boolean} params.secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime.
@@ -748,6 +755,7 @@ export declare class Functions {
748
755
  */
749
756
  createVariable(params: {
750
757
  functionId: string;
758
+ variableId: string;
751
759
  key: string;
752
760
  value: string;
753
761
  secret?: boolean;
@@ -756,6 +764,7 @@ export declare class Functions {
756
764
  * Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.
757
765
  *
758
766
  * @param {string} functionId - Function unique ID.
767
+ * @param {string} variableId - Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
759
768
  * @param {string} key - Variable key. Max length: 255 chars.
760
769
  * @param {string} value - Variable value. Max length: 8192 chars.
761
770
  * @param {boolean} secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime.
@@ -763,7 +772,7 @@ export declare class Functions {
763
772
  * @returns {Promise<Models.Variable>}
764
773
  * @deprecated Use the object parameter style method for a better developer experience.
765
774
  */
766
- createVariable(functionId: string, key: string, value: string, secret?: boolean): Promise<Models.Variable>;
775
+ createVariable(functionId: string, variableId: string, key: string, value: string, secret?: boolean): Promise<Models.Variable>;
767
776
  /**
768
777
  * Get a variable by its unique ID.
769
778
  *
@@ -800,7 +809,7 @@ export declare class Functions {
800
809
  updateVariable(params: {
801
810
  functionId: string;
802
811
  variableId: string;
803
- key: string;
812
+ key?: string;
804
813
  value?: string;
805
814
  secret?: boolean;
806
815
  }): Promise<Models.Variable>;
@@ -816,7 +825,7 @@ export declare class Functions {
816
825
  * @returns {Promise<Models.Variable>}
817
826
  * @deprecated Use the object parameter style method for a better developer experience.
818
827
  */
819
- updateVariable(functionId: string, variableId: string, key: string, value?: string, secret?: boolean): Promise<Models.Variable>;
828
+ updateVariable(functionId: string, variableId: string, key?: string, value?: string, secret?: boolean): Promise<Models.Variable>;
820
829
  /**
821
830
  * Delete a variable by its unique ID.
822
831
  *
@@ -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
  *