appbuild-oceanbase-console 1.10.2

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 (105) hide show
  1. package/LICENSE +12 -0
  2. package/README.md +191 -0
  3. package/dist/cjs/package.json +3 -0
  4. package/dist/cjs/sdk.js +27712 -0
  5. package/dist/cjs/sdk.js.map +1 -0
  6. package/dist/esm/package.json +3 -0
  7. package/dist/esm/sdk.js +27675 -0
  8. package/dist/esm/sdk.js.map +1 -0
  9. package/dist/iife/sdk.js +27716 -0
  10. package/package.json +47 -0
  11. package/types/client.d.ts +211 -0
  12. package/types/enums/adapter.d.ts +4 -0
  13. package/types/enums/api-service.d.ts +15 -0
  14. package/types/enums/api.d.ts +5 -0
  15. package/types/enums/attribute-status.d.ts +7 -0
  16. package/types/enums/auth-method.d.ts +9 -0
  17. package/types/enums/authentication-factor.d.ts +6 -0
  18. package/types/enums/authenticator-type.d.ts +3 -0
  19. package/types/enums/billing-plan.d.ts +10 -0
  20. package/types/enums/browser.d.ts +16 -0
  21. package/types/enums/build-runtime.d.ts +66 -0
  22. package/types/enums/column-status.d.ts +7 -0
  23. package/types/enums/compression.d.ts +5 -0
  24. package/types/enums/console-resource-type.d.ts +3 -0
  25. package/types/enums/credit-card.d.ts +19 -0
  26. package/types/enums/database-type.d.ts +4 -0
  27. package/types/enums/deployment-download-type.d.ts +4 -0
  28. package/types/enums/deployment-status.d.ts +7 -0
  29. package/types/enums/email-template-locale.d.ts +133 -0
  30. package/types/enums/email-template-type.d.ts +9 -0
  31. package/types/enums/execution-method.d.ts +9 -0
  32. package/types/enums/execution-status.d.ts +7 -0
  33. package/types/enums/execution-trigger.d.ts +5 -0
  34. package/types/enums/flag.d.ts +197 -0
  35. package/types/enums/framework.d.ts +17 -0
  36. package/types/enums/health-antivirus-status.d.ts +5 -0
  37. package/types/enums/health-check-status.d.ts +4 -0
  38. package/types/enums/image-format.d.ts +9 -0
  39. package/types/enums/image-gravity.d.ts +11 -0
  40. package/types/enums/index-status.d.ts +7 -0
  41. package/types/enums/index-type.d.ts +6 -0
  42. package/types/enums/message-priority.d.ts +4 -0
  43. package/types/enums/message-status.d.ts +7 -0
  44. package/types/enums/messaging-provider-type.d.ts +5 -0
  45. package/types/enums/name.d.ts +14 -0
  46. package/types/enums/o-auth-provider.d.ts +43 -0
  47. package/types/enums/output.d.ts +9 -0
  48. package/types/enums/password-hash.d.ts +13 -0
  49. package/types/enums/platform-type.d.ts +17 -0
  50. package/types/enums/platform.d.ts +4 -0
  51. package/types/enums/project-usage-range.d.ts +4 -0
  52. package/types/enums/proxy-resource-type.d.ts +4 -0
  53. package/types/enums/proxy-rule-deployment-resource-type.d.ts +4 -0
  54. package/types/enums/proxy-rule-status.d.ts +6 -0
  55. package/types/enums/region.d.ts +8 -0
  56. package/types/enums/relation-mutate.d.ts +5 -0
  57. package/types/enums/relationship-type.d.ts +6 -0
  58. package/types/enums/runtime.d.ts +66 -0
  59. package/types/enums/sms-template-locale.d.ts +133 -0
  60. package/types/enums/sms-template-type.d.ts +6 -0
  61. package/types/enums/smtp-encryption.d.ts +5 -0
  62. package/types/enums/smtp-secure.d.ts +4 -0
  63. package/types/enums/status-code.d.ts +6 -0
  64. package/types/enums/status.d.ts +4 -0
  65. package/types/enums/theme.d.ts +4 -0
  66. package/types/enums/timezone.d.ts +421 -0
  67. package/types/enums/type.d.ts +5 -0
  68. package/types/enums/usage-range.d.ts +5 -0
  69. package/types/enums/vcs-deployment-type.d.ts +5 -0
  70. package/types/enums/vcs-detection-type.d.ts +4 -0
  71. package/types/id.d.ts +20 -0
  72. package/types/index.d.ts +102 -0
  73. package/types/migrations.d.ts +240 -0
  74. package/types/models.d.ts +7945 -0
  75. package/types/operator.d.ts +180 -0
  76. package/types/permission.d.ts +43 -0
  77. package/types/query.d.ts +390 -0
  78. package/types/role.d.ts +70 -0
  79. package/types/sdk.d.ts +108 -0
  80. package/types/service.d.ts +11 -0
  81. package/types/services/account.d.ts +1413 -0
  82. package/types/services/assistant.d.ts +24 -0
  83. package/types/services/avatars.d.ts +319 -0
  84. package/types/services/backups.d.ts +276 -0
  85. package/types/services/console.d.ts +210 -0
  86. package/types/services/databases.d.ts +2119 -0
  87. package/types/services/domains.d.ts +1276 -0
  88. package/types/services/functions.d.ts +827 -0
  89. package/types/services/graphql.d.ts +43 -0
  90. package/types/services/health.d.ts +432 -0
  91. package/types/services/locale.d.ts +64 -0
  92. package/types/services/messaging.d.ts +1989 -0
  93. package/types/services/migrations.d.ts +413 -0
  94. package/types/services/organizations.d.ts +842 -0
  95. package/types/services/project.d.ts +130 -0
  96. package/types/services/projects.d.ts +1663 -0
  97. package/types/services/proxy.d.ts +190 -0
  98. package/types/services/realtime.d.ts +118 -0
  99. package/types/services/sites.d.ts +780 -0
  100. package/types/services/storage.d.ts +467 -0
  101. package/types/services/tables-db.d.ts +2034 -0
  102. package/types/services/teams.d.ts +366 -0
  103. package/types/services/tokens.d.ts +119 -0
  104. package/types/services/users.d.ts +1184 -0
  105. package/types/services/vcs.d.ts +249 -0
package/LICENSE ADDED
@@ -0,0 +1,12 @@
1
+ Copyright (c) 2025 Appwrite (https://appwrite.io) and individual contributors.
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5
+
6
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
+
8
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9
+
10
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11
+
12
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md ADDED
@@ -0,0 +1,191 @@
1
+ # Appwrite Console SDK
2
+
3
+ ![License](https://img.shields.io/github/license/appwrite/sdk-for-console.svg?style=flat-square)
4
+ ![Version](https://img.shields.io/badge/api%20version-1.8.0-blue.svg?style=flat-square)
5
+ [![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
6
+ [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
7
+ [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
8
+
9
+ **This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-console/releases).**
10
+
11
+ Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Console SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
12
+
13
+ ![Appwrite](https://github.com/appwrite/appwrite/raw/main/public/images/github.png)
14
+
15
+ ## Installation
16
+
17
+ ### NPM
18
+
19
+ To install via [NPM](https://www.npmjs.com/):
20
+
21
+ ```bash
22
+ npm install @appwrite.io/console --save
23
+ ```
24
+
25
+ If you're using a bundler (like [Rollup](https://rollupjs.org/) or [webpack](https://webpack.js.org/)), you can import the Appwrite module when you need it:
26
+
27
+ ```js
28
+ import { Client, Account } from "@appwrite.io/console";
29
+ ```
30
+
31
+ ### CDN
32
+
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
+
35
+ ```html
36
+ <script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@1.10.0"></script>
37
+ ```
38
+
39
+
40
+ ## Getting Started
41
+
42
+ ### Add your Web Platform
43
+
44
+ For you to init your SDK and interact with Appwrite services you need to add a web platform to your project. To add a new platform, go to your Appwrite console, choose the project you created in the step before and click the 'Add Platform' button.
45
+
46
+ From the options, choose to add a **Web** platform and add your client app hostname. By adding your hostname to your project platform you are allowing cross-domain communication between your project and the Appwrite API.
47
+
48
+ ### Init your SDK
49
+
50
+ Initialize your SDK with your Appwrite server API endpoint and project ID which can be found in your project settings page.
51
+
52
+ ```js
53
+ // Init your Web SDK
54
+ const client = new Client();
55
+
56
+ client
57
+ .setEndpoint('http://localhost/v1') // Your Appwrite Endpoint
58
+ .setProject('455x34dfkj') // Your project ID
59
+ ;
60
+ ```
61
+
62
+ ### Make Your First Request
63
+
64
+ Once your SDK object is set, access any of the Appwrite services and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the [API References](https://appwrite.io/docs) section.
65
+
66
+ ```js
67
+ const account = new Account(client);
68
+
69
+ // Register User
70
+ account.create(ID.unique(), "email@example.com", "password", "Walter O'Brien")
71
+ .then(function (response) {
72
+ console.log(response);
73
+ }, function (error) {
74
+ console.log(error);
75
+ });
76
+
77
+ ```
78
+
79
+ ### Full Example
80
+
81
+ ```js
82
+ // Init your Web SDK
83
+ const client = new Client();
84
+
85
+ client
86
+ .setEndpoint('http://localhost/v1') // Your Appwrite Endpoint
87
+ .setProject('455x34dfkj')
88
+ ;
89
+
90
+ const account = new Account(client);
91
+
92
+ // Register User
93
+ account.create(ID.unique(), "email@example.com", "password", "Walter O'Brien")
94
+ .then(function (response) {
95
+ console.log(response);
96
+ }, function (error) {
97
+ console.log(error);
98
+ });
99
+ ```
100
+
101
+ ### Type Safety with Models
102
+
103
+ The Appwrite Web SDK provides type safety when working with database documents through generic methods. Methods like `listDocuments`, `getDocument`, and others accept a generic type parameter that allows you to specify your custom model type for full type safety.
104
+
105
+ **TypeScript:**
106
+ ```typescript
107
+ interface Book {
108
+ name: string;
109
+ author: string;
110
+ releaseYear?: string;
111
+ category?: string;
112
+ genre?: string[];
113
+ isCheckedOut: boolean;
114
+ }
115
+
116
+ const databases = new Databases(client);
117
+
118
+ try {
119
+ const documents = await databases.listDocuments<Book>(
120
+ 'your-database-id',
121
+ 'your-collection-id'
122
+ );
123
+
124
+ documents.documents.forEach(book => {
125
+ console.log(`Book: ${book.name} by ${book.author}`); // Now you have full type safety
126
+ });
127
+ } catch (error) {
128
+ console.error('Appwrite error:', error);
129
+ }
130
+ ```
131
+
132
+ **JavaScript (with JSDoc for type hints):**
133
+ ```javascript
134
+ /**
135
+ * @typedef {Object} Book
136
+ * @property {string} name
137
+ * @property {string} author
138
+ * @property {string} [releaseYear]
139
+ * @property {string} [category]
140
+ * @property {string[]} [genre]
141
+ * @property {boolean} isCheckedOut
142
+ */
143
+
144
+ const databases = new Databases(client);
145
+
146
+ try {
147
+ /** @type {Models.DocumentList<Book>} */
148
+ const documents = await databases.listDocuments(
149
+ 'your-database-id',
150
+ 'your-collection-id'
151
+ );
152
+
153
+ documents.documents.forEach(book => {
154
+ console.log(`Book: ${book.name} by ${book.author}`); // Type hints available in IDE
155
+ });
156
+ } catch (error) {
157
+ console.error('Appwrite error:', error);
158
+ }
159
+ ```
160
+
161
+ **Tip**: You can use the `appwrite types` command to automatically generate TypeScript interfaces based on your Appwrite database schema. Learn more about [type generation](https://appwrite.io/docs/products/databases/type-generation).
162
+
163
+ ### Error Handling
164
+
165
+ The Appwrite Web SDK raises an `AppwriteException` object with `message`, `code` and `response` properties. You can handle any errors by catching the exception and present the `message` to the user or handle it yourself based on the provided error information. Below is an example.
166
+
167
+ ```javascript
168
+ try {
169
+ const user = await account.create(ID.unique(), "email@example.com", "password", "Walter O'Brien");
170
+ console.log('User created:', user);
171
+ } catch (error) {
172
+ console.error('Appwrite error:', error.message);
173
+ }
174
+ ```
175
+
176
+ ### Learn more
177
+
178
+ You can use the following resources to learn more and get help
179
+ - 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-web)
180
+ - 📜 [Appwrite Docs](https://appwrite.io/docs)
181
+ - 💬 [Discord Community](https://appwrite.io/discord)
182
+ - 🚂 [Appwrite Web Playground](https://github.com/appwrite/playground-for-web)
183
+
184
+
185
+ ## Contribution
186
+
187
+ This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request.
188
+
189
+ ## License
190
+
191
+ Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }