@jhits/plugin-dep 0.0.6 → 0.0.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.
- package/dist/actions.d.ts +181 -0
- package/dist/actions.d.ts.map +1 -0
- package/dist/actions.js +607 -0
- package/dist/config.d.ts +13 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +130 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.server.d.ts +11 -0
- package/dist/index.server.d.ts.map +1 -0
- package/dist/index.server.js +15 -0
- package/dist/router.d.ts +15 -0
- package/dist/router.d.ts.map +1 -0
- package/dist/router.js +372 -0
- package/dist/types.d.ts +48 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/utils/auth.d.ts +10 -0
- package/dist/utils/auth.d.ts.map +1 -0
- package/dist/utils/auth.js +12 -0
- package/package.json +18 -20
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin Deprecated - Actions
|
|
3
|
+
* Framework-agnostic business logic for deprecated client API routes
|
|
4
|
+
*
|
|
5
|
+
* SERVER-ONLY: This module must never be imported by client code
|
|
6
|
+
*/
|
|
7
|
+
import 'server-only';
|
|
8
|
+
import { ObjectId } from 'mongodb';
|
|
9
|
+
import { DepApiConfig } from './types';
|
|
10
|
+
export declare function getMe(config: DepApiConfig, session?: any): Promise<{
|
|
11
|
+
loggedIn: boolean;
|
|
12
|
+
user?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
loggedIn: boolean;
|
|
15
|
+
user: {
|
|
16
|
+
id: any;
|
|
17
|
+
email: any;
|
|
18
|
+
name: any;
|
|
19
|
+
role: any;
|
|
20
|
+
};
|
|
21
|
+
}>;
|
|
22
|
+
export declare function createFeedback(config: DepApiConfig, data: {
|
|
23
|
+
type: string;
|
|
24
|
+
message: string;
|
|
25
|
+
image?: string;
|
|
26
|
+
}, userId?: string): Promise<{
|
|
27
|
+
success: boolean;
|
|
28
|
+
id: ObjectId;
|
|
29
|
+
}>;
|
|
30
|
+
export declare function listFeedback(config: DepApiConfig): Promise<import("mongodb").WithId<import("mongodb").Document>[]>;
|
|
31
|
+
export declare function updateFeedback(config: DepApiConfig, id: string, data: {
|
|
32
|
+
status: string;
|
|
33
|
+
}): Promise<{
|
|
34
|
+
success: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
export declare function deleteFeedback(config: DepApiConfig, id: string): Promise<{
|
|
37
|
+
success: boolean;
|
|
38
|
+
}>;
|
|
39
|
+
export declare function getSettings(config: DepApiConfig): Promise<{}>;
|
|
40
|
+
export declare function updateSettings(config: DepApiConfig, data: any): Promise<{
|
|
41
|
+
success: boolean;
|
|
42
|
+
}>;
|
|
43
|
+
export declare function getMaintenanceMode(config: DepApiConfig): Promise<{
|
|
44
|
+
active: any;
|
|
45
|
+
}>;
|
|
46
|
+
export declare function setMaintenanceMode(config: DepApiConfig, active: boolean): Promise<{
|
|
47
|
+
success: boolean;
|
|
48
|
+
active: boolean;
|
|
49
|
+
}>;
|
|
50
|
+
export declare function listUsers(config: DepApiConfig): Promise<import("mongodb").WithId<import("mongodb").Document>[]>;
|
|
51
|
+
export declare function createUser(config: DepApiConfig, data: {
|
|
52
|
+
email: string;
|
|
53
|
+
name: string;
|
|
54
|
+
role: string;
|
|
55
|
+
password: string;
|
|
56
|
+
}): Promise<{
|
|
57
|
+
_id: ObjectId;
|
|
58
|
+
email: string;
|
|
59
|
+
name: string;
|
|
60
|
+
role: string;
|
|
61
|
+
createdAt: Date;
|
|
62
|
+
}>;
|
|
63
|
+
export declare function updateUser(config: DepApiConfig, id: string, data: {
|
|
64
|
+
role?: string;
|
|
65
|
+
name?: string;
|
|
66
|
+
password?: string;
|
|
67
|
+
currentPassword?: string;
|
|
68
|
+
}): Promise<{
|
|
69
|
+
message: string;
|
|
70
|
+
}>;
|
|
71
|
+
export declare function deleteUser(config: DepApiConfig, id: string): Promise<{
|
|
72
|
+
message: string;
|
|
73
|
+
}>;
|
|
74
|
+
export declare function subscribeNewsletter(config: DepApiConfig, data: {
|
|
75
|
+
email: string;
|
|
76
|
+
language: string;
|
|
77
|
+
}, host?: string): Promise<{
|
|
78
|
+
message: string;
|
|
79
|
+
}>;
|
|
80
|
+
export declare function listSubscribers(config: DepApiConfig): Promise<import("mongodb").WithId<import("mongodb").Document>[]>;
|
|
81
|
+
export declare function getSubscriber(config: DepApiConfig, email: string): Promise<import("mongodb").WithId<import("mongodb").Document>>;
|
|
82
|
+
export declare function deleteSubscriber(config: DepApiConfig, email: string): Promise<{
|
|
83
|
+
message: string;
|
|
84
|
+
}>;
|
|
85
|
+
export declare function getNewsletterSettings(config: DepApiConfig): Promise<{}>;
|
|
86
|
+
export declare function updateNewsletterSettings(config: DepApiConfig, data: {
|
|
87
|
+
languages: any;
|
|
88
|
+
}): Promise<{
|
|
89
|
+
success: boolean;
|
|
90
|
+
}>;
|
|
91
|
+
export declare function getNotificationStream(config: DepApiConfig, userRole: string, userId: string | null): Promise<{
|
|
92
|
+
history: {
|
|
93
|
+
id: ObjectId;
|
|
94
|
+
isRead: any;
|
|
95
|
+
_id: ObjectId;
|
|
96
|
+
}[];
|
|
97
|
+
pipeline: {
|
|
98
|
+
$match: {
|
|
99
|
+
$and: ({
|
|
100
|
+
operationType: string;
|
|
101
|
+
$or?: undefined;
|
|
102
|
+
'fullDocument.senderId'?: undefined;
|
|
103
|
+
'fullDocument.category'?: undefined;
|
|
104
|
+
} | {
|
|
105
|
+
$or: ({
|
|
106
|
+
'fullDocument.forRole': {
|
|
107
|
+
$in: string[];
|
|
108
|
+
$exists?: undefined;
|
|
109
|
+
};
|
|
110
|
+
} | {
|
|
111
|
+
'fullDocument.forRole': string;
|
|
112
|
+
} | {
|
|
113
|
+
'fullDocument.forRole': {
|
|
114
|
+
$exists: boolean;
|
|
115
|
+
$in?: undefined;
|
|
116
|
+
};
|
|
117
|
+
})[];
|
|
118
|
+
operationType?: undefined;
|
|
119
|
+
'fullDocument.senderId'?: undefined;
|
|
120
|
+
'fullDocument.category'?: undefined;
|
|
121
|
+
} | {
|
|
122
|
+
'fullDocument.senderId': {
|
|
123
|
+
$ne: string | null;
|
|
124
|
+
};
|
|
125
|
+
operationType?: undefined;
|
|
126
|
+
$or?: undefined;
|
|
127
|
+
'fullDocument.category'?: undefined;
|
|
128
|
+
} | {
|
|
129
|
+
'fullDocument.category': {
|
|
130
|
+
$in: string[];
|
|
131
|
+
};
|
|
132
|
+
operationType?: undefined;
|
|
133
|
+
$or?: undefined;
|
|
134
|
+
'fullDocument.senderId'?: undefined;
|
|
135
|
+
})[];
|
|
136
|
+
};
|
|
137
|
+
}[];
|
|
138
|
+
}>;
|
|
139
|
+
export declare function updateNotification(config: DepApiConfig, data: {
|
|
140
|
+
notificationId?: string;
|
|
141
|
+
action: 'read' | 'remove';
|
|
142
|
+
all?: boolean;
|
|
143
|
+
}, userId: string): Promise<{
|
|
144
|
+
success: boolean;
|
|
145
|
+
}>;
|
|
146
|
+
export declare function saveTranslation(config: DepApiConfig, data: {
|
|
147
|
+
locale: string;
|
|
148
|
+
messages: Record<string, any>;
|
|
149
|
+
}): Promise<{
|
|
150
|
+
success: boolean;
|
|
151
|
+
}>;
|
|
152
|
+
export declare function getStorageStats(config: DepApiConfig): Promise<{
|
|
153
|
+
usedMB: number;
|
|
154
|
+
totalMB: number;
|
|
155
|
+
availableMB: number;
|
|
156
|
+
percent: number;
|
|
157
|
+
unit: string;
|
|
158
|
+
error?: undefined;
|
|
159
|
+
} | {
|
|
160
|
+
usedMB: number;
|
|
161
|
+
totalMB: number;
|
|
162
|
+
percent: number;
|
|
163
|
+
error: string;
|
|
164
|
+
availableMB?: undefined;
|
|
165
|
+
unit?: undefined;
|
|
166
|
+
}>;
|
|
167
|
+
export declare function getMediaStats(config: DepApiConfig): Promise<{
|
|
168
|
+
totalSizeMB: number;
|
|
169
|
+
fileCount: number;
|
|
170
|
+
} | {
|
|
171
|
+
totalSizeMB: string;
|
|
172
|
+
fileCount: number;
|
|
173
|
+
}>;
|
|
174
|
+
export declare function getVersion(): Promise<{
|
|
175
|
+
version: string;
|
|
176
|
+
}>;
|
|
177
|
+
export declare function getDeploymentStatus(config: DepApiConfig): Promise<any>;
|
|
178
|
+
export declare function triggerDeployment(config: DepApiConfig, signature: string, payload?: any): Promise<{
|
|
179
|
+
message: string;
|
|
180
|
+
}>;
|
|
181
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAYvC,wBAAsB,KAAK,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,GAAG;;;;;;;;;;;GAc9D;AAMD,wBAAsB,cAAc,CAChC,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EACvD,MAAM,CAAC,EAAE,MAAM;;;GAkClB;AAED,wBAAsB,YAAY,CAAC,MAAM,EAAE,YAAY,mEAQtD;AAED,wBAAsB,cAAc,CAChC,MAAM,EAAE,YAAY,EACpB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;;GAS3B;AAED,wBAAsB,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM;;GAKpE;AAMD,wBAAsB,WAAW,CAAC,MAAM,EAAE,YAAY,eAKrD;AAED,wBAAsB,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG;;GAenE;AAED,wBAAsB,kB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