@qmuse/appwrite-runtime-sdk 1.0.3 → 1.0.4-dev.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/index.d.ts +1 -1
- package/dist/runtime/QmuseAppwriteRuntime.js +4 -3
- package/dist/runtime/utils.d.ts +3 -1
- package/dist/types.d.ts +15 -13
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { createQmuseAppwriteRuntime } from './runtime';
|
|
2
|
-
export type { AppwriteAccountLike, AppwriteClientLike, AppwriteError, AppwriteRuntimeConfig, AppwriteSession, AppwriteTablesDBLike, AppwriteUser, BusinessRowData, CreateRowInput, DeleteRowInput, GetRowInput, ListRowsInput, QmuseAppwriteClients, QmuseAppwriteRuntimeApi, QmuseAppwriteRuntimeOptions, QmuseEnvironment, QmuseRuntimeContext, UpdateRowInput, } from './types';
|
|
2
|
+
export type { AppwriteAccountLike, AppwriteClientLike, AppwriteError, AppwriteRuntimeConfig, AppwriteSession, AppwriteTablesDBLike, AppwriteUser, BusinessRowData, CreateRowInput, DeleteRowInput, GetRowInput, ListRowsInput, Models, QmuseAppwriteClients, QmuseAppwriteRuntimeApi, QmuseAppwriteRuntimeOptions, QmuseEnvironment, QmuseRuntimeContext, UpdateRowInput, } from './types';
|
|
@@ -290,7 +290,8 @@ export var QmuseAppwriteRuntime = /*#__PURE__*/function () {
|
|
|
290
290
|
_context6.prev = 12;
|
|
291
291
|
_context6.t0 = _context6["catch"](5);
|
|
292
292
|
case 14:
|
|
293
|
-
|
|
293
|
+
_context6.next = 16;
|
|
294
|
+
return this.auditReporter.observe({
|
|
294
295
|
operation: 'delete',
|
|
295
296
|
tableId: tableId,
|
|
296
297
|
rowId: rowId,
|
|
@@ -304,8 +305,8 @@ export var QmuseAppwriteRuntime = /*#__PURE__*/function () {
|
|
|
304
305
|
});
|
|
305
306
|
});
|
|
306
307
|
}
|
|
307
|
-
})
|
|
308
|
-
case
|
|
308
|
+
});
|
|
309
|
+
case 16:
|
|
309
310
|
case "end":
|
|
310
311
|
return _context6.stop();
|
|
311
312
|
}
|
package/dist/runtime/utils.d.ts
CHANGED
|
@@ -8,4 +8,6 @@ export declare function createResponseError({ payload, status, fallbackMessage,
|
|
|
8
8
|
}): Error;
|
|
9
9
|
export declare function readResponsePayload(response: Response): Promise<Record<string, unknown> | null>;
|
|
10
10
|
export declare function createFetchRequest(configuredFetch?: typeof globalThis.fetch): typeof globalThis.fetch;
|
|
11
|
-
|
|
11
|
+
type PublicPromiseOperation = (...args: never[]) => Promise<unknown>;
|
|
12
|
+
export declare function observePublicPromise<TOperation extends PublicPromiseOperation>(operation: TOperation): TOperation;
|
|
13
|
+
export {};
|
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { Models } from 'appwrite';
|
|
2
|
+
export type { Models } from 'appwrite';
|
|
1
3
|
export type QmuseEnvironment = 'dev' | 'prod';
|
|
2
4
|
export interface QmuseRuntimeContext {
|
|
3
5
|
appId: string;
|
|
@@ -40,29 +42,29 @@ export interface AppwriteAccountLike {
|
|
|
40
42
|
}): Promise<unknown>;
|
|
41
43
|
}
|
|
42
44
|
export interface AppwriteTablesDBLike {
|
|
43
|
-
listRows(input: {
|
|
45
|
+
listRows<Row extends Models.Row = Models.DefaultRow>(input: {
|
|
44
46
|
databaseId: string;
|
|
45
47
|
tableId: string;
|
|
46
48
|
queries: string[];
|
|
47
|
-
}): Promise<
|
|
48
|
-
getRow(input: {
|
|
49
|
+
}): Promise<Models.RowList<Row>>;
|
|
50
|
+
getRow<Row extends Models.Row = Models.DefaultRow>(input: {
|
|
49
51
|
databaseId: string;
|
|
50
52
|
tableId: string;
|
|
51
53
|
rowId: string;
|
|
52
|
-
}): Promise<
|
|
53
|
-
createRow(input: {
|
|
54
|
+
}): Promise<Row>;
|
|
55
|
+
createRow<Row extends Models.Row = Models.DefaultRow>(input: {
|
|
54
56
|
databaseId: string;
|
|
55
57
|
tableId: string;
|
|
56
58
|
rowId: string;
|
|
57
59
|
data: BusinessRowData;
|
|
58
60
|
permissions: string[];
|
|
59
|
-
}): Promise<
|
|
60
|
-
updateRow(input: {
|
|
61
|
+
}): Promise<Row>;
|
|
62
|
+
updateRow<Row extends Models.Row = Models.DefaultRow>(input: {
|
|
61
63
|
databaseId: string;
|
|
62
64
|
tableId: string;
|
|
63
65
|
rowId: string;
|
|
64
66
|
data: BusinessRowData;
|
|
65
|
-
}): Promise<
|
|
67
|
+
}): Promise<Row>;
|
|
66
68
|
deleteRow(input: {
|
|
67
69
|
databaseId: string;
|
|
68
70
|
tableId: string;
|
|
@@ -109,9 +111,9 @@ export interface QmuseAppwriteRuntimeApi {
|
|
|
109
111
|
getClients(): Promise<QmuseAppwriteClients>;
|
|
110
112
|
getCurrentUser(): Promise<AppwriteUser>;
|
|
111
113
|
refreshSession(): Promise<void>;
|
|
112
|
-
listRows(input: ListRowsInput): Promise<
|
|
113
|
-
getRow(input: GetRowInput): Promise<
|
|
114
|
-
createRow(input: CreateRowInput): Promise<
|
|
115
|
-
updateRow(input: UpdateRowInput): Promise<
|
|
116
|
-
deleteRow(input: DeleteRowInput): Promise<
|
|
114
|
+
listRows<Row extends Models.Row = Models.DefaultRow>(input: ListRowsInput): Promise<Models.RowList<Row>>;
|
|
115
|
+
getRow<Row extends Models.Row = Models.DefaultRow>(input: GetRowInput): Promise<Row>;
|
|
116
|
+
createRow<Row extends Models.Row = Models.DefaultRow>(input: CreateRowInput): Promise<Row>;
|
|
117
|
+
updateRow<Row extends Models.Row = Models.DefaultRow>(input: UpdateRowInput): Promise<Row>;
|
|
118
|
+
deleteRow(input: DeleteRowInput): Promise<void>;
|
|
117
119
|
}
|