Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@redis/time-series

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@redis/time-series - npm Package Compare versions

Comparing version 2.0.0-next.1 to 2.0.0-next.2

16

dist/lib/commands/ADD.js

@@ -1,3 +0,5 @@

import { transformTimestampArgument, pushRetentionArgument, pushEncodingArgument, pushChunkSizeArgument, pushLabelsArgument } from '.';
export default {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const _1 = require(".");
exports.default = {
FIRST_KEY_INDEX: 1,

@@ -9,12 +11,12 @@ IS_READ_ONLY: false,

key,
transformTimestampArgument(timestamp),
(0, _1.transformTimestampArgument)(timestamp),
value.toString()
];
pushRetentionArgument(args, options?.RETENTION);
pushEncodingArgument(args, options?.ENCODING);
pushChunkSizeArgument(args, options?.CHUNK_SIZE);
(0, _1.pushRetentionArgument)(args, options?.RETENTION);
(0, _1.pushEncodingArgument)(args, options?.ENCODING);
(0, _1.pushChunkSizeArgument)(args, options?.CHUNK_SIZE);
if (options?.ON_DUPLICATE) {
args.push('ON_DUPLICATE', options.ON_DUPLICATE);
}
pushLabelsArgument(args, options?.LABELS);
(0, _1.pushLabelsArgument)(args, options?.LABELS);
return args;

@@ -21,0 +23,0 @@ },

@@ -1,3 +0,5 @@

import { pushRetentionArgument, pushChunkSizeArgument, pushDuplicatePolicy, pushLabelsArgument } from '.';
export default {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const _1 = require(".");
exports.default = {
FIRST_KEY_INDEX: 1,

@@ -7,6 +9,6 @@ IS_READ_ONLY: false,

const args = ['TS.ALTER', key];
pushRetentionArgument(args, options?.RETENTION);
pushChunkSizeArgument(args, options?.CHUNK_SIZE);
pushDuplicatePolicy(args, options?.DUPLICATE_POLICY);
pushLabelsArgument(args, options?.LABELS);
(0, _1.pushRetentionArgument)(args, options?.RETENTION);
(0, _1.pushChunkSizeArgument)(args, options?.CHUNK_SIZE);
(0, _1.pushDuplicatePolicy)(args, options?.DUPLICATE_POLICY);
(0, _1.pushLabelsArgument)(args, options?.LABELS);
return args;

@@ -13,0 +15,0 @@ },

@@ -1,3 +0,5 @@

import { pushRetentionArgument, pushEncodingArgument, pushChunkSizeArgument, pushDuplicatePolicy, pushLabelsArgument } from '.';
export default {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const _1 = require(".");
exports.default = {
FIRST_KEY_INDEX: 1,

@@ -7,7 +9,7 @@ IS_READ_ONLY: false,

const args = ['TS.CREATE', key];
pushRetentionArgument(args, options?.RETENTION);
pushEncodingArgument(args, options?.ENCODING);
pushChunkSizeArgument(args, options?.CHUNK_SIZE);
pushDuplicatePolicy(args, options?.DUPLICATE_POLICY);
pushLabelsArgument(args, options?.LABELS);
(0, _1.pushRetentionArgument)(args, options?.RETENTION);
(0, _1.pushEncodingArgument)(args, options?.ENCODING);
(0, _1.pushChunkSizeArgument)(args, options?.CHUNK_SIZE);
(0, _1.pushDuplicatePolicy)(args, options?.DUPLICATE_POLICY);
(0, _1.pushLabelsArgument)(args, options?.LABELS);
return args;

@@ -14,0 +16,0 @@ },

@@ -1,2 +0,1 @@

/// <reference types="node" />
import { RedisArgument, SimpleStringReply } from '@redis/client/dist/lib/RESP/types';

@@ -3,0 +2,0 @@ export declare const TIME_SERIES_AGGREGATION_TYPE: {

@@ -1,2 +0,5 @@

export const TIME_SERIES_AGGREGATION_TYPE = {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TIME_SERIES_AGGREGATION_TYPE = void 0;
exports.TIME_SERIES_AGGREGATION_TYPE = {
AVG: 'AVG',

@@ -16,3 +19,3 @@ FIRST: 'FIRST',

};
export default {
exports.default = {
FIRST_KEY_INDEX: 1,

@@ -19,0 +22,0 @@ IS_READ_ONLY: false,

@@ -1,7 +0,32 @@

import INCRBY, { transformIncrByArguments } from './INCRBY';
export default {
FIRST_KEY_INDEX: INCRBY.FIRST_KEY_INDEX,
IS_READ_ONLY: INCRBY.IS_READ_ONLY,
transformArguments: transformIncrByArguments.bind(undefined, 'TS.DECRBY'),
transformReply: INCRBY.transformReply
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const INCRBY_1 = __importStar(require("./INCRBY"));
exports.default = {
FIRST_KEY_INDEX: INCRBY_1.default.FIRST_KEY_INDEX,
IS_READ_ONLY: INCRBY_1.default.IS_READ_ONLY,
transformArguments: INCRBY_1.transformIncrByArguments.bind(undefined, 'TS.DECRBY'),
transformReply: INCRBY_1.default.transformReply
};

@@ -1,3 +0,5 @@

import { transformTimestampArgument } from '.';
export default {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const _1 = require(".");
exports.default = {
FIRST_KEY_INDEX: 1,

@@ -9,4 +11,4 @@ IS_READ_ONLY: false,

key,
transformTimestampArgument(fromTimestamp),
transformTimestampArgument(toTimestamp)
(0, _1.transformTimestampArgument)(fromTimestamp),
(0, _1.transformTimestampArgument)(toTimestamp)
];

@@ -13,0 +15,0 @@ },

@@ -1,2 +0,4 @@

export default {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
FIRST_KEY_INDEX: 1,

@@ -3,0 +5,0 @@ IS_READ_ONLY: false,

@@ -1,2 +0,4 @@

export default {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
FIRST_KEY_INDEX: 1,

@@ -3,0 +5,0 @@ IS_READ_ONLY: true,

@@ -1,3 +0,6 @@

import { transformTimestampArgument, pushRetentionArgument, pushChunkSizeArgument, pushLabelsArgument } from '.';
export function transformIncrByArguments(command, key, value, options) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformIncrByArguments = void 0;
const _1 = require(".");
function transformIncrByArguments(command, key, value, options) {
const args = [

@@ -9,13 +12,14 @@ command,

if (options?.TIMESTAMP !== undefined && options?.TIMESTAMP !== null) {
args.push('TIMESTAMP', transformTimestampArgument(options.TIMESTAMP));
args.push('TIMESTAMP', (0, _1.transformTimestampArgument)(options.TIMESTAMP));
}
pushRetentionArgument(args, options?.RETENTION);
(0, _1.pushRetentionArgument)(args, options?.RETENTION);
if (options?.UNCOMPRESSED) {
args.push('UNCOMPRESSED');
}
pushChunkSizeArgument(args, options?.CHUNK_SIZE);
pushLabelsArgument(args, options?.LABELS);
(0, _1.pushChunkSizeArgument)(args, options?.CHUNK_SIZE);
(0, _1.pushLabelsArgument)(args, options?.LABELS);
return args;
}
export default {
exports.transformIncrByArguments = transformIncrByArguments;
exports.default = {
FIRST_KEY_INDEX: 1,

@@ -22,0 +26,0 @@ IS_READ_ONLY: false,

@@ -1,42 +0,48 @@

import ADD from './ADD';
import ALTER from './ALTER';
import CREATE from './CREATE';
import CREATERULE from './CREATERULE';
import DECRBY from './DECRBY';
import DEL from './DEL';
import DELETERULE from './DELETERULE';
import GET from './GET';
import INCRBY from './INCRBY';
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.pushWithLabelsArgument = exports.transformSampleReply = exports.pushLabelsArgument = exports.transformTimestampArgument = exports.pushDuplicatePolicy = exports.TIME_SERIES_DUPLICATE_POLICIES = exports.pushChunkSizeArgument = exports.pushEncodingArgument = exports.TIME_SERIES_ENCODING = exports.pushRetentionArgument = void 0;
const ADD_1 = __importDefault(require("./ADD"));
const ALTER_1 = __importDefault(require("./ALTER"));
const CREATE_1 = __importDefault(require("./CREATE"));
const CREATERULE_1 = __importDefault(require("./CREATERULE"));
const DECRBY_1 = __importDefault(require("./DECRBY"));
const DEL_1 = __importDefault(require("./DEL"));
const DELETERULE_1 = __importDefault(require("./DELETERULE"));
const GET_1 = __importDefault(require("./GET"));
const INCRBY_1 = __importDefault(require("./INCRBY"));
// import INFO_DEBUG from './INFO_DEBUG';
// import INFO from './INFO';
import MADD from './MADD';
import MGET_WITHLABELS from './MGET_WITHLABELS';
import MGET from './MGET';
import MRANGE_WITHLABELS from './MRANGE_WITHLABELS';
import MRANGE from './MRANGE';
import MREVRANGE_WITHLABELS from './MREVRANGE_WITHLABELS';
import MREVRANGE from './MREVRANGE';
import QUERYINDEX from './QUERYINDEX';
import RANGE from './RANGE';
import REVRANGE from './REVRANGE';
import { pushVariadicArguments } from '@redis/client/dist/lib/commands/generic-transformers';
export default {
ADD,
add: ADD,
ALTER,
alter: ALTER,
CREATE,
create: CREATE,
CREATERULE,
createRule: CREATERULE,
DECRBY,
decrBy: DECRBY,
DEL,
del: DEL,
DELETERULE,
deleteRule: DELETERULE,
GET,
get: GET,
INCRBY,
incrBy: INCRBY,
const MADD_1 = __importDefault(require("./MADD"));
const MGET_WITHLABELS_1 = __importDefault(require("./MGET_WITHLABELS"));
const MGET_1 = __importDefault(require("./MGET"));
const MRANGE_WITHLABELS_1 = __importDefault(require("./MRANGE_WITHLABELS"));
const MRANGE_1 = __importDefault(require("./MRANGE"));
const MREVRANGE_WITHLABELS_1 = __importDefault(require("./MREVRANGE_WITHLABELS"));
const MREVRANGE_1 = __importDefault(require("./MREVRANGE"));
const QUERYINDEX_1 = __importDefault(require("./QUERYINDEX"));
const RANGE_1 = __importDefault(require("./RANGE"));
const REVRANGE_1 = __importDefault(require("./REVRANGE"));
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
ADD: ADD_1.default,
add: ADD_1.default,
ALTER: ALTER_1.default,
alter: ALTER_1.default,
CREATE: CREATE_1.default,
create: CREATE_1.default,
CREATERULE: CREATERULE_1.default,
createRule: CREATERULE_1.default,
DECRBY: DECRBY_1.default,
decrBy: DECRBY_1.default,
DEL: DEL_1.default,
del: DEL_1.default,
DELETERULE: DELETERULE_1.default,
deleteRule: DELETERULE_1.default,
GET: GET_1.default,
get: GET_1.default,
INCRBY: INCRBY_1.default,
incrBy: INCRBY_1.default,
// INFO_DEBUG,

@@ -46,24 +52,24 @@ // infoDebug: INFO_DEBUG,

// info: INFO,
MADD,
mAdd: MADD,
MGET_WITHLABELS,
mGetWithLabels: MGET_WITHLABELS,
MGET,
mGet: MGET,
MRANGE_WITHLABELS,
mRangeWithLabels: MRANGE_WITHLABELS,
MRANGE,
mRange: MRANGE,
MREVRANGE_WITHLABELS,
mRevRangeWithLabels: MREVRANGE_WITHLABELS,
MREVRANGE,
mRevRange: MREVRANGE,
QUERYINDEX,
queryIndex: QUERYINDEX,
RANGE,
range: RANGE,
REVRANGE,
revRange: REVRANGE
MADD: MADD_1.default,
mAdd: MADD_1.default,
MGET_WITHLABELS: MGET_WITHLABELS_1.default,
mGetWithLabels: MGET_WITHLABELS_1.default,
MGET: MGET_1.default,
mGet: MGET_1.default,
MRANGE_WITHLABELS: MRANGE_WITHLABELS_1.default,
mRangeWithLabels: MRANGE_WITHLABELS_1.default,
MRANGE: MRANGE_1.default,
mRange: MRANGE_1.default,
MREVRANGE_WITHLABELS: MREVRANGE_WITHLABELS_1.default,
mRevRangeWithLabels: MREVRANGE_WITHLABELS_1.default,
MREVRANGE: MREVRANGE_1.default,
mRevRange: MREVRANGE_1.default,
QUERYINDEX: QUERYINDEX_1.default,
queryIndex: QUERYINDEX_1.default,
RANGE: RANGE_1.default,
range: RANGE_1.default,
REVRANGE: REVRANGE_1.default,
revRange: REVRANGE_1.default
};
export function pushRetentionArgument(args, retention) {
function pushRetentionArgument(args, retention) {
if (retention !== undefined) {

@@ -73,7 +79,8 @@ args.push('RETENTION', retention.toString());

}
export const TIME_SERIES_ENCODING = {
exports.pushRetentionArgument = pushRetentionArgument;
exports.TIME_SERIES_ENCODING = {
COMPRESSED: 'COMPRESSED',
UNCOMPRESSED: 'UNCOMPRESSED'
};
export function pushEncodingArgument(args, encoding) {
function pushEncodingArgument(args, encoding) {
if (encoding !== undefined) {

@@ -83,3 +90,4 @@ args.push('ENCODING', encoding);

}
export function pushChunkSizeArgument(args, chunkSize) {
exports.pushEncodingArgument = pushEncodingArgument;
function pushChunkSizeArgument(args, chunkSize) {
if (chunkSize !== undefined) {

@@ -89,3 +97,4 @@ args.push('CHUNK_SIZE', chunkSize.toString());

}
export const TIME_SERIES_DUPLICATE_POLICIES = {
exports.pushChunkSizeArgument = pushChunkSizeArgument;
exports.TIME_SERIES_DUPLICATE_POLICIES = {
BLOCK: 'BLOCK',

@@ -98,3 +107,3 @@ FIRST: 'FIRST',

};
export function pushDuplicatePolicy(args, duplicatePolicy) {
function pushDuplicatePolicy(args, duplicatePolicy) {
if (duplicatePolicy !== undefined) {

@@ -104,3 +113,4 @@ args.push('DUPLICATE_POLICY', duplicatePolicy);

}
export function transformTimestampArgument(timestamp) {
exports.pushDuplicatePolicy = pushDuplicatePolicy;
function transformTimestampArgument(timestamp) {
if (typeof timestamp === 'string')

@@ -112,3 +122,4 @@ return timestamp;

}
export function pushLabelsArgument(args, labels) {
exports.transformTimestampArgument = transformTimestampArgument;
function pushLabelsArgument(args, labels) {
if (labels) {

@@ -122,3 +133,4 @@ args.push('LABELS');

}
export const transformSampleReply = {
exports.pushLabelsArgument = pushLabelsArgument;
exports.transformSampleReply = {
2(reply) {

@@ -139,3 +151,3 @@ const [timestamp, value] = reply;

};
export function pushWithLabelsArgument(args, selectedLabels) {
function pushWithLabelsArgument(args, selectedLabels) {
if (!selectedLabels) {

@@ -147,4 +159,5 @@ args.push('WITHLABELS');

args.push('SELECTED_LABELS');
return pushVariadicArguments(args, selectedLabels);
return (0, generic_transformers_1.pushVariadicArguments)(args, selectedLabels);
}
}
exports.pushWithLabelsArgument = pushWithLabelsArgument;

@@ -1,3 +0,5 @@

import { transformTimestampArgument } from '.';
export default {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const _1 = require(".");
exports.default = {
FIRST_KEY_INDEX: 1,

@@ -8,3 +10,3 @@ IS_READ_ONLY: false,

for (const { key, timestamp, value } of toAdd) {
args.push(key, transformTimestampArgument(timestamp), value.toString());
args.push(key, (0, _1.transformTimestampArgument)(timestamp), value.toString());
}

@@ -11,0 +13,0 @@ return args;

@@ -1,10 +0,12 @@

import { pushLatestArgument, pushFilterArgument } from './MGET';
import { pushWithLabelsArgument } from '.';
export default {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const MGET_1 = require("./MGET");
const _1 = require(".");
exports.default = {
FIRST_KEY_INDEX: undefined,
IS_READ_ONLY: true,
transformArguments(filter, options) {
let args = pushLatestArgument(['TS.MGET'], options?.LATEST);
args = pushWithLabelsArgument(args, options?.SELECTED_LABELS);
return pushFilterArgument(args, filter);
let args = (0, MGET_1.pushLatestArgument)(['TS.MGET'], options?.LATEST);
args = (0, _1.pushWithLabelsArgument)(args, options?.SELECTED_LABELS);
return (0, MGET_1.pushFilterArgument)(args, filter);
},

@@ -11,0 +13,0 @@ // TODO

@@ -1,3 +0,6 @@

import { pushVariadicArguments } from '@redis/client/dist/lib/commands/generic-transformers';
export function pushLatestArgument(args, latest) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.pushFilterArgument = exports.pushLatestArgument = void 0;
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
function pushLatestArgument(args, latest) {
if (latest) {

@@ -8,7 +11,9 @@ args.push('LATEST');

}
export function pushFilterArgument(args, filter) {
exports.pushLatestArgument = pushLatestArgument;
function pushFilterArgument(args, filter) {
args.push('FILTER');
return pushVariadicArguments(args, filter);
return (0, generic_transformers_1.pushVariadicArguments)(args, filter);
}
export default {
exports.pushFilterArgument = pushFilterArgument;
exports.default = {
FIRST_KEY_INDEX: undefined,

@@ -15,0 +20,0 @@ IS_READ_ONLY: true,

@@ -1,12 +0,16 @@

import { pushGroupByArgument } from './MRANGE';
import { pushWithLabelsArgument } from '.';
import { pushFilterArgument } from './MGET';
import { pushRangeArguments } from './RANGE';
export function transformMRangeWithLabelsArguments(command, fromTimestamp, toTimestamp, filter, options) {
let args = pushRangeArguments([command], fromTimestamp, toTimestamp, options);
args = pushWithLabelsArgument(args, options?.SELECTED_LABELS);
args = pushFilterArgument(args, filter);
return pushGroupByArgument(args, options?.GROUPBY);
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformMRangeWithLabelsArguments = void 0;
const MRANGE_1 = require("./MRANGE");
const _1 = require(".");
const MGET_1 = require("./MGET");
const RANGE_1 = require("./RANGE");
function transformMRangeWithLabelsArguments(command, fromTimestamp, toTimestamp, filter, options) {
let args = (0, RANGE_1.pushRangeArguments)([command], fromTimestamp, toTimestamp, options);
args = (0, _1.pushWithLabelsArgument)(args, options?.SELECTED_LABELS);
args = (0, MGET_1.pushFilterArgument)(args, filter);
return (0, MRANGE_1.pushGroupByArgument)(args, options?.GROUPBY);
}
export default {
exports.transformMRangeWithLabelsArguments = transformMRangeWithLabelsArguments;
exports.default = {
FIRST_KEY_INDEX: undefined,

@@ -13,0 +17,0 @@ IS_READ_ONLY: true,

@@ -1,4 +0,7 @@

import { pushRangeArguments } from './RANGE';
import { pushFilterArgument } from './MGET';
export const TIME_SERIES_REDUCERS = {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformMRangeArguments = exports.pushGroupByArgument = exports.TIME_SERIES_REDUCERS = void 0;
const RANGE_1 = require("./RANGE");
const MGET_1 = require("./MGET");
exports.TIME_SERIES_REDUCERS = {
AVG: 'AVG',

@@ -15,3 +18,3 @@ SUM: 'SUM',

};
export function pushGroupByArgument(args, groupBy) {
function pushGroupByArgument(args, groupBy) {
if (groupBy) {

@@ -22,8 +25,10 @@ args.push('GROUPBY', groupBy.label, 'REDUCE', groupBy.reducer);

}
export function transformMRangeArguments(command, fromTimestamp, toTimestamp, filter, options) {
let args = pushRangeArguments([command], fromTimestamp, toTimestamp, options);
args = pushFilterArgument(args, filter);
exports.pushGroupByArgument = pushGroupByArgument;
function transformMRangeArguments(command, fromTimestamp, toTimestamp, filter, options) {
let args = (0, RANGE_1.pushRangeArguments)([command], fromTimestamp, toTimestamp, options);
args = (0, MGET_1.pushFilterArgument)(args, filter);
return pushGroupByArgument(args, options?.GROUPBY);
}
export default {
exports.transformMRangeArguments = transformMRangeArguments;
exports.default = {
FIRST_KEY_INDEX: undefined,

@@ -30,0 +35,0 @@ IS_READ_ONLY: true,

@@ -1,7 +0,32 @@

import MRANGE_WITHLABELS, { transformMRangeWithLabelsArguments } from './MRANGE_WITHLABELS';
export default {
FIRST_KEY_INDEX: MRANGE_WITHLABELS.FIRST_KEY_INDEX,
IS_READ_ONLY: MRANGE_WITHLABELS.IS_READ_ONLY,
transformArguments: transformMRangeWithLabelsArguments.bind(undefined, 'TS.MREVRANGE'),
transformReply: MRANGE_WITHLABELS.transformReply
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const MRANGE_WITHLABELS_1 = __importStar(require("./MRANGE_WITHLABELS"));
exports.default = {
FIRST_KEY_INDEX: MRANGE_WITHLABELS_1.default.FIRST_KEY_INDEX,
IS_READ_ONLY: MRANGE_WITHLABELS_1.default.IS_READ_ONLY,
transformArguments: MRANGE_WITHLABELS_1.transformMRangeWithLabelsArguments.bind(undefined, 'TS.MREVRANGE'),
transformReply: MRANGE_WITHLABELS_1.default.transformReply
};

@@ -1,7 +0,32 @@

import MRANGE, { transformMRangeArguments } from './MRANGE';
export default {
FIRST_KEY_INDEX: MRANGE.FIRST_KEY_INDEX,
IS_READ_ONLY: MRANGE.IS_READ_ONLY,
transformArguments: transformMRangeArguments.bind(undefined, 'TS.MREVRANGE'),
transformReply: MRANGE.transformReply
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const MRANGE_1 = __importStar(require("./MRANGE"));
exports.default = {
FIRST_KEY_INDEX: MRANGE_1.default.FIRST_KEY_INDEX,
IS_READ_ONLY: MRANGE_1.default.IS_READ_ONLY,
transformArguments: MRANGE_1.transformMRangeArguments.bind(undefined, 'TS.MREVRANGE'),
transformReply: MRANGE_1.default.transformReply
};

@@ -1,7 +0,9 @@

import { pushVariadicArguments } from '@redis/client/dist/lib/commands/generic-transformers';
export default {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
FIRST_KEY_INDEX: undefined,
IS_READ_ONLY: true,
transformArguments(filter) {
return pushVariadicArguments(['TS.QUERYINDEX'], filter);
return (0, generic_transformers_1.pushVariadicArguments)(['TS.QUERYINDEX'], filter);
},

@@ -8,0 +10,0 @@ transformReply: {

@@ -1,3 +0,6 @@

import { transformTimestampArgument, transformSampleReply } from '.';
export const TIME_SERIES_BUCKET_TIMESTAMP = {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformRangeArguments = exports.pushRangeArguments = exports.TIME_SERIES_BUCKET_TIMESTAMP = void 0;
const _1 = require(".");
exports.TIME_SERIES_BUCKET_TIMESTAMP = {
LOW: '-',

@@ -7,4 +10,4 @@ MIDDLE: '~',

};
export function pushRangeArguments(args, fromTimestamp, toTimestamp, options) {
args.push(transformTimestampArgument(fromTimestamp), transformTimestampArgument(toTimestamp));
function pushRangeArguments(args, fromTimestamp, toTimestamp, options) {
args.push((0, _1.transformTimestampArgument)(fromTimestamp), (0, _1.transformTimestampArgument)(toTimestamp));
if (options?.LATEST) {

@@ -16,3 +19,3 @@ args.push('LATEST');

for (const timestamp of options.FILTER_BY_TS) {
args.push(transformTimestampArgument(timestamp));
args.push((0, _1.transformTimestampArgument)(timestamp));
}

@@ -28,5 +31,5 @@ }

if (options?.ALIGN !== undefined) {
args.push('ALIGN', transformTimestampArgument(options.ALIGN));
args.push('ALIGN', (0, _1.transformTimestampArgument)(options.ALIGN));
}
args.push('AGGREGATION', options.AGGREGATION.type, transformTimestampArgument(options.AGGREGATION.timeBucket));
args.push('AGGREGATION', options.AGGREGATION.type, (0, _1.transformTimestampArgument)(options.AGGREGATION.timeBucket));
if (options.AGGREGATION.BUCKETTIMESTAMP) {

@@ -41,6 +44,8 @@ args.push('BUCKETTIMESTAMP', options.AGGREGATION.BUCKETTIMESTAMP);

}
export function transformRangeArguments(command, key, fromTimestamp, toTimestamp, options) {
exports.pushRangeArguments = pushRangeArguments;
function transformRangeArguments(command, key, fromTimestamp, toTimestamp, options) {
return pushRangeArguments([command, key], fromTimestamp, toTimestamp, options);
}
export default {
exports.transformRangeArguments = transformRangeArguments;
exports.default = {
FIRST_KEY_INDEX: 1,

@@ -51,8 +56,8 @@ IS_READ_ONLY: true,

2(reply) {
return reply.map(sample => transformSampleReply['2'](sample));
return reply.map(sample => _1.transformSampleReply['2'](sample));
},
3(reply) {
return reply.map(sample => transformSampleReply['3'](sample));
return reply.map(sample => _1.transformSampleReply['3'](sample));
}
}
};

@@ -1,7 +0,32 @@

import RANGE, { transformRangeArguments } from './RANGE';
export default {
FIRST_KEY_INDEX: RANGE.FIRST_KEY_INDEX,
IS_READ_ONLY: RANGE.IS_READ_ONLY,
transformArguments: transformRangeArguments.bind(undefined, 'TS.REVRANGE'),
transformReply: RANGE.transformReply
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const RANGE_1 = __importStar(require("./RANGE"));
exports.default = {
FIRST_KEY_INDEX: RANGE_1.default.FIRST_KEY_INDEX,
IS_READ_ONLY: RANGE_1.default.IS_READ_ONLY,
transformArguments: RANGE_1.transformRangeArguments.bind(undefined, 'TS.REVRANGE'),
transformReply: RANGE_1.default.transformReply
};

@@ -1,3 +0,14 @@

export { default, TIME_SERIES_ENCODING, TIME_SERIES_DUPLICATE_POLICIES } from './commands';
export { TIME_SERIES_AGGREGATION_TYPE } from './commands/CREATERULE';
export { TIME_SERIES_BUCKET_TIMESTAMP } from './commands/RANGE';
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TIME_SERIES_BUCKET_TIMESTAMP = exports.TIME_SERIES_AGGREGATION_TYPE = exports.TIME_SERIES_DUPLICATE_POLICIES = exports.TIME_SERIES_ENCODING = exports.default = void 0;
var commands_1 = require("./commands");
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(commands_1).default; } });
Object.defineProperty(exports, "TIME_SERIES_ENCODING", { enumerable: true, get: function () { return commands_1.TIME_SERIES_ENCODING; } });
Object.defineProperty(exports, "TIME_SERIES_DUPLICATE_POLICIES", { enumerable: true, get: function () { return commands_1.TIME_SERIES_DUPLICATE_POLICIES; } });
var CREATERULE_1 = require("./commands/CREATERULE");
Object.defineProperty(exports, "TIME_SERIES_AGGREGATION_TYPE", { enumerable: true, get: function () { return CREATERULE_1.TIME_SERIES_AGGREGATION_TYPE; } });
var RANGE_1 = require("./commands/RANGE");
Object.defineProperty(exports, "TIME_SERIES_BUCKET_TIMESTAMP", { enumerable: true, get: function () { return RANGE_1.TIME_SERIES_BUCKET_TIMESTAMP; } });
{
"name": "@redis/time-series",
"version": "2.0.0-next.1",
"version": "2.0.0-next.2",
"license": "MIT",

@@ -15,3 +15,3 @@ "main": "./dist/lib/index.js",

"peerDependencies": {
"@redis/client": "^2.0.0-next.3"
"@redis/client": "^2.0.0-next.4"
},

@@ -18,0 +18,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc