@appwrite.io/console 2.0.0 → 2.1.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +2 -2
  3. package/dist/cjs/sdk.js +81 -15
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +77 -15
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +3838 -15
  8. package/docs/examples/account/update-payment-method.md +1 -1
  9. package/docs/examples/projects/update-labels.md +14 -0
  10. package/package.json +7 -1
  11. package/rollup.config.js +40 -24
  12. package/src/client.ts +49 -10
  13. package/src/models.ts +432 -424
  14. package/src/query.ts +14 -11
  15. package/src/services/account.ts +20 -20
  16. package/src/services/avatars.ts +117 -117
  17. package/src/services/backups.ts +18 -18
  18. package/src/services/console.ts +24 -24
  19. package/src/services/databases.ts +119 -119
  20. package/src/services/domains.ts +204 -204
  21. package/src/services/functions.ts +30 -30
  22. package/src/services/health.ts +146 -146
  23. package/src/services/messaging.ts +54 -54
  24. package/src/services/migrations.ts +36 -36
  25. package/src/services/organizations.ts +42 -42
  26. package/src/services/projects.ts +146 -83
  27. package/src/services/sites.ts +30 -30
  28. package/src/services/storage.ts +49 -49
  29. package/src/services/tables-db.ts +119 -119
  30. package/src/services/users.ts +39 -39
  31. package/types/client.d.ts +27 -1
  32. package/types/models.d.ts +432 -424
  33. package/types/query.d.ts +8 -8
  34. package/types/services/account.d.ts +11 -11
  35. package/types/services/avatars.d.ts +82 -82
  36. package/types/services/backups.d.ts +8 -8
  37. package/types/services/console.d.ts +14 -14
  38. package/types/services/databases.d.ts +70 -70
  39. package/types/services/domains.d.ts +104 -104
  40. package/types/services/functions.d.ts +15 -15
  41. package/types/services/health.d.ts +72 -72
  42. package/types/services/messaging.d.ts +24 -24
  43. package/types/services/migrations.d.ts +16 -16
  44. package/types/services/organizations.d.ts +22 -22
  45. package/types/services/projects.d.ts +60 -38
  46. package/types/services/sites.d.ts +15 -15
  47. package/types/services/storage.d.ts +34 -34
  48. package/types/services/tables-db.d.ts +70 -70
  49. package/types/services/users.d.ts +24 -24
@@ -82,12 +82,12 @@ export class Organizations {
82
82
  * @param {string[]} params.invites - Additional member invites
83
83
  * @param {string} params.couponId - Coupon id
84
84
  * @param {string} params.taxId - Tax Id associated to billing.
85
- * @param {number} params.budget - Budget limit for additional usage set for the organization
85
+ * @param {number | bigint} params.budget - Budget limit for additional usage set for the organization
86
86
  * @param {Platform} params.platform - Platform type
87
87
  * @throws {AppwriteException}
88
88
  * @returns {Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>}
89
89
  */
90
- create<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform }): Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>;
90
+ create<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number | bigint, platform?: Platform }): Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>;
91
91
  /**
92
92
  * Create a new organization.
93
93
  *
@@ -100,21 +100,21 @@ export class Organizations {
100
100
  * @param {string[]} invites - Additional member invites
101
101
  * @param {string} couponId - Coupon id
102
102
  * @param {string} taxId - Tax Id associated to billing.
103
- * @param {number} budget - Budget limit for additional usage set for the organization
103
+ * @param {number | bigint} budget - Budget limit for additional usage set for the organization
104
104
  * @param {Platform} platform - Platform type
105
105
  * @throws {AppwriteException}
106
106
  * @returns {Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>}
107
107
  * @deprecated Use the object parameter style method for a better developer experience.
108
108
  */
109
- create<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform): Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>;
109
+ create<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number | bigint, platform?: Platform): Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>;
110
110
  create<Preferences extends Models.Preferences = Models.DefaultPreferences>(
111
- paramsOrFirst: { organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform } | string,
112
- ...rest: [(string)?, (string)?, (string)?, (string)?, (string[])?, (string)?, (string)?, (number)?, (Platform)?]
111
+ paramsOrFirst: { organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number | bigint, platform?: Platform } | string,
112
+ ...rest: [(string)?, (string)?, (string)?, (string)?, (string[])?, (string)?, (string)?, (number | bigint)?, (Platform)?]
113
113
  ): Promise<Models.Organization<Preferences> | Models.PaymentAuthentication> {
114
- let params: { organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform };
114
+ let params: { organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number | bigint, platform?: Platform };
115
115
 
116
116
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
117
- params = (paramsOrFirst || {}) as { organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform };
117
+ params = (paramsOrFirst || {}) as { organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number | bigint, platform?: Platform };
118
118
  } else {
119
119
  params = {
120
120
  organizationId: paramsOrFirst as string,
@@ -125,7 +125,7 @@ export class Organizations {
125
125
  invites: rest[4] as string[],
126
126
  couponId: rest[5] as string,
127
127
  taxId: rest[6] as string,
128
- budget: rest[7] as number,
128
+ budget: rest[7] as number | bigint,
129
129
  platform: rest[8] as Platform
130
130
  };
131
131
  }
@@ -397,38 +397,38 @@ export class Organizations {
397
397
  *
398
398
  * @param {string} params.organizationId - Organization ID
399
399
  * @param {string} params.aggregationId - Invoice unique ID
400
- * @param {number} params.limit - Maximum number of project aggregations to return in response. By default will return maximum 5 results. Maximum of 10 results allowed per request.
401
- * @param {number} params.offset - Offset value. The default value is 0. Use this param to manage pagination.
400
+ * @param {number | bigint} params.limit - Maximum number of project aggregations to return in response. By default will return maximum 5 results. Maximum of 10 results allowed per request.
401
+ * @param {number | bigint} params.offset - Offset value. The default value is 0. Use this param to manage pagination.
402
402
  * @throws {AppwriteException}
403
403
  * @returns {Promise<Models.AggregationTeam>}
404
404
  */
405
- getAggregation(params: { organizationId: string, aggregationId: string, limit?: number, offset?: number }): Promise<Models.AggregationTeam>;
405
+ getAggregation(params: { organizationId: string, aggregationId: string, limit?: number | bigint, offset?: number | bigint }): Promise<Models.AggregationTeam>;
406
406
  /**
407
407
  * Get a specific aggregation using it's aggregation ID.
408
408
  *
409
409
  * @param {string} organizationId - Organization ID
410
410
  * @param {string} aggregationId - Invoice unique ID
411
- * @param {number} limit - Maximum number of project aggregations to return in response. By default will return maximum 5 results. Maximum of 10 results allowed per request.
412
- * @param {number} offset - Offset value. The default value is 0. Use this param to manage pagination.
411
+ * @param {number | bigint} limit - Maximum number of project aggregations to return in response. By default will return maximum 5 results. Maximum of 10 results allowed per request.
412
+ * @param {number | bigint} offset - Offset value. The default value is 0. Use this param to manage pagination.
413
413
  * @throws {AppwriteException}
414
414
  * @returns {Promise<Models.AggregationTeam>}
415
415
  * @deprecated Use the object parameter style method for a better developer experience.
416
416
  */
417
- getAggregation(organizationId: string, aggregationId: string, limit?: number, offset?: number): Promise<Models.AggregationTeam>;
417
+ getAggregation(organizationId: string, aggregationId: string, limit?: number | bigint, offset?: number | bigint): Promise<Models.AggregationTeam>;
418
418
  getAggregation(
419
- paramsOrFirst: { organizationId: string, aggregationId: string, limit?: number, offset?: number } | string,
420
- ...rest: [(string)?, (number)?, (number)?]
419
+ paramsOrFirst: { organizationId: string, aggregationId: string, limit?: number | bigint, offset?: number | bigint } | string,
420
+ ...rest: [(string)?, (number | bigint)?, (number | bigint)?]
421
421
  ): Promise<Models.AggregationTeam> {
422
- let params: { organizationId: string, aggregationId: string, limit?: number, offset?: number };
422
+ let params: { organizationId: string, aggregationId: string, limit?: number | bigint, offset?: number | bigint };
423
423
 
424
424
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
425
- params = (paramsOrFirst || {}) as { organizationId: string, aggregationId: string, limit?: number, offset?: number };
425
+ params = (paramsOrFirst || {}) as { organizationId: string, aggregationId: string, limit?: number | bigint, offset?: number | bigint };
426
426
  } else {
427
427
  params = {
428
428
  organizationId: paramsOrFirst as string,
429
429
  aggregationId: rest[0] as string,
430
- limit: rest[1] as number,
431
- offset: rest[2] as number
430
+ limit: rest[1] as number | bigint,
431
+ offset: rest[2] as number | bigint
432
432
  };
433
433
  }
434
434
 
@@ -706,36 +706,36 @@ export class Organizations {
706
706
  * Update the budget limit for an organization.
707
707
  *
708
708
  * @param {string} params.organizationId - Organization Unique ID
709
- * @param {number} params.budget - Budget limit for additional usage set for the organization
710
- * @param {number[]} params.alerts - Budget alert limit percentage
709
+ * @param {number | bigint} params.budget - Budget limit for additional usage set for the organization
710
+ * @param {number | bigint[]} params.alerts - Budget alert limit percentage
711
711
  * @throws {AppwriteException}
712
712
  * @returns {Promise<Models.Organization<Preferences>>}
713
713
  */
714
- updateBudget<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, budget?: number, alerts?: number[] }): Promise<Models.Organization<Preferences>>;
714
+ updateBudget<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, budget?: number | bigint, alerts?: number | bigint[] }): Promise<Models.Organization<Preferences>>;
715
715
  /**
716
716
  * Update the budget limit for an organization.
717
717
  *
718
718
  * @param {string} organizationId - Organization Unique ID
719
- * @param {number} budget - Budget limit for additional usage set for the organization
720
- * @param {number[]} alerts - Budget alert limit percentage
719
+ * @param {number | bigint} budget - Budget limit for additional usage set for the organization
720
+ * @param {number | bigint[]} alerts - Budget alert limit percentage
721
721
  * @throws {AppwriteException}
722
722
  * @returns {Promise<Models.Organization<Preferences>>}
723
723
  * @deprecated Use the object parameter style method for a better developer experience.
724
724
  */
725
- updateBudget<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, budget?: number, alerts?: number[]): Promise<Models.Organization<Preferences>>;
725
+ updateBudget<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, budget?: number | bigint, alerts?: number | bigint[]): Promise<Models.Organization<Preferences>>;
726
726
  updateBudget<Preferences extends Models.Preferences = Models.DefaultPreferences>(
727
- paramsOrFirst: { organizationId: string, budget?: number, alerts?: number[] } | string,
728
- ...rest: [(number)?, (number[])?]
727
+ paramsOrFirst: { organizationId: string, budget?: number | bigint, alerts?: number | bigint[] } | string,
728
+ ...rest: [(number | bigint)?, (number | bigint[])?]
729
729
  ): Promise<Models.Organization<Preferences>> {
730
- let params: { organizationId: string, budget?: number, alerts?: number[] };
730
+ let params: { organizationId: string, budget?: number | bigint, alerts?: number | bigint[] };
731
731
 
732
732
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
733
- params = (paramsOrFirst || {}) as { organizationId: string, budget?: number, alerts?: number[] };
733
+ params = (paramsOrFirst || {}) as { organizationId: string, budget?: number | bigint, alerts?: number | bigint[] };
734
734
  } else {
735
735
  params = {
736
736
  organizationId: paramsOrFirst as string,
737
- budget: rest[0] as number,
738
- alerts: rest[1] as number[]
737
+ budget: rest[0] as number | bigint,
738
+ alerts: rest[1] as number | bigint[]
739
739
  };
740
740
  }
741
741
 
@@ -1948,11 +1948,11 @@ export class Organizations {
1948
1948
  * @param {string[]} params.invites - Additional member invites
1949
1949
  * @param {string} params.couponId - Coupon id
1950
1950
  * @param {string} params.taxId - Tax Id associated to billing.
1951
- * @param {number} params.budget - Budget limit for additional usage set for the organization
1951
+ * @param {number | bigint} params.budget - Budget limit for additional usage set for the organization
1952
1952
  * @throws {AppwriteException}
1953
1953
  * @returns {Promise<Models.Organization<Preferences>>}
1954
1954
  */
1955
- updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number }): Promise<Models.Organization<Preferences>>;
1955
+ updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: { organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number | bigint }): Promise<Models.Organization<Preferences>>;
1956
1956
  /**
1957
1957
  * Update the billing plan for an organization.
1958
1958
  *
@@ -1963,20 +1963,20 @@ export class Organizations {
1963
1963
  * @param {string[]} invites - Additional member invites
1964
1964
  * @param {string} couponId - Coupon id
1965
1965
  * @param {string} taxId - Tax Id associated to billing.
1966
- * @param {number} budget - Budget limit for additional usage set for the organization
1966
+ * @param {number | bigint} budget - Budget limit for additional usage set for the organization
1967
1967
  * @throws {AppwriteException}
1968
1968
  * @returns {Promise<Models.Organization<Preferences>>}
1969
1969
  * @deprecated Use the object parameter style method for a better developer experience.
1970
1970
  */
1971
- updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number): Promise<Models.Organization<Preferences>>;
1971
+ updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number | bigint): Promise<Models.Organization<Preferences>>;
1972
1972
  updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(
1973
- paramsOrFirst: { organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number } | string,
1974
- ...rest: [(string)?, (string)?, (string)?, (string[])?, (string)?, (string)?, (number)?]
1973
+ paramsOrFirst: { organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number | bigint } | string,
1974
+ ...rest: [(string)?, (string)?, (string)?, (string[])?, (string)?, (string)?, (number | bigint)?]
1975
1975
  ): Promise<Models.Organization<Preferences>> {
1976
- let params: { organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number };
1976
+ let params: { organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number | bigint };
1977
1977
 
1978
1978
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1979
- params = (paramsOrFirst || {}) as { organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number };
1979
+ params = (paramsOrFirst || {}) as { organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number | bigint };
1980
1980
  } else {
1981
1981
  params = {
1982
1982
  organizationId: paramsOrFirst as string,
@@ -1986,7 +1986,7 @@ export class Organizations {
1986
1986
  invites: rest[3] as string[],
1987
1987
  couponId: rest[4] as string,
1988
1988
  taxId: rest[5] as string,
1989
- budget: rest[6] as number
1989
+ budget: rest[6] as number | bigint
1990
1990
  };
1991
1991
  }
1992
1992