@kinevolution/appwrite-functions-shared-utils 0.1.17 → 0.1.19
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.
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Models, Users } from 'node-appwrite';
|
|
2
|
+
import { CompanionZones, ProfilesCompanion, ProfilesCore, ProfilesExtras, ProfilesRequester, Roles } from './appwrite.js';
|
|
3
|
+
import type { Response } from './utils.js';
|
|
4
|
+
export interface GetAllUsersInput {
|
|
5
|
+
offset?: number;
|
|
6
|
+
limit?: number;
|
|
7
|
+
search?: string;
|
|
8
|
+
order?: string;
|
|
9
|
+
orderBy?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const GetAllUsersConfig: {
|
|
12
|
+
method: "GET";
|
|
13
|
+
fields: [{
|
|
14
|
+
readonly key: "offset";
|
|
15
|
+
readonly type: "number";
|
|
16
|
+
readonly required: false;
|
|
17
|
+
readonly default: 0;
|
|
18
|
+
}, {
|
|
19
|
+
readonly key: "limit";
|
|
20
|
+
readonly type: "number";
|
|
21
|
+
readonly required: false;
|
|
22
|
+
readonly default: 50;
|
|
23
|
+
}, {
|
|
24
|
+
readonly key: "search";
|
|
25
|
+
readonly type: "string";
|
|
26
|
+
readonly required: false;
|
|
27
|
+
readonly default: "";
|
|
28
|
+
}, {
|
|
29
|
+
readonly key: "order";
|
|
30
|
+
readonly type: "string";
|
|
31
|
+
readonly required: false;
|
|
32
|
+
readonly default: "ASC";
|
|
33
|
+
}, {
|
|
34
|
+
readonly key: "orderBy";
|
|
35
|
+
readonly type: "string";
|
|
36
|
+
readonly required: false;
|
|
37
|
+
readonly default: "email";
|
|
38
|
+
}];
|
|
39
|
+
};
|
|
40
|
+
export type GetAllUsersResponse = Response<{
|
|
41
|
+
users: Models.User<Users>[];
|
|
42
|
+
profileRoles: Roles[];
|
|
43
|
+
profileCores: ProfilesCore[];
|
|
44
|
+
profileExtras: ProfilesExtras[];
|
|
45
|
+
profileRequesters: ProfilesRequester[];
|
|
46
|
+
profileCompanions: ProfilesCompanion[];
|
|
47
|
+
companionZones: CompanionZones[];
|
|
48
|
+
}>;
|
|
49
|
+
export interface RemoveUserInput {
|
|
50
|
+
userId: number;
|
|
51
|
+
keepAuth?: boolean;
|
|
52
|
+
}
|
|
53
|
+
export declare const RemoveUserConfig: {
|
|
54
|
+
method: "POST";
|
|
55
|
+
fields: [{
|
|
56
|
+
readonly key: "userId";
|
|
57
|
+
readonly type: "string";
|
|
58
|
+
readonly required: true;
|
|
59
|
+
}, {
|
|
60
|
+
readonly key: "keepAuth";
|
|
61
|
+
readonly type: "boolean";
|
|
62
|
+
readonly required: false;
|
|
63
|
+
readonly default: false;
|
|
64
|
+
}];
|
|
65
|
+
};
|
|
66
|
+
export type RemoveUserResponse = Response<{}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const GetAllUsersConfig = {
|
|
2
|
+
method: 'GET',
|
|
3
|
+
fields: [
|
|
4
|
+
{ key: 'offset', type: 'number', required: false, default: 0 },
|
|
5
|
+
{ key: 'limit', type: 'number', required: false, default: 50 },
|
|
6
|
+
{ key: 'search', type: 'string', required: false, default: '' },
|
|
7
|
+
{ key: 'order', type: 'string', required: false, default: 'ASC' },
|
|
8
|
+
{ key: 'orderBy', type: 'string', required: false, default: 'email' },
|
|
9
|
+
],
|
|
10
|
+
};
|
|
11
|
+
export const RemoveUserConfig = {
|
|
12
|
+
method: 'POST',
|
|
13
|
+
fields: [
|
|
14
|
+
{ key: 'userId', type: 'string', required: true },
|
|
15
|
+
{ key: 'keepAuth', type: 'boolean', required: false, default: false },
|
|
16
|
+
],
|
|
17
|
+
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.19",
|
|
7
7
|
"license": "ISC",
|
|
8
8
|
"author": "Nicolas Forêt <nicolas4@gmail.com>",
|
|
9
9
|
"description": "Shared utilities for Appwrite functions",
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"exports": {
|
|
15
15
|
".": "./dist/utils.js",
|
|
16
16
|
"./utils": "./dist/utils.js",
|
|
17
|
-
"./appwrite": "./dist/appwrite.js"
|
|
17
|
+
"./appwrite": "./dist/appwrite.js",
|
|
18
|
+
"./functionsInputsOutputs": "./dist/functionsInputsOutputs.js"
|
|
18
19
|
},
|
|
19
20
|
"files": [
|
|
20
21
|
"dist"
|
|
@@ -30,7 +31,7 @@
|
|
|
30
31
|
"npm-update": "npx npkill && del package-lock.json && ncu -u && npm i"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
|
-
"@types/node": "24.10.
|
|
34
|
+
"@types/node": "24.10.1",
|
|
34
35
|
"gulp": "5.0.1",
|
|
35
36
|
"gulp-replace": "1.1.4",
|
|
36
37
|
"minimist": "1.2.8",
|