@bernierllc/contentful-cma-client 1.0.2

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/src/index.ts ADDED
@@ -0,0 +1,16 @@
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
+ export { ContentfulCMAClient } from './ContentfulCMAClient';
10
+ export {
11
+ CMAQueryOptions,
12
+ CMAEntryCreateOptions,
13
+ CMAEntryUpdateOptions,
14
+ CMAAssetCreateOptions,
15
+ CMABulkOperationResult
16
+ } from './types';
package/src/types.ts ADDED
@@ -0,0 +1,51 @@
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
+ /**
10
+ * Query options for CMA operations
11
+ */
12
+ export interface CMAQueryOptions {
13
+ skip?: number;
14
+ limit?: number;
15
+ order?: string;
16
+ locale?: string;
17
+ content_type?: string;
18
+ [key: string]: string | number | undefined;
19
+ }
20
+
21
+ /**
22
+ * Options for creating entries
23
+ */
24
+ export interface CMAEntryCreateOptions {
25
+ entryId?: string;
26
+ }
27
+
28
+ /**
29
+ * Options for updating entries
30
+ */
31
+ export interface CMAEntryUpdateOptions {
32
+ locale?: string;
33
+ }
34
+
35
+ /**
36
+ * Options for creating assets
37
+ */
38
+ export interface CMAAssetCreateOptions {
39
+ assetId?: string;
40
+ }
41
+
42
+ /**
43
+ * Result of bulk operations
44
+ */
45
+ export interface CMABulkOperationResult<T> {
46
+ successful: T[];
47
+ failed: Array<{
48
+ item: unknown;
49
+ error: string;
50
+ }>;
51
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "module": "commonjs",
5
+ "lib": ["ES2020"],
6
+ "declaration": true,
7
+ "outDir": "./dist",
8
+ "rootDir": "./src",
9
+ "strict": true,
10
+ "noImplicitAny": true,
11
+ "strictNullChecks": true,
12
+ "strictFunctionTypes": true,
13
+ "strictBindCallApply": true,
14
+ "strictPropertyInitialization": true,
15
+ "noImplicitThis": true,
16
+ "alwaysStrict": true,
17
+ "noUnusedLocals": true,
18
+ "noUnusedParameters": true,
19
+ "noImplicitReturns": true,
20
+ "noFallthroughCasesInSwitch": true,
21
+ "esModuleInterop": true,
22
+ "skipLibCheck": true,
23
+ "forceConsistentCasingInFileNames": true,
24
+ "resolveJsonModule": true,
25
+ "moduleResolution": "node"
26
+ },
27
+ "include": ["src/**/*"],
28
+ "exclude": ["node_modules", "dist", "**/*.test.ts", "**/__tests__/**"]
29
+ }