Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/datasync-filesystem-sdk",
"version": "1.5.0",
"version": "1.5.1",
"description": "JavaScript filesystem SDK to query data synced via @contentstack/datasync-content-store-filesystem",
"main": "dist/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* MIT Licensed
*/
import { Stack } from './stack';
export { ERROR_MESSAGES, WARNING_MESSAGES } from './messages';
interface IUserConfig {
contentStore?: {
baseDir?: string;
Expand Down Expand Up @@ -53,4 +54,3 @@ export declare class Contentstack {
*/
static Stack(stackArguments: any): Stack;
}
export {};
104 changes: 104 additions & 0 deletions typings/messages.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/*!
* Contentstack DataSync Filesystem SDK.
* Centralized error and warning messages
* Copyright (c) Contentstack LLC
* MIT Licensed
*/
/**
* Centralized error and warning messages for the SDK
* This file contains all user-facing messages to ensure consistency and ease of maintenance
*/
export declare const ERROR_MESSAGES: {
/**
* Error when a key does not exist on a data object
* @param key - The key that was not found
* @param data - The data object that was searched
*/
KEY_NOT_FOUND: (key: string, data: any) => string;
/**
* Error for invalid parameters in comparison operators
*/
INVALID_COMPARISON_PARAMS: (type: string) => string;
/**
* Error for invalid parameters in contained operators
*/
INVALID_CONTAINED_PARAMS: (bool: boolean) => string;
/**
* Error for invalid parameters in exists operators
*/
INVALID_EXISTS_PARAMS: (bool: boolean) => string;
/**
* Error for invalid parameters in sort methods
*/
INVALID_SORT_PARAMS: (type: string) => string;
/**
* Error when argument should be a number
*/
ARGUMENT_SHOULD_BE_NUMBER: () => string;
/**
* Error when content type uid is not provided
*/
CONTENT_TYPE_UID_REQUIRED: () => string;
/**
* Error when contentType() is not called before entries()
*/
CONTENT_TYPE_REQUIRED_BEFORE_ENTRIES: () => string;
/**
* Error when content type is not found at path
*/
CONTENT_TYPE_NOT_FOUND: (contentTypeUid: string, filePath: string) => string;
/**
* Error for invalid parameters in equalTo()
*/
INVALID_EQUAL_TO_PARAMS: () => string;
/**
* Error for invalid parameters in where()
*/
INVALID_WHERE_PARAMS: () => string;
/**
* Error for invalid parameters in query()
*/
INVALID_QUERY_PARAMS: () => string;
/**
* Error for invalid parameters in tags()
*/
INVALID_TAGS_PARAMS: () => string;
/**
* Error when language code is invalid
*/
INVALID_LANGUAGE_CODE: (languageCode: any) => string;
/**
* Error for invalid parameters in include()
*/
INVALID_INCLUDE_PARAMS: () => string;
/**
* Error for invalid parameters in regex()
*/
INVALID_REGEX_PARAMS: () => string;
/**
* Error for invalid parameters in only()
*/
INVALID_ONLY_PARAMS: () => string;
/**
* Error for invalid parameters in except()
*/
INVALID_EXCEPT_PARAMS: () => string;
/**
* Error for invalid parameters in queryReferences()
*/
INVALID_QUERY_REFERENCES_PARAMS: () => string;
/**
* Error for invalid parameters in referenceDepth()
*/
INVALID_REFERENCE_DEPTH_PARAMS: () => string;
};
export declare const WARNING_MESSAGES: {
/**
* Warning for slow .includeReferences() query
*/
INCLUDE_REFERENCES_SLOW: () => string;
/**
* Warning when increasing reference depth beyond default
*/
REFERENCE_DEPTH_PERFORMANCE: (referenceDepth: number) => string;
};
Loading