@featurevisor/types 0.18.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.19.0](https://github.com/fahad19/featurevisor/compare/v0.18.0...v0.19.0) (2023-05-13)
7
+
8
+
9
+ ### Features
10
+
11
+ * Date comparison operators ([#67](https://github.com/fahad19/featurevisor/issues/67)) ([b555f39](https://github.com/fahad19/featurevisor/commit/b555f39a0cb99e95e1d66a3c76df4483a26e2caf))
12
+
13
+
14
+
15
+
16
+
6
17
  # [0.18.0](https://github.com/fahad19/featurevisor/compare/v0.17.0...v0.18.0) (2023-05-12)
7
18
 
8
19
 
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export type AttributeKey = string;
2
- export type AttributeValue = string | number | boolean | null | undefined;
2
+ export type AttributeValue = string | number | boolean | Date | null | undefined;
3
3
  export interface Attributes {
4
4
  [key: AttributeKey]: AttributeValue;
5
5
  }
@@ -9,8 +9,8 @@ export interface Attribute {
9
9
  type: AttributeValue;
10
10
  capture?: boolean;
11
11
  }
12
- export type Operator = "equals" | "notEquals" | "greaterThan" | "greaterThanOrEquals" | "lessThan" | "lessThanOrEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "semverEquals" | "semverNotEquals" | "semverGreaterThan" | "semverGreaterThanOrEquals" | "semverLessThan" | "semverLessThanOrEquals" | "in" | "notIn";
13
- export type ConditionValue = string | number | boolean | null | undefined | string[];
12
+ export type Operator = "equals" | "notEquals" | "greaterThan" | "greaterThanOrEquals" | "lessThan" | "lessThanOrEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "semverEquals" | "semverNotEquals" | "semverGreaterThan" | "semverGreaterThanOrEquals" | "semverLessThan" | "semverLessThanOrEquals" | "before" | "after" | "in" | "notIn";
13
+ export type ConditionValue = string | number | boolean | Date | null | undefined | string[];
14
14
  export interface PlainCondition {
15
15
  attribute: AttributeKey;
16
16
  operator: Operator;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@featurevisor/types",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "Common Typescript types for Featurevisor",
5
5
  "main": "dist/index.js",
6
6
  "module": "lib/index.js",
@@ -41,5 +41,5 @@
41
41
  "url": "https://github.com/fahad19/featurevisor/issues"
42
42
  },
43
43
  "license": "MIT",
44
- "gitHead": "9de4cc7d1e0bf04f43d03db047ee7be331109359"
44
+ "gitHead": "4fc6e9d475552a68b8ffd4000f736349d103b718"
45
45
  }
package/src/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export type AttributeKey = string;
2
2
 
3
- export type AttributeValue = string | number | boolean | null | undefined;
3
+ export type AttributeValue = string | number | boolean | Date | null | undefined;
4
4
 
5
5
  export interface Attributes {
6
6
  [key: AttributeKey]: AttributeValue;
@@ -37,11 +37,15 @@ export type Operator =
37
37
  | "semverLessThan"
38
38
  | "semverLessThanOrEquals"
39
39
 
40
+ // date comparisons
41
+ | "before"
42
+ | "after"
43
+
40
44
  // array of strings
41
45
  | "in"
42
46
  | "notIn";
43
47
 
44
- export type ConditionValue = string | number | boolean | null | undefined | string[];
48
+ export type ConditionValue = string | number | boolean | Date | null | undefined | string[];
45
49
 
46
50
  export interface PlainCondition {
47
51
  attribute: AttributeKey;