@vivlab/api-database
Advanced tools
Comparing version 1.0.50 to 1.0.51
@@ -29,8 +29,8 @@ "use strict"; | ||
const plainCore = redis_1.default.createStorePlain({ | ||
table: "core", | ||
table: "vivlab-core:base", | ||
schema: { | ||
type: "object", | ||
properties: { | ||
free_monthly_amount: { type: ["integer", "null"], minimum: 0 }, | ||
free_yearly_amount: { type: ["integer", "null"], minimum: 0 }, | ||
free_monthly_key: { type: ["string", "null"] }, | ||
free_yearly_key: { type: ["string", "null"] }, | ||
free_capability_ecommerce: { type: ["boolean", "null"] }, | ||
@@ -41,4 +41,4 @@ free_usage_page: { type: ["integer", "null"], minimum: 0 }, | ||
free_usage_facet: { type: ["integer", "null"], minimum: 0 }, | ||
site_monthly_amount: { type: ["integer", "null"], minimum: 0 }, | ||
site_yearly_amount: { type: ["integer", "null"], minimum: 0 }, | ||
site_monthly_key: { type: ["string", "null"] }, | ||
site_yearly_key: { type: ["string", "null"] }, | ||
site_capability_ecommerce: { type: ["boolean", "null"] }, | ||
@@ -49,4 +49,4 @@ site_usage_page: { type: ["integer", "null"], minimum: 0 }, | ||
site_usage_facet: { type: ["integer", "null"], minimum: 0 }, | ||
eshop_monthly_amount: { type: ["integer", "null"], minimum: 0 }, | ||
eshop_yearly_amount: { type: ["integer", "null"], minimum: 0 }, | ||
eshop_monthly_key: { type: ["string", "null"] }, | ||
eshop_yearly_key: { type: ["string", "null"] }, | ||
eshop_capability_ecommerce: { type: ["boolean", "null"] }, | ||
@@ -57,4 +57,4 @@ eshop_usage_page: { type: ["integer", "null"], minimum: 0 }, | ||
eshop_usage_facet: { type: ["integer", "null"], minimum: 0 }, | ||
ecommerce_monthly_amount: { type: ["integer", "null"], minimum: 0 }, | ||
ecommerce_yearly_amount: { type: ["integer", "null"], minimum: 0 }, | ||
ecommerce_monthly_key: { type: ["string", "null"] }, | ||
ecommerce_yearly_key: { type: ["string", "null"] }, | ||
ecommerce_capability_ecommerce: { type: ["boolean", "null"] }, | ||
@@ -65,4 +65,4 @@ ecommerce_usage_page: { type: ["integer", "null"], minimum: 0 }, | ||
ecommerce_usage_facet: { type: ["integer", "null"], minimum: 0 }, | ||
premium_monthly_amount: { type: ["integer", "null"], minimum: 0 }, | ||
premium_yearly_amount: { type: ["integer", "null"], minimum: 0 }, | ||
premium_monthly_key: { type: ["string", "null"] }, | ||
premium_yearly_key: { type: ["string", "null"] }, | ||
premium_capability_ecommerce: { type: ["boolean", "null"] }, | ||
@@ -69,0 +69,0 @@ premium_usage_page: { type: ["integer", "null"], minimum: 0 }, |
@@ -5,4 +5,8 @@ export declare type Plan = "free" | "site" | "eshop" | "ecommerce" | "premium"; | ||
plan: { | ||
monthly: number; | ||
yearly: number; | ||
monthly: { | ||
key: string; | ||
}; | ||
yearly: { | ||
key: string; | ||
}; | ||
}; | ||
@@ -21,4 +25,4 @@ capability: { | ||
export interface RedisData { | ||
free_monthly_amount: number; | ||
free_yearly_amount: number; | ||
free_monthly_key: string; | ||
free_yearly_key: string; | ||
free_capability_ecommerce: boolean; | ||
@@ -29,4 +33,4 @@ free_usage_page: number; | ||
free_usage_facet: number; | ||
site_monthly_amount: number; | ||
site_yearly_amount: number; | ||
site_monthly_key: string; | ||
site_yearly_key: string; | ||
site_capability_ecommerce: boolean; | ||
@@ -37,4 +41,4 @@ site_usage_page: number; | ||
site_usage_facet: number; | ||
eshop_monthly_amount: number; | ||
eshop_yearly_amount: number; | ||
eshop_monthly_key: string; | ||
eshop_yearly_key: string; | ||
eshop_capability_ecommerce: boolean; | ||
@@ -45,4 +49,4 @@ eshop_usage_page: number; | ||
eshop_usage_facet: number; | ||
ecommerce_monthly_amount: number; | ||
ecommerce_yearly_amount: number; | ||
ecommerce_monthly_key: string; | ||
ecommerce_yearly_key: string; | ||
ecommerce_capability_ecommerce: boolean; | ||
@@ -53,4 +57,4 @@ ecommerce_usage_page: number; | ||
ecommerce_usage_facet: number; | ||
premium_monthly_amount: number; | ||
premium_yearly_amount: number; | ||
premium_monthly_key: string; | ||
premium_yearly_key: string; | ||
premium_capability_ecommerce: boolean; | ||
@@ -57,0 +61,0 @@ premium_usage_page: number; |
@@ -10,4 +10,4 @@ "use strict"; | ||
plan: { | ||
monthly: data[`${name}_monthly_amount`], | ||
yearly: data[`${name}_yearly_amount`] | ||
monthly: { key: data[`${name}_monthly_key`] }, | ||
yearly: { key: data[`${name}_yearly_key`] } | ||
}, | ||
@@ -29,4 +29,4 @@ capability: { | ||
return Object.fromEntries(plans.flatMap(name => [ | ||
[[`${name}_monthly_amount`], data?.[name]?.plan?.monthly], | ||
[[`${name}_yearly_amount`], data?.[name]?.plan?.yearly], | ||
[[`${name}_monthly_key`], data?.[name]?.plan?.monthly.key], | ||
[[`${name}_yearly_key`], data?.[name]?.plan?.yearly.key], | ||
[[`${name}_capability_ecommerce`], data?.[name]?.capability?.ecommerce], | ||
@@ -33,0 +33,0 @@ [[`${name}_usage_page`], data?.[name]?.usage?.page], |
@@ -7,5 +7,6 @@ "use strict"; | ||
port: process.env.REDIS_PORT || 6379, | ||
retry_strategy: () => 1000 | ||
retry_strategy: () => 1000, | ||
enableAutoPipelining: true | ||
}); | ||
exports.default = client; | ||
//# sourceMappingURL=redis.js.map |
{ | ||
"name": "@vivlab/api-database", | ||
"version": "1.0.50", | ||
"version": "1.0.51", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
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
6428
396373