@bpmsoftwaresolutions/ai-engine-client 1.0.0-beta.7 → 1.0.0-beta.8

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 (3) hide show
  1. package/README.md +14 -3
  2. package/package.json +1 -1
  3. package/src/index.js +34 -0
package/README.md CHANGED
@@ -77,11 +77,22 @@ const client = AIEngineClient.fromEnv();
77
77
  | `currentCodebaseShapeStatus()` | Codebase shape analysis. |
78
78
  | `getLatestMemoryProjection()` | Current SQL memory projection (startup hydration source). |
79
79
  | `currentProjectStatus({ projectId })` | Current project status projection from SQL memory. |
80
- | `runAzureSqlBacpacBackup({ databaseName, storageAccount, ... })` | Start an Azure SQL BACPAC export through the operator API. |
81
- | `listAzureSqlBacpacBackups({ storageAccount, container, ... })` | List recent BACPAC exports visible in the configured blob container. |
82
- | `listAzureSqlBacpacBackupOperations({ databaseName, resourceGroup, serverName, ... })` | List Azure SQL database operations so callers can poll backup/export status. |
80
+ | `createDatabaseBackup({ databaseName, outputName, noWait })` | Start a database backup using server-owned Azure backup defaults. |
81
+ | `listDatabaseBackups({ prefix, limit })` | List recent backups from the server-owned backup storage location. |
82
+ | `getDatabaseBackup({ backupId })` | Get one backup artifact by backup id. |
83
+ | `listDatabaseBackupOperations({ databaseName, operationFilter, limit })` | List backup/export operations using server-owned Azure defaults. |
83
84
  | `getDashboard()` | Operator dashboard payload. |
84
85
 
86
+ Preferred backup contract: use `createDatabaseBackup`, `listDatabaseBackups`, `getDatabaseBackup`, and `listDatabaseBackupOperations`. Those routes let the service own Azure storage, SQL server, resource group, subscription, and credential resolution.
87
+
88
+ Low-level compatibility methods:
89
+
90
+ | Method | Description |
91
+ |---|---|
92
+ | `runAzureSqlBacpacBackup({ databaseName, storageAccount, ... })` | Start an Azure SQL BACPAC export through the legacy infra-shaped operator API. |
93
+ | `listAzureSqlBacpacBackups({ storageAccount, container, ... })` | List BACPAC exports through the legacy infra-shaped operator API. |
94
+ | `listAzureSqlBacpacBackupOperations({ databaseName, resourceGroup, serverName, ... })` | List Azure SQL operations through the legacy infra-shaped operator API. |
95
+
85
96
  ### Retrieval Wrapper
86
97
  | Method | Description |
87
98
  |---|---|
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpmsoftwaresolutions/ai-engine-client",
3
- "version": "1.0.0-beta.7",
3
+ "version": "1.0.0-beta.8",
4
4
  "description": "Thin npm client for the AI Engine operator and retrieval APIs",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
package/src/index.js CHANGED
@@ -94,6 +94,40 @@ export class AIEngineClient {
94
94
  });
95
95
  }
96
96
 
97
+ async createDatabaseBackup({ databaseName, outputName, noWait } = {}) {
98
+ return this._request('/api/operator/database/backups', {
99
+ method: 'POST',
100
+ body: {
101
+ database_name: databaseName,
102
+ output_name: outputName,
103
+ no_wait: noWait,
104
+ },
105
+ });
106
+ }
107
+
108
+ async listDatabaseBackups({ prefix, limit } = {}) {
109
+ return this._request('/api/operator/database/backups', {
110
+ query: {
111
+ prefix,
112
+ limit,
113
+ },
114
+ });
115
+ }
116
+
117
+ async getDatabaseBackup({ backupId } = {}) {
118
+ return this._request(`/api/operator/database/backups/${encodeURIComponent(backupId)}`);
119
+ }
120
+
121
+ async listDatabaseBackupOperations({ databaseName, operationFilter, limit } = {}) {
122
+ return this._request('/api/operator/database/backups/operations', {
123
+ query: {
124
+ database_name: databaseName,
125
+ operation_filter: operationFilter,
126
+ limit,
127
+ },
128
+ });
129
+ }
130
+
97
131
  async runAzureSqlBacpacBackup({
98
132
  databaseName,
99
133
  storageAccount,