@bernierllc/contentful-suite 1.1.3 → 1.3.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.
Files changed (41) hide show
  1. package/dist/ContentfulSuite.js +9 -3
  2. package/dist/ContentfulSuite.js.map +1 -1
  3. package/dist/__tests__/errors.test.d.ts +2 -0
  4. package/dist/__tests__/errors.test.d.ts.map +1 -0
  5. package/dist/__tests__/errors.test.js +34 -0
  6. package/dist/__tests__/errors.test.js.map +1 -0
  7. package/dist/errors.d.ts +12 -0
  8. package/dist/errors.d.ts.map +1 -0
  9. package/dist/errors.js +25 -0
  10. package/dist/errors.js.map +1 -0
  11. package/dist/index.d.ts +1 -0
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +4 -1
  14. package/dist/index.js.map +1 -1
  15. package/dist/storage/InMemoryContentStorage.js +3 -5
  16. package/dist/storage/InMemoryContentStorage.js.map +1 -1
  17. package/dist/storage/InMemoryMigrationStorage.js +1 -3
  18. package/dist/storage/InMemoryMigrationStorage.js.map +1 -1
  19. package/dist/storage/InMemorySyncStateStorage.js +1 -3
  20. package/dist/storage/InMemorySyncStateStorage.js.map +1 -1
  21. package/package.json +22 -18
  22. package/.eslintrc.cjs +0 -16
  23. package/CHANGELOG.md +0 -170
  24. package/__mocks__/@bernierllc/contentful-cache-service.ts +0 -12
  25. package/__mocks__/@bernierllc/contentful-gateway-service.ts +0 -21
  26. package/__mocks__/@bernierllc/contentful-migration-service.ts +0 -13
  27. package/__mocks__/@bernierllc/contentful-sync-service.ts +0 -14
  28. package/__mocks__/@bernierllc/contentful-webhook-service.ts +0 -15
  29. package/__mocks__/@bernierllc/logger.ts +0 -27
  30. package/__mocks__/@bernierllc/neverhub-adapter.ts +0 -17
  31. package/jest.config.cjs +0 -44
  32. package/src/ContentfulSuite.ts +0 -415
  33. package/src/__tests__/ContentfulSuite.test.ts +0 -424
  34. package/src/__tests__/storage.test.ts +0 -405
  35. package/src/index.ts +0 -60
  36. package/src/storage/InMemoryContentStorage.ts +0 -103
  37. package/src/storage/InMemoryMigrationStorage.ts +0 -73
  38. package/src/storage/InMemorySyncStateStorage.ts +0 -42
  39. package/src/storage/index.ts +0 -11
  40. package/src/types.ts +0 -158
  41. package/tsconfig.json +0 -21
package/src/types.ts DELETED
@@ -1,158 +0,0 @@
1
- /*
2
- Copyright (c) 2025 Bernier LLC
3
-
4
- This file is licensed to the client under a limited-use license.
5
- The client may use and modify this code *only within the scope of the project it was delivered for*.
6
- Redistribution or use in other products or commercial offerings is not permitted without written consent from Bernier LLC.
7
- */
8
-
9
- import type { TokenStorage } from '@bernierllc/contentful-auth';
10
- import type { ContentStorage, SyncStateStorage } from '@bernierllc/contentful-sync-service';
11
- import type { MigrationStorage } from '@bernierllc/contentful-migration-service';
12
-
13
- /**
14
- * OAuth configuration for Contentful
15
- */
16
- export interface OAuthConfig {
17
- clientId: string;
18
- clientSecret: string;
19
- redirectUri: string;
20
- }
21
-
22
- /**
23
- * Space configuration
24
- */
25
- export interface SpaceConfig {
26
- spaceId: string;
27
- environmentId: string;
28
- accessToken: string;
29
- }
30
-
31
- /**
32
- * Gateway configuration
33
- */
34
- export interface GatewayConfig {
35
- enabled: boolean;
36
- port: number;
37
- apiKeys: string[];
38
- }
39
-
40
- /**
41
- * Sync configuration
42
- */
43
- export interface SyncConfig {
44
- enabled: boolean;
45
- interval?: number;
46
- spaces: SpaceConfig[];
47
- }
48
-
49
- /**
50
- * Webhooks configuration
51
- */
52
- export interface WebhooksConfig {
53
- enabled: boolean;
54
- port: number;
55
- secret: string;
56
- }
57
-
58
- /**
59
- * Cache configuration
60
- */
61
- export interface CacheConfig {
62
- enabled: boolean;
63
- backend: 'redis' | 'memory';
64
- ttl: number;
65
- }
66
-
67
- /**
68
- * Migration configuration
69
- */
70
- export interface MigrationConfig {
71
- enabled: boolean;
72
- }
73
-
74
- /**
75
- * Storage configuration
76
- */
77
- export interface StorageConfig {
78
- /**
79
- * Token storage for OAuth tokens (required if gateway enabled)
80
- */
81
- tokenStorage?: TokenStorage;
82
-
83
- /**
84
- * Content storage for synced content (required if sync enabled)
85
- */
86
- contentStorage?: ContentStorage;
87
-
88
- /**
89
- * Sync state storage for sync tokens (required if sync enabled)
90
- */
91
- syncStateStorage?: SyncStateStorage;
92
-
93
- /**
94
- * Migration storage for migration history (required if migrations enabled)
95
- */
96
- migrationStorage?: MigrationStorage;
97
- }
98
-
99
- /**
100
- * Complete Contentful Suite configuration
101
- */
102
- export interface ContentfulSuiteConfig {
103
- /**
104
- * OAuth configuration for Contentful API authentication
105
- */
106
- oauth: OAuthConfig;
107
-
108
- /**
109
- * API gateway configuration
110
- */
111
- gateway: GatewayConfig;
112
-
113
- /**
114
- * Content sync configuration
115
- */
116
- sync: SyncConfig;
117
-
118
- /**
119
- * Webhook receiving configuration
120
- */
121
- webhooks: WebhooksConfig;
122
-
123
- /**
124
- * Response caching configuration
125
- */
126
- cache: CacheConfig;
127
-
128
- /**
129
- * Migration configuration
130
- */
131
- migration: MigrationConfig;
132
-
133
- /**
134
- * Storage implementations
135
- */
136
- storage: StorageConfig;
137
- }
138
-
139
- /**
140
- * Suite service status
141
- */
142
- export interface ServiceStatus {
143
- gateway: boolean;
144
- sync: boolean;
145
- webhooks: boolean;
146
- cache: boolean;
147
- migration: boolean;
148
- neverhub: boolean;
149
- }
150
-
151
- /**
152
- * Suite health status
153
- */
154
- export interface SuiteHealth {
155
- status: 'ok' | 'degraded' | 'down';
156
- timestamp: string;
157
- services: ServiceStatus;
158
- }
package/tsconfig.json DELETED
@@ -1,21 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "lib": ["ES2020"],
5
- "module": "commonjs",
6
- "moduleResolution": "node",
7
- "outDir": "./dist",
8
- "rootDir": "./src",
9
- "declaration": true,
10
- "declarationMap": true,
11
- "sourceMap": true,
12
- "strict": true,
13
- "esModuleInterop": true,
14
- "skipLibCheck": true,
15
- "forceConsistentCasingInFileNames": true,
16
- "resolveJsonModule": true,
17
- "downlevelIteration": true
18
- },
19
- "include": ["src/**/*", "src/__tests__/**/*.ts"],
20
- "exclude": ["node_modules", "dist"]
21
- }