strapi-plugin-timeline 0.0.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.
@@ -0,0 +1,269 @@
1
+ declare const _default: {
2
+ register: ({ strapi }: {
3
+ strapi: import('@strapi/types/dist/core').Strapi;
4
+ }) => void;
5
+ bootstrap: ({ strapi }: {
6
+ strapi: import('@strapi/types/dist/core').Strapi;
7
+ }) => Promise<void>;
8
+ destroy: ({ strapi }: {
9
+ strapi: import('@strapi/types/dist/core').Strapi;
10
+ }) => void;
11
+ config: {
12
+ default: {};
13
+ validator(): void;
14
+ };
15
+ controllers: {
16
+ controller: ({ strapi }: {
17
+ strapi: import('@strapi/types/dist/core').Strapi;
18
+ }) => {
19
+ index(ctx: any): void;
20
+ };
21
+ settings: ({ strapi }: {
22
+ strapi: import('@strapi/types/dist/core').Strapi;
23
+ }) => {
24
+ getSettings(ctx: any): Promise<void>;
25
+ setSettings(ctx: any): Promise<void>;
26
+ getContentTypes(ctx: any): Promise<void>;
27
+ };
28
+ timeline: ({ strapi }: {
29
+ strapi: import('@strapi/types/dist/core').Strapi;
30
+ }) => {
31
+ find(ctx: any): Promise<void>;
32
+ findByDocument(ctx: any): Promise<any>;
33
+ getUsers(ctx: any): Promise<void>;
34
+ getLocales(ctx: any): Promise<void>;
35
+ deleteAll(ctx: any): Promise<void>;
36
+ clean(ctx: any): Promise<any>;
37
+ snapshotBeforeRestore(ctx: any): Promise<any>;
38
+ };
39
+ schedule: ({ strapi }: {
40
+ strapi: import('@strapi/types/dist/core').Strapi;
41
+ }) => {
42
+ getStatus(ctx: any): Promise<void>;
43
+ runCleanup(ctx: any): Promise<void>;
44
+ updateSchedule(ctx: any): Promise<void>;
45
+ };
46
+ };
47
+ routes: {
48
+ 'content-api': () => {
49
+ type: string;
50
+ routes: {
51
+ method: string;
52
+ path: string;
53
+ handler: string;
54
+ config: {
55
+ policies: any[];
56
+ };
57
+ }[];
58
+ };
59
+ admin: () => {
60
+ type: string;
61
+ routes: {
62
+ method: string;
63
+ path: string;
64
+ handler: string;
65
+ config: {
66
+ policies: (string | {
67
+ name: string;
68
+ config: {
69
+ actions: string[];
70
+ };
71
+ })[];
72
+ };
73
+ }[];
74
+ };
75
+ };
76
+ services: {
77
+ service: ({ strapi }: {
78
+ strapi: import('@strapi/types/dist/core').Strapi;
79
+ }) => {
80
+ getWelcomeMessage(): string;
81
+ };
82
+ settings: ({ strapi }: {
83
+ strapi: import('@strapi/types/dist/core').Strapi;
84
+ }) => {
85
+ getSettings(): Promise<import('./services/settings').TimelineSettings>;
86
+ setSettings(data: {
87
+ contentTypeConfigs: Record<string, import('./services/settings').ContentTypeConfig>;
88
+ }): Promise<any>;
89
+ updateScheduleConfig(data: {
90
+ cleanupEnabled?: boolean;
91
+ cleanupCron?: string;
92
+ }): Promise<any>;
93
+ updateCleanupResults(data: {
94
+ lastCleanupAt: string;
95
+ lastCleanupResults: Record<string, any>;
96
+ }): Promise<any>;
97
+ getContentTypes(): Promise<{
98
+ uid: string;
99
+ displayName: any;
100
+ kind: any;
101
+ }[]>;
102
+ };
103
+ timeline: ({ strapi }: {
104
+ strapi: import('@strapi/types/dist/core').Strapi;
105
+ }) => {
106
+ createSnapshot(params: {
107
+ action: "create" | "update" | "delete" | "publish" | "clean" | "restore";
108
+ contentType: string;
109
+ entryDocumentId: string;
110
+ content: any;
111
+ contentTypeSchema?: any;
112
+ userId?: number | string | null;
113
+ userName?: string | null;
114
+ locale?: string | null;
115
+ }): Promise<any>;
116
+ findEntries(params: {
117
+ contentType?: string | string[];
118
+ entryDocumentId?: string;
119
+ userId?: string | string[];
120
+ action?: string | string[];
121
+ locale?: string | string[];
122
+ dateFrom?: string;
123
+ dateTo?: string;
124
+ sort?: string;
125
+ sortOrder?: "asc" | "desc";
126
+ page?: number;
127
+ pageSize?: number;
128
+ }): Promise<{
129
+ results: any[];
130
+ pagination: {
131
+ page: number;
132
+ pageSize: number;
133
+ total: number;
134
+ pageCount: number;
135
+ };
136
+ }>;
137
+ getDistinctUsers(): Promise<{
138
+ userId: any;
139
+ userName: any;
140
+ }[]>;
141
+ getDistinctLocales(): Promise<string[]>;
142
+ findByDocumentId(contentType: string, entryDocumentId: string): Promise<any[]>;
143
+ deleteAll(): Promise<void>;
144
+ deleteByContentTypes(contentTypes: string[]): Promise<number>;
145
+ enforceEntriesLimit(contentType: string): Promise<void>;
146
+ deleteByAge(contentType: string, cutoffDate: Date): Promise<number>;
147
+ };
148
+ schedule: ({ strapi }: {
149
+ strapi: import('@strapi/types/dist/core').Strapi;
150
+ }) => {
151
+ getStatus(): Promise<{
152
+ cleanupEnabled: any;
153
+ cleanupCron: any;
154
+ lastCleanupAt: any;
155
+ lastCleanupResults: any;
156
+ durationsConfigured: Record<string, {
157
+ durationLimit: number;
158
+ durationUnit: string;
159
+ displayName?: string;
160
+ }>;
161
+ }>;
162
+ runCleanup(): Promise<Record<string, {
163
+ deleted: number;
164
+ }>>;
165
+ };
166
+ };
167
+ contentTypes: {
168
+ 'timeline-setting': {
169
+ schema: {
170
+ kind: string;
171
+ collectionName: string;
172
+ info: {
173
+ singularName: string;
174
+ pluralName: string;
175
+ displayName: string;
176
+ };
177
+ pluginOptions: {
178
+ "content-manager": {
179
+ visible: boolean;
180
+ };
181
+ "content-type-builder": {
182
+ visible: boolean;
183
+ };
184
+ };
185
+ options: {
186
+ draftAndPublish: boolean;
187
+ };
188
+ attributes: {
189
+ trackedContentTypes: {
190
+ type: string;
191
+ default: any[];
192
+ };
193
+ contentTypeConfigs: {
194
+ type: string;
195
+ default: {};
196
+ };
197
+ cleanupEnabled: {
198
+ type: string;
199
+ default: boolean;
200
+ };
201
+ cleanupCron: {
202
+ type: string;
203
+ default: string;
204
+ };
205
+ lastCleanupAt: {
206
+ type: string;
207
+ };
208
+ lastCleanupResults: {
209
+ type: string;
210
+ };
211
+ };
212
+ };
213
+ };
214
+ 'timeline-entry': {
215
+ schema: {
216
+ kind: string;
217
+ collectionName: string;
218
+ info: {
219
+ singularName: string;
220
+ pluralName: string;
221
+ displayName: string;
222
+ };
223
+ pluginOptions: {
224
+ "content-manager": {
225
+ visible: boolean;
226
+ };
227
+ "content-type-builder": {
228
+ visible: boolean;
229
+ };
230
+ };
231
+ options: {
232
+ draftAndPublish: boolean;
233
+ };
234
+ attributes: {
235
+ action: {
236
+ type: string;
237
+ required: boolean;
238
+ };
239
+ contentType: {
240
+ type: string;
241
+ required: boolean;
242
+ };
243
+ entryDocumentId: {
244
+ type: string;
245
+ required: boolean;
246
+ };
247
+ content: {
248
+ type: string;
249
+ };
250
+ userId: {
251
+ type: string;
252
+ };
253
+ userName: {
254
+ type: string;
255
+ };
256
+ locale: {
257
+ type: string;
258
+ };
259
+ contentTypeSchema: {
260
+ type: string;
261
+ };
262
+ };
263
+ };
264
+ };
265
+ };
266
+ policies: {};
267
+ middlewares: {};
268
+ };
269
+ export default _default;
package/package.json ADDED
@@ -0,0 +1,103 @@
1
+ {
2
+ "version": "0.0.0",
3
+ "keywords": [
4
+ "strapi",
5
+ "strapi-plugin",
6
+ "strapi5",
7
+ "timeline",
8
+ "history",
9
+ "audit-log",
10
+ "version-control",
11
+ "restore",
12
+ "content-versioning"
13
+ ],
14
+ "type": "commonjs",
15
+ "exports": {
16
+ "./package.json": "./package.json",
17
+ "./strapi-admin": {
18
+ "types": "./dist/admin/src/index.d.ts",
19
+ "source": "./admin/src/index.ts",
20
+ "import": "./dist/admin/index.mjs",
21
+ "require": "./dist/admin/index.js",
22
+ "default": "./dist/admin/index.js"
23
+ },
24
+ "./strapi-server": {
25
+ "types": "./dist/server/src/index.d.ts",
26
+ "source": "./server/src/index.ts",
27
+ "import": "./dist/server/index.mjs",
28
+ "require": "./dist/server/index.js",
29
+ "default": "./dist/server/index.js"
30
+ }
31
+ },
32
+ "files": [
33
+ "dist"
34
+ ],
35
+ "scripts": {
36
+ "build": "strapi-plugin build",
37
+ "watch": "strapi-plugin watch",
38
+ "watch:link": "strapi-plugin watch:link",
39
+ "verify": "strapi-plugin verify",
40
+ "test:ts:front": "run -T tsc -p admin/tsconfig.json",
41
+ "test:ts:back": "run -T tsc -p server/tsconfig.json"
42
+ },
43
+ "dependencies": {
44
+ "@strapi/blocks-react-renderer": "^1.0.2",
45
+ "@strapi/design-system": "^2.0.0-rc.30",
46
+ "@strapi/icons": "^2.0.0-rc.30",
47
+ "react-intl": "^7.1.11",
48
+ "react-markdown": "^9.1.0",
49
+ "remark-gfm": "^4.0.1"
50
+ },
51
+ "devDependencies": {
52
+ "@strapi/sdk-plugin": "^6.0.1",
53
+ "@strapi/strapi": "^5.39.0",
54
+ "@strapi/typescript-utils": "^5.39.0",
55
+ "@types/react": "^19.2.14",
56
+ "@types/react-dom": "^19.2.3",
57
+ "prettier": "^3.8.1",
58
+ "react": "^18.3.1",
59
+ "react-dom": "^18.3.1",
60
+ "react-router-dom": "^6.30.3",
61
+ "styled-components": "^6.3.11",
62
+ "typescript": "^5.9.3"
63
+ },
64
+ "peerDependencies": {
65
+ "@strapi/sdk-plugin": "^5.4.0",
66
+ "@strapi/strapi": "^5.39.0",
67
+ "react": "^18.3.1",
68
+ "react-dom": "^18.3.1",
69
+ "react-router-dom": "^6.30.3",
70
+ "styled-components": "^6.3.11"
71
+ },
72
+ "strapi": {
73
+ "kind": "plugin",
74
+ "name": "timeline",
75
+ "displayName": "Timeline",
76
+ "description": "Content history and version control plugin for Strapi 5"
77
+ },
78
+ "name": "strapi-plugin-timeline",
79
+ "description": "Content history and version control plugin for Strapi 5. Track changes, browse history, compare diffs, and restore previous versions.",
80
+ "license": "MIT",
81
+ "homepage": "https://github.com/patiparnne/strapi-plugin-timeline#readme",
82
+ "repository": {
83
+ "type": "git",
84
+ "url": "git+https://github.com/patiparnne/strapi-plugin-timeline.git"
85
+ },
86
+ "bugs": {
87
+ "url": "https://github.com/patiparnne/strapi-plugin-timeline/issues"
88
+ },
89
+ "author": {
90
+ "name": "Patiparnne Vongchompue",
91
+ "email": "patiparnne@gmail.com"
92
+ },
93
+ "funding": [
94
+ {
95
+ "type": "buymeacoffee",
96
+ "url": "https://buymeacoffee.com/patiparnne"
97
+ },
98
+ {
99
+ "type": "patreon",
100
+ "url": "https://www.patreon.com/patiparnne"
101
+ }
102
+ ]
103
+ }