@lokalise/api-common
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -30,2 +30,16 @@ import z from 'zod'; | ||
export type MandatoryPaginationParams = z.infer<typeof MANDATORY_PAGINATION_CONFIG_SCHEMA>; | ||
/** | ||
* Offset pagination should be used when sorting by non-unique column | ||
*/ | ||
export declare const OFFSET_PAGINATION_CONFIG_SCHEMA: z.ZodObject<{ | ||
skip: z.ZodOptional<z.ZodNumber>; | ||
limit: z.ZodOptional<z.ZodNumber>; | ||
}, "strip", z.ZodTypeAny, { | ||
skip?: number | undefined; | ||
limit?: number | undefined; | ||
}, { | ||
skip?: number | undefined; | ||
limit?: number | undefined; | ||
}>; | ||
export type OffsetPaginationParams = z.infer<typeof OFFSET_PAGINATION_CONFIG_SCHEMA>; | ||
export declare const zMeta: z.ZodObject<{ | ||
@@ -32,0 +46,0 @@ count: z.ZodNumber; |
@@ -9,5 +9,8 @@ import t from "zod"; | ||
}), e = t.object({ | ||
skip: t.number().int().gt(0).optional(), | ||
limit: t.number().int().gt(0).optional() | ||
}), r = t.object({ | ||
count: t.number(), | ||
cursor: t.string().optional().describe("Pagination cursor, a last item id from this result set") | ||
}), r = t.object({ | ||
}), s = t.object({ | ||
message: t.string(), | ||
@@ -18,7 +21,8 @@ errorCode: t.string(), | ||
export { | ||
r as COMMON_ERROR_RESPONSE_SCHEMA, | ||
s as COMMON_ERROR_RESPONSE_SCHEMA, | ||
n as MANDATORY_PAGINATION_CONFIG_SCHEMA, | ||
e as OFFSET_PAGINATION_CONFIG_SCHEMA, | ||
o as OPTIONAL_PAGINATION_CONFIG_SCHEMA, | ||
e as zMeta | ||
r as zMeta | ||
}; | ||
//# sourceMappingURL=apiSchemas.js.map |
export * from './apiSchemas'; | ||
export * from './paginationUtils'; | ||
export * from './typeUtils'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,11 +0,15 @@ | ||
import { COMMON_ERROR_RESPONSE_SCHEMA as N, MANDATORY_PAGINATION_CONFIG_SCHEMA as _, OPTIONAL_PAGINATION_CONFIG_SCHEMA as e, zMeta as t } from "./apiSchemas.js"; | ||
import { COMMON_ERROR_RESPONSE_SCHEMA as N, MANDATORY_PAGINATION_CONFIG_SCHEMA as t, OFFSET_PAGINATION_CONFIG_SCHEMA as _, OPTIONAL_PAGINATION_CONFIG_SCHEMA as r, zMeta as e } from "./apiSchemas.js"; | ||
import { getMetaFor as E, getPaginatedEntries as I } from "./paginationUtils.js"; | ||
import { isAutopilotError as C, isObject as S } from "./typeUtils.js"; | ||
export { | ||
N as COMMON_ERROR_RESPONSE_SCHEMA, | ||
_ as MANDATORY_PAGINATION_CONFIG_SCHEMA, | ||
e as OPTIONAL_PAGINATION_CONFIG_SCHEMA, | ||
t as MANDATORY_PAGINATION_CONFIG_SCHEMA, | ||
_ as OFFSET_PAGINATION_CONFIG_SCHEMA, | ||
r as OPTIONAL_PAGINATION_CONFIG_SCHEMA, | ||
E as getMetaFor, | ||
I as getPaginatedEntries, | ||
t as zMeta | ||
C as isAutopilotError, | ||
S as isObject, | ||
e as zMeta | ||
}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@lokalise/api-common", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"files": [ | ||
@@ -39,9 +39,11 @@ "dist" | ||
"@lokalise/package-vite-config": "*", | ||
"prettier": "3.1.0", | ||
"@lokalise/node-core": "^9.0.0", | ||
"@vitest/coverage-v8": "^1.1.3", | ||
"prettier": "3.2.2", | ||
"rimraf": "^5.0.1", | ||
"typescript": "5.3.2", | ||
"vite": "^4.4.11", | ||
"vitest": "^0.34.6" | ||
"typescript": "5.3.3", | ||
"vite": "^5.0.11", | ||
"vitest": "^1.2.1" | ||
}, | ||
"prettier": "@lokalise/prettier-config" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
18209
20
168
11
10