|
1 | 1 | /** |
2 | | - * Type definitions for centralized error messages and warnings |
| 2 | + * Centralized error messages and warnings for the DataSync MongoDB SDK |
| 3 | + * This file contains all user-facing messages for consistency and maintainability |
3 | 4 | */ |
4 | | - |
5 | 5 | export declare const ErrorMessages: { |
6 | | - readonly INVALID_MONGODB_URI: (uri: any) => string; |
7 | | - readonly INVALID_DBNAME: string; |
8 | | - readonly INVALID_ASCENDING_PARAMS: string; |
9 | | - readonly INVALID_DESCENDING_PARAMS: string; |
10 | | - readonly INVALID_LANGUAGE_PARAMS: string; |
11 | | - readonly INVALID_AND_PARAMS: string; |
12 | | - readonly INVALID_OR_PARAMS: string; |
13 | | - readonly INVALID_LESSTHAN_PARAMS: string; |
14 | | - readonly INVALID_LESSTHAN_OR_EQUAL_PARAMS: string; |
15 | | - readonly INVALID_GREATERTHAN_PARAMS: string; |
16 | | - readonly INVALID_GREATERTHAN_OR_EQUAL_PARAMS: string; |
17 | | - readonly INVALID_NOTEQUAL_PARAMS: string; |
18 | | - readonly INVALID_CONTAINED_IN_PARAMS: string; |
19 | | - readonly INVALID_NOT_CONTAINED_IN_PARAMS: string; |
20 | | - readonly INVALID_EXISTS_PARAMS: string; |
21 | | - readonly INVALID_NOT_EXISTS_PARAMS: string; |
22 | | - readonly MISSING_CONTENT_TYPE_UID: string; |
23 | | - readonly MISSING_CONTENT_TYPE_FOR_ENTRY: string; |
24 | | - readonly MISSING_CONTENT_TYPE_FOR_ENTRIES: string; |
25 | | - readonly INVALID_LIMIT_VALUE: string; |
26 | | - readonly INVALID_SKIP_VALUE: string; |
27 | | - readonly INVALID_ONLY_PARAMS: string; |
28 | | - readonly INVALID_EXCEPT_PARAMS: string; |
29 | | - readonly INVALID_REGEX_PARAMS: string; |
30 | | - readonly INVALID_TAGS_PARAMS: string; |
31 | | - readonly INVALID_WHERE_PARAMS: string; |
32 | | - readonly INVALID_QUERY_REFERENCES_PARAMS: string; |
33 | | - readonly INVALID_INCLUDE_PARAMS: string; |
34 | | - readonly INVALID_QUERY: string; |
35 | | - readonly INVALID_QUERIES: string; |
| 6 | + readonly INVALID_MONGODB_URI: (uri: any) => string; |
| 7 | + readonly INVALID_DBNAME: "Content store dbName should be of type string and not empty"; |
| 8 | + readonly INVALID_ASCENDING_PARAMS: "Invalid parameters for .ascending(). Expected a valid string field name"; |
| 9 | + readonly INVALID_DESCENDING_PARAMS: "Invalid parameters for .descending(). Expected a valid string field name"; |
| 10 | + readonly INVALID_LANGUAGE_PARAMS: "Invalid parameters for .language(). Expected a valid language code string"; |
| 11 | + readonly INVALID_AND_PARAMS: "Invalid parameters for .and(). Expected an array of query objects"; |
| 12 | + readonly INVALID_OR_PARAMS: "Invalid parameters for .or(). Expected an array of query objects"; |
| 13 | + readonly INVALID_LESSTHAN_PARAMS: "Invalid key or value parameters for .lessThan(). Expected a string key and a value"; |
| 14 | + readonly INVALID_LESSTHAN_OR_EQUAL_PARAMS: "Invalid key or value parameters for .lessThanOrEqualTo(). Expected a string key and a value"; |
| 15 | + readonly INVALID_GREATERTHAN_PARAMS: "Invalid key or value parameters for .greaterThan(). Expected a string key and a value"; |
| 16 | + readonly INVALID_GREATERTHAN_OR_EQUAL_PARAMS: "Invalid key or value parameters for .greaterThanOrEqualTo(). Expected a string key and a value"; |
| 17 | + readonly INVALID_NOTEQUAL_PARAMS: "Invalid key or value parameters for .notEqualTo(). Expected a string key and a value"; |
| 18 | + readonly INVALID_CONTAINED_IN_PARAMS: "Invalid key or value parameters for .containedIn(). Expected a string key and an array value"; |
| 19 | + readonly INVALID_NOT_CONTAINED_IN_PARAMS: "Invalid key or value parameters for .notContainedIn(). Expected a string key and an array value"; |
| 20 | + readonly INVALID_EXISTS_PARAMS: "Invalid key parameter for .exists(). Expected a valid string field name"; |
| 21 | + readonly INVALID_NOT_EXISTS_PARAMS: "Invalid key parameter for .notExists(). Expected a valid string field name"; |
| 22 | + readonly MISSING_CONTENT_TYPE_UID: "Content type UID is required. Please provide a valid content type UID"; |
| 23 | + readonly MISSING_CONTENT_TYPE_FOR_ENTRY: "Please call .contentType() before .entry()"; |
| 24 | + readonly MISSING_CONTENT_TYPE_FOR_ENTRIES: "Please call .contentType() before .entries()"; |
| 25 | + readonly INVALID_LIMIT_VALUE: "Invalid value for .limit(). Expected a positive numeric value"; |
| 26 | + readonly INVALID_SKIP_VALUE: "Invalid value for .skip(). Expected a non-negative numeric value"; |
| 27 | + readonly INVALID_ONLY_PARAMS: "Invalid field values for .only(). Expected a non-empty array of field names"; |
| 28 | + readonly INVALID_EXCEPT_PARAMS: "Invalid field values for .except(). Expected a non-empty array of field names"; |
| 29 | + readonly INVALID_REGEX_PARAMS: "Invalid field or pattern parameters for .regex(). Expected string values for both field and pattern"; |
| 30 | + readonly INVALID_TAGS_PARAMS: "Invalid field values for .tags(). Expected an array of tag values"; |
| 31 | + readonly INVALID_WHERE_PARAMS: "Invalid expression for .where(). Expected a valid expression or function"; |
| 32 | + readonly INVALID_QUERY_REFERENCES_PARAMS: "Invalid query object for .queryReferences(). Expected a valid query object"; |
| 33 | + readonly INVALID_INCLUDE_PARAMS: "Invalid reference field path for .include(). Expected a valid string or array of strings"; |
| 34 | + readonly INVALID_QUERY: "Invalid query provided. Please ensure your query is properly formatted"; |
| 35 | + readonly INVALID_QUERIES: "Invalid queries provided. Please ensure all queries are properly formatted"; |
36 | 36 | }; |
37 | | - |
38 | 37 | export declare const WarningMessages: { |
39 | | - readonly SLOW_INCLUDE_REFERENCES: string; |
| 38 | + readonly SLOW_INCLUDE_REFERENCES: ".includeReferences(...) is a relatively slow query. Consider limiting the depth or using .include() for specific references"; |
40 | 39 | }; |
41 | | - |
0 commit comments