@chisquare-tech/origine-ngx-apps-services 0.3.0 → 0.4.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chisquare-tech/origine-ngx-apps-services",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Origine's Services module screens: managed Postgres, MySQL and Valkey — the list with quota, the create wizard, and the instance page (connection details, attachments, databases and users, backups and PITR, metrics, logs, settings).",
5
5
  "repository": {
6
6
  "type": "git",
@@ -78,6 +78,11 @@ interface Engine {
78
78
  dumps?: boolean;
79
79
  console: 'sql' | 'keys' | 'streams' | 'queues';
80
80
  parameters: Param[];
81
+ /** The extensions a database may create (Postgres, D-30). */
82
+ extensions?: {
83
+ name: string;
84
+ description: string;
85
+ }[];
81
86
  }
82
87
  interface Param {
83
88
  engine: string;
@@ -180,6 +185,67 @@ interface Database {
180
185
  name: string;
181
186
  createdBy: string;
182
187
  createdAt: string;
188
+ /** Postgres extensions asked for in it (V8-04), each created once the cell reports it. */
189
+ extensions?: {
190
+ name: string;
191
+ created: boolean;
192
+ }[];
193
+ }
194
+ /** A major version upgrade (V8-01). */
195
+ interface Upgrade {
196
+ id: string;
197
+ from: string;
198
+ to: string;
199
+ method: 'in-place' | 'new-instance' | string;
200
+ state: 'scheduled' | 'backing-up' | 'upgrading' | 'testing' | 'ready' | 'done' | 'failed' | 'canceled' | string;
201
+ at: string;
202
+ scheduled: boolean;
203
+ backup: string;
204
+ backupName?: string;
205
+ target?: string;
206
+ targetName?: string;
207
+ message?: string;
208
+ startedAt?: string;
209
+ finishedAt?: string;
210
+ }
211
+ interface UpgradeView {
212
+ current?: Upgrade;
213
+ offer: {
214
+ to?: string;
215
+ methods: string[];
216
+ refused?: string;
217
+ notes: string[];
218
+ };
219
+ running?: string;
220
+ }
221
+ /** Backup copies in another region (V8-02). */
222
+ interface CopyView {
223
+ region: string;
224
+ regionName: string;
225
+ last?: {
226
+ region: string;
227
+ at: string;
228
+ objects: number;
229
+ bytes: number;
230
+ copied: number;
231
+ deleted: number;
232
+ error?: string;
233
+ through?: string;
234
+ };
235
+ offered: {
236
+ id: string;
237
+ name: string;
238
+ }[];
239
+ }
240
+ /** Storage auto-grow (V8-04). */
241
+ interface StorageView {
242
+ autoGrow: boolean;
243
+ maxGb: number;
244
+ limitGb: number;
245
+ expandable?: boolean;
246
+ message?: string;
247
+ grownAt?: string;
248
+ atPercent: number;
183
249
  }
184
250
  interface UserView {
185
251
  name: string;
@@ -302,6 +368,10 @@ interface Detail extends Summary {
302
368
  /** RabbitMQ: what the caller's role opens of the management UI. */
303
369
  management?: 'admin' | 'read' | '';
304
370
  restoreVolumes?: boolean;
371
+ upgrade?: UpgradeView;
372
+ copy?: CopyView;
373
+ storage?: StorageView;
374
+ restoreCopy?: boolean;
305
375
  }
306
376
  interface Revealed {
307
377
  user: string;
@@ -392,6 +462,11 @@ interface UpdateInput {
392
462
  standby?: boolean;
393
463
  replicas?: number;
394
464
  parameters?: Record<string, string>;
465
+ /** V8-02: the region backups are copied to ('' stops copying and deletes the copies). */
466
+ copyRegion?: string;
467
+ /** V8-04: storage auto-grow and its cap in GB (0: the limit). */
468
+ autoGrow?: boolean;
469
+ autoGrowMaxGb?: number;
395
470
  }
396
471
  declare function apiMessage(err: any, fallback?: string): string;
397
472
  declare class ServicesApi {
@@ -418,11 +493,21 @@ declare class ServicesApi {
418
493
  deleteBackup(project: string, id: string, name: string): Observable<unknown>;
419
494
  /** A link to a RabbitMQ instance's management UI, for the caller only (read-only for Developers). */
420
495
  management(project: string, id: string): Observable<ManagementLink>;
496
+ /** A major version upgrade (V8-01): in place or into a new instance, now or in the maintenance window. */
497
+ upgrade(project: string, id: string, body: {
498
+ version?: string;
499
+ method: string;
500
+ when: 'now' | 'window';
501
+ }): Observable<Detail>;
502
+ cancelUpgrade(project: string, id: string): Observable<Detail>;
503
+ addExtension(project: string, id: string, database: string, name: string): Observable<Detail>;
504
+ removeExtension(project: string, id: string, database: string, name: string): Observable<Detail>;
421
505
  restore(project: string, id: string, body: {
422
506
  pointInTime?: string;
423
507
  backup?: string;
424
508
  name?: string;
425
509
  volumes?: boolean;
510
+ region?: string;
426
511
  }): Observable<Detail>;
427
512
  attach(project: string, id: string, body: {
428
513
  app: string;
@@ -739,6 +824,9 @@ declare class ServicePage {
739
824
  protected retire(d: Detail, r: Rotation): void;
740
825
  protected addDb(d: Detail): void;
741
826
  protected removeDb(d: Detail, name: string): void;
827
+ /** A Postgres extension from the allow-list (V8-04, D-30); what it needs comes with it. */
828
+ protected addExt(d: Detail, db: string, name: string): void;
829
+ protected dropExt(d: Detail, db: string, name: string): void;
742
830
  protected addUser(d: Detail): void;
743
831
  protected removeUser(d: Detail, name: string): void;
744
832
  protected backupNow(d: Detail): void;
@@ -909,4 +997,4 @@ declare class ServiceDumpsCard {
909
997
  }
910
998
 
911
999
  export { DAYS, ENGINE_COLOUR, HIDDEN_POLL_MS, LIFECYCLE, PRESETS, ServiceConsoleTab, ServiceDumpsCard, ServiceLogsTab, ServiceMetricsTab, ServicePage, ServicesApi, ServicesHost, ServicesListPage, ServicesNewPage, apiMessage, backupKind, backupsLine, bytes, fromLocalInput, hhmm, hhmmss, money, moving, num, pct, pollDelay, presetChip, ratio, shortDate, spark, sparkPath, stateChip, stateDot, toLocalInput, utcHour, when };
912
- export type { Attachment, Backup, Catalog, Connection, CreateInput, Database, Detail, Dump, Engine, EngineVersion, Figure, Gauge, Inspection, LogKind, LogLine, Logs, ManagementLink, Metrics, Param, Plan, PodView, QueryResult, Quota, Revealed, Rotation, ServiceList, ServicesApp, ServicesProject, ServicesRegion, State, Stream, Summary, UpdateInput, UserView };
1000
+ export type { Attachment, Backup, Catalog, Connection, CopyView, CreateInput, Database, Detail, Dump, Engine, EngineVersion, Figure, Gauge, Inspection, LogKind, LogLine, Logs, ManagementLink, Metrics, Param, Plan, PodView, QueryResult, Quota, Revealed, Rotation, ServiceList, ServicesApp, ServicesProject, ServicesRegion, State, StorageView, Stream, Summary, UpdateInput, Upgrade, UpgradeView, UserView };