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
@@ -0,0 +1,190 @@
1
+ import { Client } from '../client';
2
+ import type { Models } from '../models';
3
+ import { StatusCode } from '../enums/status-code';
4
+ import { ProxyResourceType } from '../enums/proxy-resource-type';
5
+ export declare class Proxy {
6
+ client: Client;
7
+ constructor(client: Client);
8
+ /**
9
+ * Get a list of all the proxy rules. You can use the query params to filter your results.
10
+ *
11
+ * @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/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: domain, type, trigger, deploymentResourceType, deploymentResourceId, deploymentId, deploymentVcsProviderBranch
12
+ * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
13
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
14
+ * @throws {AppwriteException}
15
+ * @returns {Promise<Models.ProxyRuleList>}
16
+ */
17
+ listRules(params?: {
18
+ queries?: string[];
19
+ search?: string;
20
+ total?: boolean;
21
+ }): Promise<Models.ProxyRuleList>;
22
+ /**
23
+ * Get a list of all the proxy rules. You can use the query params to filter your results.
24
+ *
25
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: domain, type, trigger, deploymentResourceType, deploymentResourceId, deploymentId, deploymentVcsProviderBranch
26
+ * @param {string} search - Search term to filter your list results. Max length: 256 chars.
27
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
28
+ * @throws {AppwriteException}
29
+ * @returns {Promise<Models.ProxyRuleList>}
30
+ * @deprecated Use the object parameter style method for a better developer experience.
31
+ */
32
+ listRules(queries?: string[], search?: string, total?: boolean): Promise<Models.ProxyRuleList>;
33
+ /**
34
+ * Create a new proxy rule for serving Appwrite's API on custom domain.
35
+ *
36
+ * @param {string} params.domain - Domain name.
37
+ * @throws {AppwriteException}
38
+ * @returns {Promise<Models.ProxyRule>}
39
+ */
40
+ createAPIRule(params: {
41
+ domain: string;
42
+ }): Promise<Models.ProxyRule>;
43
+ /**
44
+ * Create a new proxy rule for serving Appwrite's API on custom domain.
45
+ *
46
+ * @param {string} domain - Domain name.
47
+ * @throws {AppwriteException}
48
+ * @returns {Promise<Models.ProxyRule>}
49
+ * @deprecated Use the object parameter style method for a better developer experience.
50
+ */
51
+ createAPIRule(domain: string): Promise<Models.ProxyRule>;
52
+ /**
53
+ * Create a new proxy rule for executing Appwrite Function on custom domain.
54
+ *
55
+ * @param {string} params.domain - Domain name.
56
+ * @param {string} params.functionId - ID of function to be executed.
57
+ * @param {string} params.branch - Name of VCS branch to deploy changes automatically
58
+ * @throws {AppwriteException}
59
+ * @returns {Promise<Models.ProxyRule>}
60
+ */
61
+ createFunctionRule(params: {
62
+ domain: string;
63
+ functionId: string;
64
+ branch?: string;
65
+ }): Promise<Models.ProxyRule>;
66
+ /**
67
+ * Create a new proxy rule for executing Appwrite Function on custom domain.
68
+ *
69
+ * @param {string} domain - Domain name.
70
+ * @param {string} functionId - ID of function to be executed.
71
+ * @param {string} branch - Name of VCS branch to deploy changes automatically
72
+ * @throws {AppwriteException}
73
+ * @returns {Promise<Models.ProxyRule>}
74
+ * @deprecated Use the object parameter style method for a better developer experience.
75
+ */
76
+ createFunctionRule(domain: string, functionId: string, branch?: string): Promise<Models.ProxyRule>;
77
+ /**
78
+ * Create a new proxy rule for to redirect from custom domain to another domain.
79
+ *
80
+ * @param {string} params.domain - Domain name.
81
+ * @param {string} params.url - Target URL of redirection
82
+ * @param {StatusCode} params.statusCode - Status code of redirection
83
+ * @param {string} params.resourceId - ID of parent resource.
84
+ * @param {ProxyResourceType} params.resourceType - Type of parent resource.
85
+ * @throws {AppwriteException}
86
+ * @returns {Promise<Models.ProxyRule>}
87
+ */
88
+ createRedirectRule(params: {
89
+ domain: string;
90
+ url: string;
91
+ statusCode: StatusCode;
92
+ resourceId: string;
93
+ resourceType: ProxyResourceType;
94
+ }): Promise<Models.ProxyRule>;
95
+ /**
96
+ * Create a new proxy rule for to redirect from custom domain to another domain.
97
+ *
98
+ * @param {string} domain - Domain name.
99
+ * @param {string} url - Target URL of redirection
100
+ * @param {StatusCode} statusCode - Status code of redirection
101
+ * @param {string} resourceId - ID of parent resource.
102
+ * @param {ProxyResourceType} resourceType - Type of parent resource.
103
+ * @throws {AppwriteException}
104
+ * @returns {Promise<Models.ProxyRule>}
105
+ * @deprecated Use the object parameter style method for a better developer experience.
106
+ */
107
+ createRedirectRule(domain: string, url: string, statusCode: StatusCode, resourceId: string, resourceType: ProxyResourceType): Promise<Models.ProxyRule>;
108
+ /**
109
+ * Create a new proxy rule for serving Appwrite Site on custom domain.
110
+ *
111
+ * @param {string} params.domain - Domain name.
112
+ * @param {string} params.siteId - ID of site to be executed.
113
+ * @param {string} params.branch - Name of VCS branch to deploy changes automatically
114
+ * @throws {AppwriteException}
115
+ * @returns {Promise<Models.ProxyRule>}
116
+ */
117
+ createSiteRule(params: {
118
+ domain: string;
119
+ siteId: string;
120
+ branch?: string;
121
+ }): Promise<Models.ProxyRule>;
122
+ /**
123
+ * Create a new proxy rule for serving Appwrite Site on custom domain.
124
+ *
125
+ * @param {string} domain - Domain name.
126
+ * @param {string} siteId - ID of site to be executed.
127
+ * @param {string} branch - Name of VCS branch to deploy changes automatically
128
+ * @throws {AppwriteException}
129
+ * @returns {Promise<Models.ProxyRule>}
130
+ * @deprecated Use the object parameter style method for a better developer experience.
131
+ */
132
+ createSiteRule(domain: string, siteId: string, branch?: string): Promise<Models.ProxyRule>;
133
+ /**
134
+ * Get a proxy rule by its unique ID.
135
+ *
136
+ * @param {string} params.ruleId - Rule ID.
137
+ * @throws {AppwriteException}
138
+ * @returns {Promise<Models.ProxyRule>}
139
+ */
140
+ getRule(params: {
141
+ ruleId: string;
142
+ }): Promise<Models.ProxyRule>;
143
+ /**
144
+ * Get a proxy rule by its unique ID.
145
+ *
146
+ * @param {string} ruleId - Rule ID.
147
+ * @throws {AppwriteException}
148
+ * @returns {Promise<Models.ProxyRule>}
149
+ * @deprecated Use the object parameter style method for a better developer experience.
150
+ */
151
+ getRule(ruleId: string): Promise<Models.ProxyRule>;
152
+ /**
153
+ * Delete a proxy rule by its unique ID.
154
+ *
155
+ * @param {string} params.ruleId - Rule ID.
156
+ * @throws {AppwriteException}
157
+ * @returns {Promise<{}>}
158
+ */
159
+ deleteRule(params: {
160
+ ruleId: string;
161
+ }): Promise<{}>;
162
+ /**
163
+ * Delete a proxy rule by its unique ID.
164
+ *
165
+ * @param {string} ruleId - Rule ID.
166
+ * @throws {AppwriteException}
167
+ * @returns {Promise<{}>}
168
+ * @deprecated Use the object parameter style method for a better developer experience.
169
+ */
170
+ deleteRule(ruleId: string): Promise<{}>;
171
+ /**
172
+ * Retry getting verification process of a proxy rule. This endpoint triggers domain verification by checking DNS records (CNAME) against the configured target domain. If verification is successful, a TLS certificate will be automatically provisioned for the domain.
173
+ *
174
+ * @param {string} params.ruleId - Rule ID.
175
+ * @throws {AppwriteException}
176
+ * @returns {Promise<Models.ProxyRule>}
177
+ */
178
+ updateRuleVerification(params: {
179
+ ruleId: string;
180
+ }): Promise<Models.ProxyRule>;
181
+ /**
182
+ * Retry getting verification process of a proxy rule. This endpoint triggers domain verification by checking DNS records (CNAME) against the configured target domain. If verification is successful, a TLS certificate will be automatically provisioned for the domain.
183
+ *
184
+ * @param {string} ruleId - Rule ID.
185
+ * @throws {AppwriteException}
186
+ * @returns {Promise<Models.ProxyRule>}
187
+ * @deprecated Use the object parameter style method for a better developer experience.
188
+ */
189
+ updateRuleVerification(ruleId: string): Promise<Models.ProxyRule>;
190
+ }
@@ -0,0 +1,118 @@
1
+ import { Client } from '../client';
2
+ export declare type RealtimeSubscription = {
3
+ close: () => Promise<void>;
4
+ };
5
+ export declare type RealtimeCallback<T = any> = {
6
+ channels: Set<string>;
7
+ callback: (event: RealtimeResponseEvent<T>) => void;
8
+ };
9
+ export declare type RealtimeResponse = {
10
+ type: string;
11
+ data?: any;
12
+ };
13
+ export declare type RealtimeResponseEvent<T = any> = {
14
+ events: string[];
15
+ channels: string[];
16
+ timestamp: string;
17
+ payload: T;
18
+ };
19
+ export declare type RealtimeResponseConnected = {
20
+ channels: string[];
21
+ user?: object;
22
+ };
23
+ export declare type RealtimeRequest = {
24
+ type: 'authentication';
25
+ data: {
26
+ session: string;
27
+ };
28
+ };
29
+ export declare enum RealtimeCode {
30
+ NORMAL_CLOSURE = 1000,
31
+ POLICY_VIOLATION = 1008,
32
+ UNKNOWN_ERROR = -1
33
+ }
34
+ export declare class Realtime {
35
+ private readonly TYPE_ERROR;
36
+ private readonly TYPE_EVENT;
37
+ private readonly TYPE_PONG;
38
+ private readonly TYPE_CONNECTED;
39
+ private readonly DEBOUNCE_MS;
40
+ private readonly HEARTBEAT_INTERVAL;
41
+ private client;
42
+ private socket?;
43
+ private activeChannels;
44
+ private activeSubscriptions;
45
+ private heartbeatTimer?;
46
+ private subCallDepth;
47
+ private reconnectAttempts;
48
+ private subscriptionsCounter;
49
+ private reconnect;
50
+ private onErrorCallbacks;
51
+ private onCloseCallbacks;
52
+ private onOpenCallbacks;
53
+ constructor(client: Client);
54
+ /**
55
+ * Register a callback function to be called when an error occurs
56
+ *
57
+ * @param {Function} callback - Callback function to handle errors
58
+ * @returns {void}
59
+ */
60
+ onError(callback: (error?: Error, statusCode?: number) => void): void;
61
+ /**
62
+ * Register a callback function to be called when the connection closes
63
+ *
64
+ * @param {Function} callback - Callback function to handle connection close
65
+ * @returns {void}
66
+ */
67
+ onClose(callback: () => void): void;
68
+ /**
69
+ * Register a callback function to be called when the connection opens
70
+ *
71
+ * @param {Function} callback - Callback function to handle connection open
72
+ * @returns {void}
73
+ */
74
+ onOpen(callback: () => void): void;
75
+ private startHeartbeat;
76
+ private stopHeartbeat;
77
+ private createSocket;
78
+ private closeSocket;
79
+ private getTimeout;
80
+ private sleep;
81
+ /**
82
+ * Subscribe to a single channel
83
+ *
84
+ * @param {string} channel - Channel name to subscribe to
85
+ * @param {Function} callback - Callback function to handle events
86
+ * @returns {Promise<RealtimeSubscription>} Subscription object with close method
87
+ */
88
+ subscribe(channel: string, callback: (event: RealtimeResponseEvent<any>) => void): Promise<RealtimeSubscription>;
89
+ /**
90
+ * Subscribe to multiple channels
91
+ *
92
+ * @param {string[]} channels - Array of channel names to subscribe to
93
+ * @param {Function} callback - Callback function to handle events
94
+ * @returns {Promise<RealtimeSubscription>} Subscription object with close method
95
+ */
96
+ subscribe(channels: string[], callback: (event: RealtimeResponseEvent<any>) => void): Promise<RealtimeSubscription>;
97
+ /**
98
+ * Subscribe to a single channel with typed payload
99
+ *
100
+ * @param {string} channel - Channel name to subscribe to
101
+ * @param {Function} callback - Callback function to handle events with typed payload
102
+ * @returns {Promise<RealtimeSubscription>} Subscription object with close method
103
+ */
104
+ subscribe<T>(channel: string, callback: (event: RealtimeResponseEvent<T>) => void): Promise<RealtimeSubscription>;
105
+ /**
106
+ * Subscribe to multiple channels with typed payload
107
+ *
108
+ * @param {string[]} channels - Array of channel names to subscribe to
109
+ * @param {Function} callback - Callback function to handle events with typed payload
110
+ * @returns {Promise<RealtimeSubscription>} Subscription object with close method
111
+ */
112
+ subscribe<T>(channels: string[], callback: (event: RealtimeResponseEvent<T>) => void): Promise<RealtimeSubscription>;
113
+ private cleanUp;
114
+ private handleMessage;
115
+ private handleResponseConnected;
116
+ private handleResponseError;
117
+ private handleResponseEvent;
118
+ }