@appwrite.io/console 8.0.0 → 8.1.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.
Files changed (124) hide show
  1. package/.github/workflows/publish.yml +1 -1
  2. package/CHANGELOG.md +8 -0
  3. package/README.md +1 -1
  4. package/dist/cjs/sdk.js +12 -1
  5. package/package.json +1 -1
  6. package/src/client.ts +13 -1
  7. package/src/models.ts +122 -0
  8. package/src/services/vcs.ts +10 -10
  9. package/dist/cjs/sdk.js.map +0 -1
  10. package/dist/esm/sdk.js +0 -29694
  11. package/dist/esm/sdk.js.map +0 -1
  12. package/dist/iife/sdk.js +0 -33504
  13. package/types/channel.d.ts +0 -74
  14. package/types/client.d.ts +0 -293
  15. package/types/enums/adapter.d.ts +0 -4
  16. package/types/enums/api-service.d.ts +0 -15
  17. package/types/enums/api.d.ts +0 -5
  18. package/types/enums/appwrite-migration-resource.d.ts +0 -27
  19. package/types/enums/attribute-status.d.ts +0 -7
  20. package/types/enums/auth-method.d.ts +0 -9
  21. package/types/enums/authentication-factor.d.ts +0 -6
  22. package/types/enums/authenticator-type.d.ts +0 -3
  23. package/types/enums/backup-services.d.ts +0 -8
  24. package/types/enums/billing-plan-group.d.ts +0 -5
  25. package/types/enums/browser-permission.d.ts +0 -22
  26. package/types/enums/browser.d.ts +0 -16
  27. package/types/enums/build-runtime.d.ts +0 -88
  28. package/types/enums/column-status.d.ts +0 -7
  29. package/types/enums/compression.d.ts +0 -5
  30. package/types/enums/console-resource-type.d.ts +0 -3
  31. package/types/enums/credit-card.d.ts +0 -19
  32. package/types/enums/database-type.d.ts +0 -6
  33. package/types/enums/databases-index-type.d.ts +0 -6
  34. package/types/enums/deployment-download-type.d.ts +0 -4
  35. package/types/enums/deployment-status.d.ts +0 -8
  36. package/types/enums/domain-purchase-status.d.ts +0 -6
  37. package/types/enums/domain-transfer-status-enum.d.ts +0 -10
  38. package/types/enums/email-template-locale.d.ts +0 -133
  39. package/types/enums/email-template-type.d.ts +0 -9
  40. package/types/enums/execution-method.d.ts +0 -9
  41. package/types/enums/execution-status.d.ts +0 -7
  42. package/types/enums/execution-trigger.d.ts +0 -5
  43. package/types/enums/filter-type.d.ts +0 -4
  44. package/types/enums/firebase-migration-resource.d.ts +0 -12
  45. package/types/enums/flag.d.ts +0 -197
  46. package/types/enums/framework.d.ts +0 -17
  47. package/types/enums/frameworks.d.ts +0 -17
  48. package/types/enums/health-antivirus-status.d.ts +0 -5
  49. package/types/enums/health-check-status.d.ts +0 -4
  50. package/types/enums/image-format.d.ts +0 -9
  51. package/types/enums/image-gravity.d.ts +0 -11
  52. package/types/enums/index-status.d.ts +0 -7
  53. package/types/enums/message-priority.d.ts +0 -4
  54. package/types/enums/message-status.d.ts +0 -7
  55. package/types/enums/messaging-provider-type.d.ts +0 -5
  56. package/types/enums/n-host-migration-resource.d.ts +0 -13
  57. package/types/enums/name.d.ts +0 -15
  58. package/types/enums/o-auth-provider.d.ts +0 -41
  59. package/types/enums/order-by.d.ts +0 -4
  60. package/types/enums/password-hash.d.ts +0 -13
  61. package/types/enums/platform-type.d.ts +0 -17
  62. package/types/enums/platform.d.ts +0 -4
  63. package/types/enums/project-usage-range.d.ts +0 -4
  64. package/types/enums/proxy-resource-type.d.ts +0 -4
  65. package/types/enums/proxy-rule-deployment-resource-type.d.ts +0 -4
  66. package/types/enums/proxy-rule-status.d.ts +0 -6
  67. package/types/enums/region.d.ts +0 -8
  68. package/types/enums/registration-type.d.ts +0 -6
  69. package/types/enums/relation-mutate.d.ts +0 -5
  70. package/types/enums/relationship-type.d.ts +0 -6
  71. package/types/enums/resource-type.d.ts +0 -6
  72. package/types/enums/runtime.d.ts +0 -88
  73. package/types/enums/runtimes.d.ts +0 -88
  74. package/types/enums/scopes.d.ts +0 -81
  75. package/types/enums/sms-template-locale.d.ts +0 -133
  76. package/types/enums/sms-template-type.d.ts +0 -6
  77. package/types/enums/smtp-encryption.d.ts +0 -5
  78. package/types/enums/smtp-secure.d.ts +0 -4
  79. package/types/enums/status-code.d.ts +0 -6
  80. package/types/enums/status.d.ts +0 -3
  81. package/types/enums/supabase-migration-resource.d.ts +0 -13
  82. package/types/enums/tables-db-index-type.d.ts +0 -6
  83. package/types/enums/template-reference-type.d.ts +0 -5
  84. package/types/enums/theme.d.ts +0 -4
  85. package/types/enums/timezone.d.ts +0 -421
  86. package/types/enums/usage-range.d.ts +0 -5
  87. package/types/enums/use-cases.d.ts +0 -16
  88. package/types/enums/vcs-detection-type.d.ts +0 -4
  89. package/types/enums/vcs-reference-type.d.ts +0 -5
  90. package/types/id.d.ts +0 -20
  91. package/types/index.d.ts +0 -118
  92. package/types/models.d.ts +0 -9120
  93. package/types/operator.d.ts +0 -180
  94. package/types/permission.d.ts +0 -43
  95. package/types/query.d.ts +0 -442
  96. package/types/role.d.ts +0 -70
  97. package/types/service.d.ts +0 -11
  98. package/types/services/account.d.ts +0 -1536
  99. package/types/services/activities.d.ts +0 -46
  100. package/types/services/assistant.d.ts +0 -24
  101. package/types/services/avatars.d.ts +0 -320
  102. package/types/services/backups.d.ts +0 -277
  103. package/types/services/console.d.ts +0 -248
  104. package/types/services/databases.d.ts +0 -2435
  105. package/types/services/domains.d.ts +0 -1527
  106. package/types/services/functions.d.ts +0 -842
  107. package/types/services/graphql.d.ts +0 -43
  108. package/types/services/health.d.ts +0 -475
  109. package/types/services/locale.d.ts +0 -64
  110. package/types/services/messaging.d.ts +0 -1989
  111. package/types/services/migrations.d.ts +0 -417
  112. package/types/services/organizations.d.ts +0 -1009
  113. package/types/services/project.d.ts +0 -148
  114. package/types/services/projects.d.ts +0 -1626
  115. package/types/services/proxy.d.ts +0 -190
  116. package/types/services/realtime.d.ts +0 -134
  117. package/types/services/sites.d.ts +0 -800
  118. package/types/services/storage.d.ts +0 -467
  119. package/types/services/tables-db.d.ts +0 -2352
  120. package/types/services/teams.d.ts +0 -366
  121. package/types/services/tokens.d.ts +0 -119
  122. package/types/services/users.d.ts +0 -1208
  123. package/types/services/vcs.d.ts +0 -252
  124. package/types/services/webhooks.d.ts +0 -165
@@ -36,7 +36,7 @@ jobs:
36
36
 
37
37
  - name: Install dependencies and build
38
38
  run: |
39
- npm install
39
+ npm ci
40
40
  npm run build
41
41
 
42
42
  - name: Publish
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Change Log
2
2
 
3
+ ## 8.1.0
4
+
5
+ * Added: Added `getHeaders()` method to `Client` to expose current request headers
6
+ * Added: Added `ProviderRepositoryRuntime` and `ProviderRepositoryRuntimeList` models
7
+ * Updated: `createRepositoryDetection()` return type now includes `DetectionRuntime`
8
+ * Updated: `listRepositories()` return type now includes `ProviderRepositoryRuntimeList`
9
+ * Added: Added `package-lock.json` to track dependency lockfile in version control
10
+
3
11
  ## 8.0.0
4
12
 
5
13
  * [BREAKING] Changed `$sequence` type from `number` to `string` for `Row` and `Document` models
package/README.md CHANGED
@@ -33,7 +33,7 @@ import { Client, Account } from "@appwrite.io/console";
33
33
  To install with a CDN (content delivery network) add the following scripts to the bottom of your <body> tag, but before you use any Appwrite services:
34
34
 
35
35
  ```html
36
- <script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@8.0.0"></script>
36
+ <script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@8.1.0"></script>
37
37
  ```
38
38
 
39
39
 
package/dist/cjs/sdk.js CHANGED
@@ -580,7 +580,7 @@ class Client {
580
580
  'x-sdk-name': 'Console',
581
581
  'x-sdk-platform': 'console',
582
582
  'x-sdk-language': 'web',
583
- 'x-sdk-version': '8.0.0',
583
+ 'x-sdk-version': '8.1.0',
584
584
  'X-Appwrite-Response-Format': '1.9.0',
585
585
  };
586
586
  this.realtime = {
@@ -783,6 +783,17 @@ class Client {
783
783
  }
784
784
  };
785
785
  }
786
+ /**
787
+ * Get Headers
788
+ *
789
+ * Returns a copy of the current request headers, including any
790
+ * authentication headers. Handle with care.
791
+ *
792
+ * @returns {Headers}
793
+ */
794
+ getHeaders() {
795
+ return Object.assign({}, this.headers);
796
+ }
786
797
  /**
787
798
  * Set Endpoint
788
799
  *
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": "8.0.0",
5
+ "version": "8.1.0",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "dist/cjs/sdk.js",
8
8
  "exports": {
package/src/client.ts CHANGED
@@ -406,10 +406,22 @@ class Client {
406
406
  'x-sdk-name': 'Console',
407
407
  'x-sdk-platform': 'console',
408
408
  'x-sdk-language': 'web',
409
- 'x-sdk-version': '8.0.0',
409
+ 'x-sdk-version': '8.1.0',
410
410
  'X-Appwrite-Response-Format': '1.9.0',
411
411
  };
412
412
 
413
+ /**
414
+ * Get Headers
415
+ *
416
+ * Returns a copy of the current request headers, including any
417
+ * authentication headers. Handle with care.
418
+ *
419
+ * @returns {Headers}
420
+ */
421
+ getHeaders(): Headers {
422
+ return { ...this.headers };
423
+ }
424
+
413
425
  /**
414
426
  * Set Endpoint
415
427
  *
package/src/models.ts CHANGED
@@ -330,6 +330,20 @@ export namespace Models {
330
330
  frameworkProviderRepositories: ProviderRepositoryFramework[];
331
331
  }
332
332
 
333
+ /**
334
+ * Runtime Provider Repositories List
335
+ */
336
+ export type ProviderRepositoryRuntimeList = {
337
+ /**
338
+ * Total number of runtimeProviderRepositories that matched your query.
339
+ */
340
+ total: number;
341
+ /**
342
+ * List of runtimeProviderRepositories.
343
+ */
344
+ runtimeProviderRepositories: ProviderRepositoryRuntime[];
345
+ }
346
+
333
347
  /**
334
348
  * Branches List
335
349
  */
@@ -4099,6 +4113,56 @@ export namespace Models {
4099
4113
  framework: string;
4100
4114
  }
4101
4115
 
4116
+ /**
4117
+ * ProviderRepositoryRuntime
4118
+ */
4119
+ export type ProviderRepositoryRuntime = {
4120
+ /**
4121
+ * VCS (Version Control System) repository ID.
4122
+ */
4123
+ id: string;
4124
+ /**
4125
+ * VCS (Version Control System) repository name.
4126
+ */
4127
+ name: string;
4128
+ /**
4129
+ * VCS (Version Control System) organization name
4130
+ */
4131
+ organization: string;
4132
+ /**
4133
+ * VCS (Version Control System) provider name.
4134
+ */
4135
+ provider: string;
4136
+ /**
4137
+ * Is VCS (Version Control System) repository private?
4138
+ */
4139
+ private: boolean;
4140
+ /**
4141
+ * VCS (Version Control System) repository's default branch name.
4142
+ */
4143
+ defaultBranch: string;
4144
+ /**
4145
+ * VCS (Version Control System) installation ID.
4146
+ */
4147
+ providerInstallationId: string;
4148
+ /**
4149
+ * Is VCS (Version Control System) repository authorized for the installation?
4150
+ */
4151
+ authorized: boolean;
4152
+ /**
4153
+ * Last commit date in ISO 8601 format.
4154
+ */
4155
+ pushedAt: string;
4156
+ /**
4157
+ * Environment variables found in .env files
4158
+ */
4159
+ variables: string[];
4160
+ /**
4161
+ * Auto-detected runtime. Empty if type is not "runtime".
4162
+ */
4163
+ runtime: string;
4164
+ }
4165
+
4102
4166
  /**
4103
4167
  * DetectionFramework
4104
4168
  */
@@ -4125,6 +4189,28 @@ export namespace Models {
4125
4189
  outputDirectory: string;
4126
4190
  }
4127
4191
 
4192
+ /**
4193
+ * DetectionRuntime
4194
+ */
4195
+ export type DetectionRuntime = {
4196
+ /**
4197
+ * Environment variables found in .env files
4198
+ */
4199
+ variables?: DetectionVariable[];
4200
+ /**
4201
+ * Runtime
4202
+ */
4203
+ runtime: string;
4204
+ /**
4205
+ * Function Entrypoint
4206
+ */
4207
+ entrypoint: string;
4208
+ /**
4209
+ * Function install and build commands
4210
+ */
4211
+ commands: string;
4212
+ }
4213
+
4128
4214
  /**
4129
4215
  * DetectionVariable
4130
4216
  */
@@ -8667,6 +8753,30 @@ export namespace Models {
8667
8753
  * Aggregated stats for each projects.
8668
8754
  */
8669
8755
  projects: UsageOrganizationProject[];
8756
+ /**
8757
+ * Aggregated stats for realtime connections.
8758
+ */
8759
+ realtimeConnections: Metric[];
8760
+ /**
8761
+ * Aggregated stats for total realtime connections.
8762
+ */
8763
+ realtimeConnectionsTotal: number;
8764
+ /**
8765
+ * Aggregated stats for realtime messages.
8766
+ */
8767
+ realtimeMessages: Metric[];
8768
+ /**
8769
+ * Aggregated stats for total realtime messages.
8770
+ */
8771
+ realtimeMessagesTotal: number;
8772
+ /**
8773
+ * Aggregated stats for realtime bandwidth.
8774
+ */
8775
+ realtimeBandwidth: Metric[];
8776
+ /**
8777
+ * Aggregated stats for total realtime bandwidth.
8778
+ */
8779
+ realtimeBandwidthTotal: number;
8670
8780
  }
8671
8781
 
8672
8782
  /**
@@ -8745,6 +8855,18 @@ export namespace Models {
8745
8855
  * Aggregated stats for imagine credits.
8746
8856
  */
8747
8857
  imagineCredits: number;
8858
+ /**
8859
+ * Aggregated stats for realtime connections.
8860
+ */
8861
+ realtimeConnections: number;
8862
+ /**
8863
+ * Aggregated stats for realtime messages.
8864
+ */
8865
+ realtimeMessages: number;
8866
+ /**
8867
+ * Aggregated stats for realtime bandwidth.
8868
+ */
8869
+ realtimeBandwidth: number;
8748
8870
  }
8749
8871
 
8750
8872
  /**
@@ -19,9 +19,9 @@ export class Vcs {
19
19
  * @param {VCSDetectionType} params.type - Detector type. Must be one of the following: runtime, framework
20
20
  * @param {string} params.providerRootDirectory - Path to Root Directory
21
21
  * @throws {AppwriteException}
22
- * @returns {Promise<Models.DetectionFramework>}
22
+ * @returns {Promise<Models.DetectionRuntime | Models.DetectionFramework>}
23
23
  */
24
- createRepositoryDetection(params: { installationId: string, providerRepositoryId: string, type: VCSDetectionType, providerRootDirectory?: string }): Promise<Models.DetectionFramework>;
24
+ createRepositoryDetection(params: { installationId: string, providerRepositoryId: string, type: VCSDetectionType, providerRootDirectory?: string }): Promise<Models.DetectionRuntime | Models.DetectionFramework>;
25
25
  /**
26
26
  * Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository's files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.
27
27
  *
@@ -30,14 +30,14 @@ export class Vcs {
30
30
  * @param {VCSDetectionType} type - Detector type. Must be one of the following: runtime, framework
31
31
  * @param {string} providerRootDirectory - Path to Root Directory
32
32
  * @throws {AppwriteException}
33
- * @returns {Promise<Models.DetectionFramework>}
33
+ * @returns {Promise<Models.DetectionRuntime | Models.DetectionFramework>}
34
34
  * @deprecated Use the object parameter style method for a better developer experience.
35
35
  */
36
- createRepositoryDetection(installationId: string, providerRepositoryId: string, type: VCSDetectionType, providerRootDirectory?: string): Promise<Models.DetectionFramework>;
36
+ createRepositoryDetection(installationId: string, providerRepositoryId: string, type: VCSDetectionType, providerRootDirectory?: string): Promise<Models.DetectionRuntime | Models.DetectionFramework>;
37
37
  createRepositoryDetection(
38
38
  paramsOrFirst: { installationId: string, providerRepositoryId: string, type: VCSDetectionType, providerRootDirectory?: string } | string,
39
39
  ...rest: [(string)?, (VCSDetectionType)?, (string)?]
40
- ): Promise<Models.DetectionFramework> {
40
+ ): Promise<Models.DetectionRuntime | Models.DetectionFramework> {
41
41
  let params: { installationId: string, providerRepositoryId: string, type: VCSDetectionType, providerRootDirectory?: string };
42
42
 
43
43
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -99,9 +99,9 @@ export class Vcs {
99
99
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
100
100
  * @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). Only supported methods are limit and offset
101
101
  * @throws {AppwriteException}
102
- * @returns {Promise<Models.ProviderRepositoryFrameworkList>}
102
+ * @returns {Promise<Models.ProviderRepositoryRuntimeList | Models.ProviderRepositoryFrameworkList>}
103
103
  */
104
- listRepositories(params: { installationId: string, type: VCSDetectionType, search?: string, queries?: string[] }): Promise<Models.ProviderRepositoryFrameworkList>;
104
+ listRepositories(params: { installationId: string, type: VCSDetectionType, search?: string, queries?: string[] }): Promise<Models.ProviderRepositoryRuntimeList | Models.ProviderRepositoryFrameworkList>;
105
105
  /**
106
106
  * Get a list of GitHub repositories available through your installation. This endpoint returns repositories with their basic information, detected runtime environments, and latest push dates. You can optionally filter repositories using a search term. Each repository's runtime is automatically detected based on its contents and language statistics. The GitHub installation must be properly configured for this endpoint to work.
107
107
  *
@@ -110,14 +110,14 @@ export class Vcs {
110
110
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
111
111
  * @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). Only supported methods are limit and offset
112
112
  * @throws {AppwriteException}
113
- * @returns {Promise<Models.ProviderRepositoryFrameworkList>}
113
+ * @returns {Promise<Models.ProviderRepositoryRuntimeList | Models.ProviderRepositoryFrameworkList>}
114
114
  * @deprecated Use the object parameter style method for a better developer experience.
115
115
  */
116
- listRepositories(installationId: string, type: VCSDetectionType, search?: string, queries?: string[]): Promise<Models.ProviderRepositoryFrameworkList>;
116
+ listRepositories(installationId: string, type: VCSDetectionType, search?: string, queries?: string[]): Promise<Models.ProviderRepositoryRuntimeList | Models.ProviderRepositoryFrameworkList>;
117
117
  listRepositories(
118
118
  paramsOrFirst: { installationId: string, type: VCSDetectionType, search?: string, queries?: string[] } | string,
119
119
  ...rest: [(VCSDetectionType)?, (string)?, (string[])?]
120
- ): Promise<Models.ProviderRepositoryFrameworkList> {
120
+ ): Promise<Models.ProviderRepositoryRuntimeList | Models.ProviderRepositoryFrameworkList> {
121
121
  let params: { installationId: string, type: VCSDetectionType, search?: string, queries?: string[] };
122
122
 
123
123
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {