@antibusy/strapi-plugin-timeline 0.1.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,271 @@
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
+ isTimelineConfigured: boolean;
102
+ isTimelineEnabled: boolean;
103
+ }[]>;
104
+ };
105
+ timeline: ({ strapi }: {
106
+ strapi: import('@strapi/types/dist/core').Strapi;
107
+ }) => {
108
+ createSnapshot(params: {
109
+ action: "create" | "update" | "delete" | "publish" | "clean" | "restore";
110
+ contentType: string;
111
+ entryDocumentId: string;
112
+ content: any;
113
+ contentTypeSchema?: any;
114
+ userId?: number | string | null;
115
+ userName?: string | null;
116
+ locale?: string | null;
117
+ }): Promise<any>;
118
+ findEntries(params: {
119
+ contentType?: string | string[];
120
+ entryDocumentId?: string;
121
+ userId?: string | string[];
122
+ action?: string | string[];
123
+ locale?: string | string[];
124
+ dateFrom?: string;
125
+ dateTo?: string;
126
+ sort?: string;
127
+ sortOrder?: "asc" | "desc";
128
+ page?: number;
129
+ pageSize?: number;
130
+ }): Promise<{
131
+ results: any[];
132
+ pagination: {
133
+ page: number;
134
+ pageSize: number;
135
+ total: number;
136
+ pageCount: number;
137
+ };
138
+ }>;
139
+ getDistinctUsers(): Promise<{
140
+ userId: any;
141
+ userName: any;
142
+ }[]>;
143
+ getDistinctLocales(): Promise<string[]>;
144
+ findByDocumentId(contentType: string, entryDocumentId: string): Promise<any[]>;
145
+ deleteAll(): Promise<void>;
146
+ deleteByContentTypes(contentTypes: string[]): Promise<number>;
147
+ enforceEntriesLimit(contentType: string): Promise<void>;
148
+ deleteByAge(contentType: string, cutoffDate: Date): Promise<number>;
149
+ };
150
+ schedule: ({ strapi }: {
151
+ strapi: import('@strapi/types/dist/core').Strapi;
152
+ }) => {
153
+ getStatus(): Promise<{
154
+ cleanupEnabled: any;
155
+ cleanupCron: any;
156
+ lastCleanupAt: any;
157
+ lastCleanupResults: any;
158
+ durationsConfigured: Record<string, {
159
+ durationLimit: number;
160
+ durationUnit: string;
161
+ displayName?: string;
162
+ }>;
163
+ }>;
164
+ runCleanup(): Promise<Record<string, {
165
+ deleted: number;
166
+ }>>;
167
+ };
168
+ };
169
+ contentTypes: {
170
+ 'timeline-setting': {
171
+ schema: {
172
+ kind: string;
173
+ collectionName: string;
174
+ info: {
175
+ singularName: string;
176
+ pluralName: string;
177
+ displayName: string;
178
+ };
179
+ pluginOptions: {
180
+ "content-manager": {
181
+ visible: boolean;
182
+ };
183
+ "content-type-builder": {
184
+ visible: boolean;
185
+ };
186
+ };
187
+ options: {
188
+ draftAndPublish: boolean;
189
+ };
190
+ attributes: {
191
+ trackedContentTypes: {
192
+ type: string;
193
+ default: any[];
194
+ };
195
+ contentTypeConfigs: {
196
+ type: string;
197
+ default: {};
198
+ };
199
+ cleanupEnabled: {
200
+ type: string;
201
+ default: boolean;
202
+ };
203
+ cleanupCron: {
204
+ type: string;
205
+ default: string;
206
+ };
207
+ lastCleanupAt: {
208
+ type: string;
209
+ };
210
+ lastCleanupResults: {
211
+ type: string;
212
+ };
213
+ };
214
+ };
215
+ };
216
+ 'timeline-entry': {
217
+ schema: {
218
+ kind: string;
219
+ collectionName: string;
220
+ info: {
221
+ singularName: string;
222
+ pluralName: string;
223
+ displayName: string;
224
+ };
225
+ pluginOptions: {
226
+ "content-manager": {
227
+ visible: boolean;
228
+ };
229
+ "content-type-builder": {
230
+ visible: boolean;
231
+ };
232
+ };
233
+ options: {
234
+ draftAndPublish: boolean;
235
+ };
236
+ attributes: {
237
+ action: {
238
+ type: string;
239
+ required: boolean;
240
+ };
241
+ contentType: {
242
+ type: string;
243
+ required: boolean;
244
+ };
245
+ entryDocumentId: {
246
+ type: string;
247
+ required: boolean;
248
+ };
249
+ content: {
250
+ type: string;
251
+ };
252
+ userId: {
253
+ type: string;
254
+ };
255
+ userName: {
256
+ type: string;
257
+ };
258
+ locale: {
259
+ type: string;
260
+ };
261
+ contentTypeSchema: {
262
+ type: string;
263
+ };
264
+ };
265
+ };
266
+ };
267
+ };
268
+ policies: {};
269
+ middlewares: {};
270
+ };
271
+ export default _default;
package/package.json ADDED
@@ -0,0 +1,113 @@
1
+ {
2
+ "version": "0.1.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
+ "react-markdown": "^9.1.0",
45
+ "remark-gfm": "^4.0.1"
46
+ },
47
+ "devDependencies": {
48
+ "@strapi/sdk-plugin": "^6.0.1",
49
+ "@strapi/strapi": "^5.39.0",
50
+ "@strapi/typescript-utils": "^5.39.0",
51
+ "@types/react": "^19.2.14",
52
+ "@types/react-dom": "^19.2.3",
53
+ "prettier": "^3.8.1",
54
+ "react": "^18.3.1",
55
+ "react-dom": "^18.3.1",
56
+ "react-router-dom": "^6.30.3",
57
+ "styled-components": "^6.0.0",
58
+ "typescript": "^5.9.3"
59
+ },
60
+ "peerDependencies": {
61
+ "@strapi/blocks-react-renderer": "^1.0.0",
62
+ "@strapi/design-system": ">=2.0.0-rc.11 <3.0.0",
63
+ "@strapi/icons": ">=2.0.0-rc.11 <3.0.0",
64
+ "@strapi/strapi": ">=5.0.0 <6.0.0",
65
+ "react": "^17.0.0 || ^18.0.0",
66
+ "react-dom": "^17.0.0 || ^18.0.0",
67
+ "react-intl": "^6.6.2 || ^7.0.0",
68
+ "react-router-dom": "^6.0.0",
69
+ "styled-components": "^6.0.0"
70
+ },
71
+ "peerDependenciesMeta": {
72
+ "@strapi/blocks-react-renderer": {
73
+ "optional": true
74
+ },
75
+ "@strapi/design-system": {
76
+ "optional": true
77
+ },
78
+ "@strapi/icons": {
79
+ "optional": true
80
+ },
81
+ "react-intl": {
82
+ "optional": true
83
+ }
84
+ },
85
+ "strapi": {
86
+ "kind": "plugin",
87
+ "name": "timeline",
88
+ "displayName": "Timeline",
89
+ "description": "Content history and version control plugin for Strapi 5"
90
+ },
91
+ "name": "@antibusy/strapi-plugin-timeline",
92
+ "description": "Content history and version control plugin for Strapi 5. Track changes, browse history, compare diffs, and restore previous versions.",
93
+ "license": "MIT",
94
+ "homepage": "https://github.com/antibusy/strapi-plugin-timeline#readme",
95
+ "repository": {
96
+ "type": "git",
97
+ "url": "git+https://github.com/antibusy/strapi-plugin-timeline.git"
98
+ },
99
+ "bugs": {
100
+ "url": "https://github.com/antibusy/strapi-plugin-timeline/issues"
101
+ },
102
+ "author": "anti•busy <antibusy@gmail.com>",
103
+ "funding": [
104
+ {
105
+ "type": "patreon",
106
+ "url": "https://www.patreon.com/patiparnne"
107
+ },
108
+ {
109
+ "type": "buy-me-a-coffee",
110
+ "url": "https://buymeacoffee.com/patiparnne"
111
+ }
112
+ ]
113
+ }