@bernierllc/contentful-suite 1.3.5 → 1.3.7
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/ContentfulSuite.d.ts +85 -0
- package/dist/ContentfulSuite.d.ts.map +1 -0
- package/dist/ContentfulSuite.js +358 -0
- package/dist/ContentfulSuite.js.map +1 -0
- package/dist/__tests__/ContentfulSuite.test.d.ts +2 -0
- package/dist/__tests__/ContentfulSuite.test.d.ts.map +1 -0
- package/dist/__tests__/ContentfulSuite.test.js +347 -0
- package/dist/__tests__/ContentfulSuite.test.js.map +1 -0
- package/dist/__tests__/errors.test.d.ts +2 -0
- package/dist/__tests__/errors.test.d.ts.map +1 -0
- package/dist/__tests__/errors.test.js +34 -0
- package/dist/__tests__/errors.test.js.map +1 -0
- package/dist/__tests__/storage.test.d.ts +2 -0
- package/dist/__tests__/storage.test.d.ts.map +1 -0
- package/dist/__tests__/storage.test.js +343 -0
- package/dist/__tests__/storage.test.js.map +1 -0
- package/dist/errors.d.ts +12 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +25 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +48 -0
- package/dist/index.js.map +1 -0
- package/dist/storage/InMemoryContentStorage.d.ts +41 -0
- package/dist/storage/InMemoryContentStorage.d.ts.map +1 -0
- package/dist/storage/InMemoryContentStorage.js +86 -0
- package/dist/storage/InMemoryContentStorage.js.map +1 -0
- package/dist/storage/InMemoryMigrationStorage.d.ts +21 -0
- package/dist/storage/InMemoryMigrationStorage.d.ts.map +1 -0
- package/dist/storage/InMemoryMigrationStorage.js +59 -0
- package/dist/storage/InMemoryMigrationStorage.js.map +1 -0
- package/dist/storage/InMemorySyncStateStorage.d.ts +19 -0
- package/dist/storage/InMemorySyncStateStorage.d.ts.map +1 -0
- package/dist/storage/InMemorySyncStateStorage.js +39 -0
- package/dist/storage/InMemorySyncStateStorage.js.map +1 -0
- package/dist/storage/index.d.ts +4 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +17 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/types.d.ts +131 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +10 -0
- package/dist/types.js.map +1 -0
- package/package.json +15 -15
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { MigrationStorage, MigrationRecord } from '@bernierllc/contentful-migration-service';
|
|
2
|
+
/**
|
|
3
|
+
* In-memory implementation of MigrationStorage for testing and simple use cases
|
|
4
|
+
*/
|
|
5
|
+
export declare class InMemoryMigrationStorage implements MigrationStorage {
|
|
6
|
+
private migrations;
|
|
7
|
+
saveMigration(record: MigrationRecord): Promise<void>;
|
|
8
|
+
getMigration(id: string): Promise<MigrationRecord | null>;
|
|
9
|
+
getMigrations(spaceId: string, environmentId: string): Promise<MigrationRecord[]>;
|
|
10
|
+
hasMigration(id: string, spaceId: string, environmentId: string): Promise<boolean>;
|
|
11
|
+
updateMigrationStatus(id: string, status: MigrationRecord['status'], error?: string, duration?: number): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Get all migrations (for debugging)
|
|
14
|
+
*/
|
|
15
|
+
getAllMigrations(): MigrationRecord[];
|
|
16
|
+
/**
|
|
17
|
+
* Clear all migrations
|
|
18
|
+
*/
|
|
19
|
+
clearAll(): void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=InMemoryMigrationStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InMemoryMigrationStorage.d.ts","sourceRoot":"","sources":["../../src/storage/InMemoryMigrationStorage.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAElG;;GAEG;AACH,qBAAa,wBAAyB,YAAW,gBAAgB;IAC/D,OAAO,CAAC,UAAU,CAA2C;IAEvD,aAAa,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAIrD,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;IAIzD,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAMjF,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAUlF,qBAAqB,CACzB,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,EACjC,KAAK,CAAC,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC;IAchB;;OAEG;IACH,gBAAgB,IAAI,eAAe,EAAE;IAIrC;;OAEG;IACH,QAAQ,IAAI,IAAI;CAGjB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
Copyright (c) 2025 Bernier LLC
|
|
4
|
+
|
|
5
|
+
This file is licensed to the client under a limited-use license.
|
|
6
|
+
The client may use and modify this code *only within the scope of the project it was delivered for*.
|
|
7
|
+
Redistribution or use in other products or commercial offerings is not permitted without written consent from Bernier LLC.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.InMemoryMigrationStorage = void 0;
|
|
11
|
+
/**
|
|
12
|
+
* In-memory implementation of MigrationStorage for testing and simple use cases
|
|
13
|
+
*/
|
|
14
|
+
class InMemoryMigrationStorage {
|
|
15
|
+
migrations = new Map();
|
|
16
|
+
async saveMigration(record) {
|
|
17
|
+
this.migrations.set(record.id, record);
|
|
18
|
+
}
|
|
19
|
+
async getMigration(id) {
|
|
20
|
+
return this.migrations.get(id) || null;
|
|
21
|
+
}
|
|
22
|
+
async getMigrations(spaceId, environmentId) {
|
|
23
|
+
return Array.from(this.migrations.values()).filter((m) => m.spaceId === spaceId && m.environmentId === environmentId);
|
|
24
|
+
}
|
|
25
|
+
async hasMigration(id, spaceId, environmentId) {
|
|
26
|
+
const migration = this.migrations.get(id);
|
|
27
|
+
return (migration !== undefined &&
|
|
28
|
+
migration.spaceId === spaceId &&
|
|
29
|
+
migration.environmentId === environmentId &&
|
|
30
|
+
migration.status === 'completed');
|
|
31
|
+
}
|
|
32
|
+
async updateMigrationStatus(id, status, error, duration) {
|
|
33
|
+
const migration = this.migrations.get(id);
|
|
34
|
+
if (migration) {
|
|
35
|
+
migration.status = status;
|
|
36
|
+
if (error !== undefined) {
|
|
37
|
+
migration.error = error;
|
|
38
|
+
}
|
|
39
|
+
if (duration !== undefined) {
|
|
40
|
+
migration.duration = duration;
|
|
41
|
+
}
|
|
42
|
+
this.migrations.set(id, migration);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Get all migrations (for debugging)
|
|
47
|
+
*/
|
|
48
|
+
getAllMigrations() {
|
|
49
|
+
return Array.from(this.migrations.values());
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Clear all migrations
|
|
53
|
+
*/
|
|
54
|
+
clearAll() {
|
|
55
|
+
this.migrations.clear();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.InMemoryMigrationStorage = InMemoryMigrationStorage;
|
|
59
|
+
//# sourceMappingURL=InMemoryMigrationStorage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InMemoryMigrationStorage.js","sourceRoot":"","sources":["../../src/storage/InMemoryMigrationStorage.ts"],"names":[],"mappings":";AAAA;;;;;;EAME;;;AAIF;;GAEG;AACH,MAAa,wBAAwB;IAC3B,UAAU,GAAiC,IAAI,GAAG,EAAE,CAAC;IAE7D,KAAK,CAAC,aAAa,CAAC,MAAuB;QACzC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM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,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9C,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;CACF;AA3DD,4DA2DC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SyncStateStorage } from '@bernierllc/contentful-sync-service';
|
|
2
|
+
/**
|
|
3
|
+
* In-memory implementation of SyncStateStorage for testing and simple use cases
|
|
4
|
+
*/
|
|
5
|
+
export declare class InMemorySyncStateStorage implements SyncStateStorage {
|
|
6
|
+
private tokens;
|
|
7
|
+
getSyncToken(spaceId: string): Promise<string | null>;
|
|
8
|
+
setSyncToken(spaceId: string, token: string): Promise<void>;
|
|
9
|
+
clearSyncToken(spaceId: string): Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* Get all tokens (for debugging)
|
|
12
|
+
*/
|
|
13
|
+
getAllTokens(): Record<string, string>;
|
|
14
|
+
/**
|
|
15
|
+
* Clear all tokens
|
|
16
|
+
*/
|
|
17
|
+
clearAll(): void;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=InMemorySyncStateStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InMemorySyncStateStorage.d.ts","sourceRoot":"","sources":["../../src/storage/InMemorySyncStateStorage.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAE5E;;GAEG;AACH,qBAAa,wBAAyB,YAAW,gBAAgB;IAC/D,OAAO,CAAC,MAAM,CAAkC;IAE1C,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAIrD,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3D,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIpD;;OAEG;IACH,YAAY,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAItC;;OAEG;IACH,QAAQ,IAAI,IAAI;CAGjB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
Copyright (c) 2025 Bernier LLC
|
|
4
|
+
|
|
5
|
+
This file is licensed to the client under a limited-use license.
|
|
6
|
+
The client may use and modify this code *only within the scope of the project it was delivered for*.
|
|
7
|
+
Redistribution or use in other products or commercial offerings is not permitted without written consent from Bernier LLC.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.InMemorySyncStateStorage = void 0;
|
|
11
|
+
/**
|
|
12
|
+
* In-memory implementation of SyncStateStorage for testing and simple use cases
|
|
13
|
+
*/
|
|
14
|
+
class InMemorySyncStateStorage {
|
|
15
|
+
tokens = new Map();
|
|
16
|
+
async getSyncToken(spaceId) {
|
|
17
|
+
return this.tokens.get(spaceId) || null;
|
|
18
|
+
}
|
|
19
|
+
async setSyncToken(spaceId, token) {
|
|
20
|
+
this.tokens.set(spaceId, token);
|
|
21
|
+
}
|
|
22
|
+
async clearSyncToken(spaceId) {
|
|
23
|
+
this.tokens.delete(spaceId);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Get all tokens (for debugging)
|
|
27
|
+
*/
|
|
28
|
+
getAllTokens() {
|
|
29
|
+
return Object.fromEntries(this.tokens);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Clear all tokens
|
|
33
|
+
*/
|
|
34
|
+
clearAll() {
|
|
35
|
+
this.tokens.clear();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.InMemorySyncStateStorage = InMemorySyncStateStorage;
|
|
39
|
+
//# sourceMappingURL=InMemorySyncStateStorage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InMemorySyncStateStorage.js","sourceRoot":"","sources":["../../src/storage/InMemorySyncStateStorage.ts"],"names":[],"mappings":";AAAA;;;;;;EAME;;;AAIF;;GAEG;AACH,MAAa,wBAAwB;IAC3B,MAAM,GAAwB,IAAI,GAAG,EAAE,CAAC;IAEhD,KAAK,CAAC,YAAY,CAAC,OAAe;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC;IAC1C,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,OAAe,EAAE,KAAa;QAC/C,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,OAAe;QAClC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,YAAY;QACV,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;CACF;AA5BD,4DA4BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
Copyright (c) 2025 Bernier LLC
|
|
4
|
+
|
|
5
|
+
This file is licensed to the client under a limited-use license.
|
|
6
|
+
The client may use and modify this code *only within the scope of the project it was delivered for*.
|
|
7
|
+
Redistribution or use in other products or commercial offerings is not permitted without written consent from Bernier LLC.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.InMemoryMigrationStorage = exports.InMemorySyncStateStorage = exports.InMemoryContentStorage = void 0;
|
|
11
|
+
var InMemoryContentStorage_1 = require("./InMemoryContentStorage");
|
|
12
|
+
Object.defineProperty(exports, "InMemoryContentStorage", { enumerable: true, get: function () { return InMemoryContentStorage_1.InMemoryContentStorage; } });
|
|
13
|
+
var InMemorySyncStateStorage_1 = require("./InMemorySyncStateStorage");
|
|
14
|
+
Object.defineProperty(exports, "InMemorySyncStateStorage", { enumerable: true, get: function () { return InMemorySyncStateStorage_1.InMemorySyncStateStorage; } });
|
|
15
|
+
var InMemoryMigrationStorage_1 = require("./InMemoryMigrationStorage");
|
|
16
|
+
Object.defineProperty(exports, "InMemoryMigrationStorage", { enumerable: true, get: function () { return InMemoryMigrationStorage_1.InMemoryMigrationStorage; } });
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":";AAAA;;;;;;EAME;;;AAEF,mEAAkE;AAAzD,gIAAA,sBAAsB,OAAA;AAC/B,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AACjC,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import type { TokenStorage } from '@bernierllc/contentful-auth';
|
|
2
|
+
import type { ContentStorage, SyncStateStorage } from '@bernierllc/contentful-sync-service';
|
|
3
|
+
import type { MigrationStorage } from '@bernierllc/contentful-migration-service';
|
|
4
|
+
/**
|
|
5
|
+
* OAuth configuration for Contentful
|
|
6
|
+
*/
|
|
7
|
+
export interface OAuthConfig {
|
|
8
|
+
clientId: string;
|
|
9
|
+
clientSecret: string;
|
|
10
|
+
redirectUri: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Space configuration
|
|
14
|
+
*/
|
|
15
|
+
export interface SpaceConfig {
|
|
16
|
+
spaceId: string;
|
|
17
|
+
environmentId: string;
|
|
18
|
+
accessToken: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Gateway configuration
|
|
22
|
+
*/
|
|
23
|
+
export interface GatewayConfig {
|
|
24
|
+
enabled: boolean;
|
|
25
|
+
port: number;
|
|
26
|
+
apiKeys: string[];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Sync configuration
|
|
30
|
+
*/
|
|
31
|
+
export interface SyncConfig {
|
|
32
|
+
enabled: boolean;
|
|
33
|
+
interval?: number;
|
|
34
|
+
spaces: SpaceConfig[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Webhooks configuration
|
|
38
|
+
*/
|
|
39
|
+
export interface WebhooksConfig {
|
|
40
|
+
enabled: boolean;
|
|
41
|
+
port: number;
|
|
42
|
+
secret: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Cache configuration
|
|
46
|
+
*/
|
|
47
|
+
export interface CacheConfig {
|
|
48
|
+
enabled: boolean;
|
|
49
|
+
backend: 'redis' | 'memory';
|
|
50
|
+
ttl: number;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Migration configuration
|
|
54
|
+
*/
|
|
55
|
+
export interface MigrationConfig {
|
|
56
|
+
enabled: boolean;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Storage configuration
|
|
60
|
+
*/
|
|
61
|
+
export interface StorageConfig {
|
|
62
|
+
/**
|
|
63
|
+
* Token storage for OAuth tokens (required if gateway enabled)
|
|
64
|
+
*/
|
|
65
|
+
tokenStorage?: TokenStorage;
|
|
66
|
+
/**
|
|
67
|
+
* Content storage for synced content (required if sync enabled)
|
|
68
|
+
*/
|
|
69
|
+
contentStorage?: ContentStorage;
|
|
70
|
+
/**
|
|
71
|
+
* Sync state storage for sync tokens (required if sync enabled)
|
|
72
|
+
*/
|
|
73
|
+
syncStateStorage?: SyncStateStorage;
|
|
74
|
+
/**
|
|
75
|
+
* Migration storage for migration history (required if migrations enabled)
|
|
76
|
+
*/
|
|
77
|
+
migrationStorage?: MigrationStorage;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Complete Contentful Suite configuration
|
|
81
|
+
*/
|
|
82
|
+
export interface ContentfulSuiteConfig {
|
|
83
|
+
/**
|
|
84
|
+
* OAuth configuration for Contentful API authentication
|
|
85
|
+
*/
|
|
86
|
+
oauth: OAuthConfig;
|
|
87
|
+
/**
|
|
88
|
+
* API gateway configuration
|
|
89
|
+
*/
|
|
90
|
+
gateway: GatewayConfig;
|
|
91
|
+
/**
|
|
92
|
+
* Content sync configuration
|
|
93
|
+
*/
|
|
94
|
+
sync: SyncConfig;
|
|
95
|
+
/**
|
|
96
|
+
* Webhook receiving configuration
|
|
97
|
+
*/
|
|
98
|
+
webhooks: WebhooksConfig;
|
|
99
|
+
/**
|
|
100
|
+
* Response caching configuration
|
|
101
|
+
*/
|
|
102
|
+
cache: CacheConfig;
|
|
103
|
+
/**
|
|
104
|
+
* Migration configuration
|
|
105
|
+
*/
|
|
106
|
+
migration: MigrationConfig;
|
|
107
|
+
/**
|
|
108
|
+
* Storage implementations
|
|
109
|
+
*/
|
|
110
|
+
storage: StorageConfig;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Suite service status
|
|
114
|
+
*/
|
|
115
|
+
export interface ServiceStatus {
|
|
116
|
+
gateway: boolean;
|
|
117
|
+
sync: boolean;
|
|
118
|
+
webhooks: boolean;
|
|
119
|
+
cache: boolean;
|
|
120
|
+
migration: boolean;
|
|
121
|
+
neverhub: boolean;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Suite health status
|
|
125
|
+
*/
|
|
126
|
+
export interface SuiteHealth {
|
|
127
|
+
status: 'ok' | 'degraded' | 'down';
|
|
128
|
+
timestamp: string;
|
|
129
|
+
services: ServiceStatus;
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAC5F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAEjF;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OA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
|
|
5
|
+
This file is licensed to the client under a limited-use license.
|
|
6
|
+
The client may use and modify this code *only within the scope of the project it was delivered for*.
|
|
7
|
+
Redistribution or use in other products or commercial offerings is not permitted without written consent from Bernier LLC.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;EAME"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bernierllc/contentful-suite",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
4
4
|
"description": "Complete Contentful integration suite with ML training pipeline, headless CMS proxy, and content syndication",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,22 +23,22 @@
|
|
|
23
23
|
"license": "SEE LICENSE IN LICENSE",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@bernierllc/config-manager": "^1.4.0",
|
|
26
|
-
"@bernierllc/contentful-
|
|
27
|
-
"@bernierllc/contentful-
|
|
28
|
-
"@bernierllc/contentful-cda-client": "^1.5.
|
|
29
|
-
"@bernierllc/contentful-
|
|
30
|
-
"@bernierllc/contentful-client
|
|
31
|
-
"@bernierllc/contentful-export-adapter": "^1.5.
|
|
32
|
-
"@bernierllc/contentful-gateway-service": "^1.6.
|
|
33
|
-
"@bernierllc/contentful-graphql-client": "^1.5.
|
|
26
|
+
"@bernierllc/contentful-auth": "^1.3.3",
|
|
27
|
+
"@bernierllc/contentful-cache-service": "^1.5.0",
|
|
28
|
+
"@bernierllc/contentful-cda-client": "^1.5.3",
|
|
29
|
+
"@bernierllc/contentful-client-core": "^1.5.3",
|
|
30
|
+
"@bernierllc/contentful-cma-client": "^1.3.3",
|
|
31
|
+
"@bernierllc/contentful-export-adapter": "^1.5.3",
|
|
32
|
+
"@bernierllc/contentful-gateway-service": "^1.6.4",
|
|
33
|
+
"@bernierllc/contentful-graphql-client": "^1.5.3",
|
|
34
|
+
"@bernierllc/contentful-migration-service": "^1.6.4",
|
|
34
35
|
"@bernierllc/contentful-rich-text": "^1.3.0",
|
|
35
|
-
"@bernierllc/contentful-sync-service": "^1.4.
|
|
36
|
-
"@bernierllc/contentful-webhook-handler": "^1.3.2",
|
|
36
|
+
"@bernierllc/contentful-sync-service": "^1.4.5",
|
|
37
37
|
"@bernierllc/contentful-types": "^1.5.0",
|
|
38
|
-
"@bernierllc/contentful-webhook-
|
|
39
|
-
"@bernierllc/
|
|
40
|
-
"@bernierllc/
|
|
41
|
-
"@bernierllc/
|
|
38
|
+
"@bernierllc/contentful-webhook-handler": "^1.3.3",
|
|
39
|
+
"@bernierllc/contentful-webhook-service": "^1.4.5",
|
|
40
|
+
"@bernierllc/logger": "^2.0.1",
|
|
41
|
+
"@bernierllc/neverhub-adapter": "^0.4.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/jest": "^29.5.0",
|