@cloud-os/sandbox-app-standard-bridge 20251226.0.1 → 20260105.0.1
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/dist/Bridge/Sql/Payload/SqlBridgePayload.d.ts +16 -0
- package/dist/Bridge/Sql/Payload/SqlBridgePayload.js +1 -0
- package/dist/Bridge/Sql/index.d.ts +20 -0
- package/dist/Bridge/Sql/index.js +45 -0
- package/dist/Bridge/Subscription/index.d.ts +1 -2
- package/dist/Bridge/System/index.d.ts +1 -2
- package/dist/Bridge/index.d.ts +1 -0
- package/dist/Bridge/index.js +1 -0
- package/dist/Event/Sql/SqlEvent.d.ts +17 -0
- package/dist/Event/Sql/SqlEvent.js +1 -0
- package/dist/Event/index.d.ts +2 -0
- package/dist/Hooks/Io/StorageProviderHook.d.ts +6 -6
- package/dist/Hooks/Sql/SqlProviderHook.d.ts +9 -0
- package/dist/Hooks/Sql/SqlProviderHook.js +2 -0
- package/dist/Interface/Sql/ColumnInfo.d.ts +7 -0
- package/dist/Interface/Sql/ColumnInfo.js +1 -0
- package/dist/Interface/Sql/ColumnType.d.ts +6 -0
- package/dist/Interface/Sql/ColumnType.js +7 -0
- package/dist/Interface/Sql/DatabaseInfo.d.ts +6 -0
- package/dist/Interface/Sql/DatabaseInfo.js +1 -0
- package/dist/Interface/Sql/TableInfo.d.ts +4 -0
- package/dist/Interface/Sql/TableInfo.js +1 -0
- package/dist/Interface/index.d.ts +2 -0
- package/dist/Props/Application/index.d.ts +1 -3
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TableInfo, DatabaseInfo } from "../../../index";
|
|
2
|
+
export interface SqlBridgePayload {
|
|
3
|
+
handleDatabases: () => Promise<DatabaseInfo[]>;
|
|
4
|
+
handleCreateDatabase: (name: string, capacity: number, format: string) => Promise<string>;
|
|
5
|
+
handleModifyDatabase: (database: DatabaseInfo, name: string, capacity: number) => Promise<void>;
|
|
6
|
+
handleDeleteDatabase: (database: DatabaseInfo) => Promise<void>;
|
|
7
|
+
handleTables: (database: DatabaseInfo) => Promise<TableInfo[]>;
|
|
8
|
+
handleCreateTable: (database: DatabaseInfo, name: string, columns: Record<string, any>) => Promise<string>;
|
|
9
|
+
handleModifyTable: (database: DatabaseInfo, table: TableInfo, name: string, columns: Record<string, any>) => Promise<void>;
|
|
10
|
+
handleDeleteTable: (database: DatabaseInfo, table: TableInfo) => Promise<void>;
|
|
11
|
+
handleFindMany: <T>(database: DatabaseInfo, table: TableInfo) => Promise<T[]>;
|
|
12
|
+
handleFindOne: <T>(database: DatabaseInfo, table: TableInfo, id: string) => Promise<T | null>;
|
|
13
|
+
handleCreate: <T>(database: DatabaseInfo, table: TableInfo, data: T) => Promise<string>;
|
|
14
|
+
handleUpdate: <T>(database: DatabaseInfo, table: TableInfo, id: string, data: Partial<T>) => Promise<boolean>;
|
|
15
|
+
handleDelete: (database: DatabaseInfo, table: TableInfo, id: string) => Promise<boolean>;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DatabaseInfo, SqlEvent, TableInfo } from "../../index";
|
|
2
|
+
import { ColumnInfo } from "../../Interface/Sql/ColumnInfo";
|
|
3
|
+
import { SqlBridgePayload } from "./Payload/SqlBridgePayload";
|
|
4
|
+
export default class SqlBridge implements SqlEvent {
|
|
5
|
+
private readonly payload;
|
|
6
|
+
constructor(payload: SqlBridgePayload);
|
|
7
|
+
databases(): Promise<DatabaseInfo[]>;
|
|
8
|
+
createDatabase(name: string, capacity: number, format: string): Promise<string>;
|
|
9
|
+
modifyDatabase(database: DatabaseInfo, name: string, capacity: number): Promise<void>;
|
|
10
|
+
deleteDatabase(database: DatabaseInfo): Promise<void>;
|
|
11
|
+
tables(database: DatabaseInfo): Promise<TableInfo[]>;
|
|
12
|
+
createTable(database: DatabaseInfo, name: string, columns: Record<string, ColumnInfo>): Promise<string>;
|
|
13
|
+
modifyTable(database: DatabaseInfo, table: TableInfo, name: string, columns: Record<string, ColumnInfo>): Promise<void>;
|
|
14
|
+
deleteTable(database: DatabaseInfo, table: TableInfo): Promise<void>;
|
|
15
|
+
findMany<T>(database: DatabaseInfo, table: TableInfo): Promise<T[]>;
|
|
16
|
+
findOne<T>(database: DatabaseInfo, table: TableInfo, id: string): Promise<T | null>;
|
|
17
|
+
create<T>(database: DatabaseInfo, table: TableInfo, data: T): Promise<string>;
|
|
18
|
+
update<T>(database: DatabaseInfo, table: TableInfo, id: string, data: Partial<T>): Promise<boolean>;
|
|
19
|
+
delete(database: DatabaseInfo, table: TableInfo, id: string): Promise<boolean>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export default class SqlBridge {
|
|
2
|
+
payload;
|
|
3
|
+
constructor(payload) {
|
|
4
|
+
this.payload = payload;
|
|
5
|
+
}
|
|
6
|
+
databases() {
|
|
7
|
+
return this.payload.handleDatabases();
|
|
8
|
+
}
|
|
9
|
+
createDatabase(name, capacity, format) {
|
|
10
|
+
return this.payload.handleCreateDatabase(name, capacity, format);
|
|
11
|
+
}
|
|
12
|
+
modifyDatabase(database, name, capacity) {
|
|
13
|
+
return this.payload.handleModifyDatabase(database, name, capacity);
|
|
14
|
+
}
|
|
15
|
+
deleteDatabase(database) {
|
|
16
|
+
return this.payload.handleDeleteDatabase(database);
|
|
17
|
+
}
|
|
18
|
+
tables(database) {
|
|
19
|
+
return this.payload.handleTables(database);
|
|
20
|
+
}
|
|
21
|
+
createTable(database, name, columns) {
|
|
22
|
+
return this.payload.handleCreateTable(database, name, columns);
|
|
23
|
+
}
|
|
24
|
+
modifyTable(database, table, name, columns) {
|
|
25
|
+
return this.payload.handleModifyTable(database, table, name, columns);
|
|
26
|
+
}
|
|
27
|
+
deleteTable(database, table) {
|
|
28
|
+
return this.payload.handleDeleteTable(database, table);
|
|
29
|
+
}
|
|
30
|
+
findMany(database, table) {
|
|
31
|
+
return this.payload.handleFindMany(database, table);
|
|
32
|
+
}
|
|
33
|
+
findOne(database, table, id) {
|
|
34
|
+
return this.payload.handleFindOne(database, table, id);
|
|
35
|
+
}
|
|
36
|
+
create(database, table, data) {
|
|
37
|
+
return this.payload.handleCreate(database, table, data);
|
|
38
|
+
}
|
|
39
|
+
update(database, table, id, data) {
|
|
40
|
+
return this.payload.handleUpdate(database, table, id, data);
|
|
41
|
+
}
|
|
42
|
+
delete(database, table, id) {
|
|
43
|
+
return this.payload.handleDelete(database, table, id);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { SubscriptionEvent } from "../../
|
|
2
|
-
import { SubscriptionInfo, SubscriptionPlan } from "../../Interface";
|
|
1
|
+
import { SubscriptionEvent, SubscriptionInfo, SubscriptionPlan } from "../../index";
|
|
3
2
|
import { SubscriptionPayload } from "./Payload/SubscriptionPayload";
|
|
4
3
|
export default class SubscriptionBridge implements SubscriptionEvent {
|
|
5
4
|
private readonly payload;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ApplicationInfo, DiskInfo, InstallApplicationInfo, RunningApplciationInfo, SystemEvent } from "../../index";
|
|
2
|
-
import { ProcessInfo } from "../../Interface/System/ProcessInfo";
|
|
1
|
+
import { ApplicationInfo, DiskInfo, InstallApplicationInfo, ProcessInfo, RunningApplciationInfo, SystemEvent } from "../../index";
|
|
3
2
|
import { SystemBridgePayload } from "./Payload/SystemBridgePayload";
|
|
4
3
|
export default class SystemBridge implements SystemEvent {
|
|
5
4
|
private readonly payload;
|
package/dist/Bridge/index.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ export { default as SystemBridge } from "./System/index";
|
|
|
4
4
|
export { default as AuthorizationBridge } from "./Authorization/index";
|
|
5
5
|
export { default as IoBridge } from "./Io/index";
|
|
6
6
|
export { default as SubscriptionBridge } from "./Subscription/index";
|
|
7
|
+
export { default as SqlBridge } from "./Sql/index";
|
package/dist/Bridge/index.js
CHANGED
|
@@ -4,3 +4,4 @@ export { default as SystemBridge } from "./System/index";
|
|
|
4
4
|
export { default as AuthorizationBridge } from "./Authorization/index";
|
|
5
5
|
export { default as IoBridge } from "./Io/index";
|
|
6
6
|
export { default as SubscriptionBridge } from "./Subscription/index";
|
|
7
|
+
export { default as SqlBridge } from "./Sql/index";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DatabaseInfo, TableInfo } from "../../index";
|
|
2
|
+
import { ColumnInfo } from "../../Interface/Sql/ColumnInfo";
|
|
3
|
+
export interface SqlEvent {
|
|
4
|
+
databases(): Promise<DatabaseInfo[]>;
|
|
5
|
+
createDatabase(name: string, capacity: number, format: string): Promise<string>;
|
|
6
|
+
modifyDatabase(database: DatabaseInfo, name: string, capacity: number): Promise<void>;
|
|
7
|
+
deleteDatabase(database: DatabaseInfo): Promise<void>;
|
|
8
|
+
tables(database: DatabaseInfo): Promise<TableInfo[]>;
|
|
9
|
+
createTable(database: DatabaseInfo, name: string, columns: Record<string, ColumnInfo>): Promise<string>;
|
|
10
|
+
modifyTable(database: DatabaseInfo, table: TableInfo, name: string, columns: Record<string, ColumnInfo>): Promise<void>;
|
|
11
|
+
deleteTable(database: DatabaseInfo, table: TableInfo): Promise<void>;
|
|
12
|
+
findMany<T>(database: DatabaseInfo, table: TableInfo): Promise<T[]>;
|
|
13
|
+
findOne<T>(database: DatabaseInfo, table: TableInfo, id: string): Promise<T | null>;
|
|
14
|
+
create<T>(database: DatabaseInfo, table: TableInfo, data: T): Promise<string>;
|
|
15
|
+
update<T>(database: DatabaseInfo, table: TableInfo, id: string, data: Partial<T>): Promise<boolean>;
|
|
16
|
+
delete(database: DatabaseInfo, table: TableInfo, id: string): Promise<boolean>;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/Event/index.d.ts
CHANGED
|
@@ -3,3 +3,5 @@ export { CommunicationEvent } from "./Communication/CommunicationEvent";
|
|
|
3
3
|
export { SystemEvent } from "./System/SystemEvent";
|
|
4
4
|
export { AuthorizationEvent } from "./Authorization/AuthorizationEvent";
|
|
5
5
|
export { IOEvent } from "./Io/IoEvent";
|
|
6
|
+
export { SqlEvent } from "./Sql/SqlEvent";
|
|
7
|
+
export { SubscriptionEvent } from "./Subscription/SubscriptionEvent";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { File } from "../../
|
|
1
|
+
import { DiskInfo, File } from "../../index";
|
|
2
2
|
export declare abstract class StorageProviderHook {
|
|
3
|
-
abstract include(prefix: string, key: string): Promise<boolean>;
|
|
4
|
-
abstract list(prefix: string): Promise<File[]>;
|
|
5
|
-
abstract read(prefix: string, key: string): Promise<ArrayBuffer | null>;
|
|
6
|
-
abstract write(prefix: string, key: string, value: ArrayBuffer | null): Promise<void>;
|
|
7
|
-
abstract delete(prefix: string, key: string): Promise<void>;
|
|
3
|
+
abstract include(disk: DiskInfo, prefix: string, key: string): Promise<boolean>;
|
|
4
|
+
abstract list(disk: DiskInfo, prefix: string): Promise<File[]>;
|
|
5
|
+
abstract read(disk: DiskInfo, prefix: string, key: string): Promise<ArrayBuffer | null>;
|
|
6
|
+
abstract write(disk: DiskInfo, prefix: string, key: string, value: ArrayBuffer | null): Promise<void>;
|
|
7
|
+
abstract delete(disk: DiskInfo, prefix: string, key: string): Promise<void>;
|
|
8
8
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DatabaseInfo, TableInfo } from "../../index";
|
|
2
|
+
export declare abstract class SqlProviderHook {
|
|
3
|
+
abstract tables(database: DatabaseInfo): Promise<TableInfo[]>;
|
|
4
|
+
abstract findMany<T>(database: DatabaseInfo, table: TableInfo): Promise<T[]>;
|
|
5
|
+
abstract findOne<T>(database: DatabaseInfo, table: TableInfo, id: string): Promise<T | null>;
|
|
6
|
+
abstract create<T>(database: DatabaseInfo, table: TableInfo, data: T): Promise<string>;
|
|
7
|
+
abstract update<T>(database: DatabaseInfo, table: TableInfo, id: string, data: Partial<T>): Promise<boolean>;
|
|
8
|
+
abstract delete(database: DatabaseInfo, table: TableInfo, id: string): Promise<boolean>;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -12,3 +12,5 @@ export { DiskInfo } from "./Io/DiskInfo";
|
|
|
12
12
|
export { SubscriptionPlan } from "./Subscription/SubscriptionPlan";
|
|
13
13
|
export { SubscriptionInfo } from "./Subscription/SubscriptionInfo";
|
|
14
14
|
export { Credential } from "./Authorization/Credential";
|
|
15
|
+
export { DatabaseInfo } from "./Sql/DatabaseInfo";
|
|
16
|
+
export { TableInfo } from "./Sql/TableInfo";
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { AuthorizationEvent, CommunicationEvent, SandboxApplicationEvent, SystemEvent } from "../../Event/index";
|
|
2
|
-
import { IOEvent } from "../../Event/Io/IoEvent";
|
|
3
|
-
import { SubscriptionEvent } from "../../Event/Subscription/SubscriptionEvent";
|
|
1
|
+
import { AuthorizationEvent, CommunicationEvent, IOEvent, SandboxApplicationEvent, SubscriptionEvent, SystemEvent } from "../../Event/index";
|
|
4
2
|
export interface ApplicationProps {
|
|
5
3
|
application: SandboxApplicationEvent;
|
|
6
4
|
communication: CommunicationEvent;
|