@featurevisor/types 0.61.0 → 0.63.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/.eslintcache CHANGED
@@ -1 +1 @@
1
- [{"/home/runner/work/featurevisor/featurevisor/packages/types/src/index.ts":"1"},{"size":8988,"mtime":1699985857286,"results":"2","hashOfConfig":"3"},{"filePath":"4","messages":"5","suppressedMessages":"6","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1fqckjn","/home/runner/work/featurevisor/featurevisor/packages/types/src/index.ts",[],[]]
1
+ [{"/home/runner/work/featurevisor/featurevisor/packages/types/src/index.ts":"1"},{"size":9457,"mtime":1701279439222,"results":"2","hashOfConfig":"3"},{"filePath":"4","messages":"5","suppressedMessages":"6","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1fqckjn","/home/runner/work/featurevisor/featurevisor/packages/types/src/index.ts",[],[]]
package/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
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.63.0](https://github.com/featurevisor/featurevisor/compare/v0.62.2...v0.63.0) (2023-11-29)
7
+
8
+
9
+ ### Features
10
+
11
+ * attribute type for semver ([#221](https://github.com/featurevisor/featurevisor/issues/221)) ([278e366](https://github.com/featurevisor/featurevisor/commit/278e366d76b3f6ed5b6aae1b96f8ca1149276574))
12
+
13
+
14
+
15
+
16
+
17
+ # [0.62.0](https://github.com/featurevisor/featurevisor/compare/v0.61.0...v0.62.0) (2023-11-19)
18
+
19
+
20
+ ### Features
21
+
22
+ * get history info from datasource ([#213](https://github.com/featurevisor/featurevisor/issues/213)) ([6107a6b](https://github.com/featurevisor/featurevisor/commit/6107a6bee14708114413e4e59cb7ebeb061a79bd))
23
+
24
+
25
+
26
+
27
+
6
28
  # [0.61.0](https://github.com/featurevisor/featurevisor/compare/v0.60.1...v0.61.0) (2023-11-14)
7
29
 
8
30
  **Note:** Version bump only for package @featurevisor/types
package/lib/index.d.ts CHANGED
@@ -3,10 +3,11 @@ export type AttributeValue = string | number | boolean | Date | null | undefined
3
3
  export interface Context {
4
4
  [key: AttributeKey]: AttributeValue;
5
5
  }
6
+ export type AttributeType = "boolean" | "string" | "integer" | "double" | "date" | "semver";
6
7
  export interface Attribute {
7
8
  archived?: boolean;
8
9
  key: AttributeKey;
9
- type: string;
10
+ type: AttributeType;
10
11
  capture?: boolean;
11
12
  }
12
13
  export type Operator = "equals" | "notEquals" | "greaterThan" | "greaterThanOrEquals" | "lessThan" | "lessThanOrEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "semverEquals" | "semverNotEquals" | "semverGreaterThan" | "semverGreaterThanOrEquals" | "semverLessThan" | "semverLessThanOrEquals" | "before" | "after" | "in" | "notIn";
@@ -256,18 +257,20 @@ export type Test = TestSegment | TestFeature;
256
257
  /**
257
258
  * Site index and history
258
259
  */
260
+ export type EntityType = "attribute" | "segment" | "feature" | "group" | "test";
261
+ export type CommitHash = string;
259
262
  export interface HistoryEntity {
260
- type: "attribute" | "segment" | "feature";
263
+ type: EntityType;
261
264
  key: string;
262
265
  }
263
266
  export interface HistoryEntry {
264
- commit: string;
267
+ commit: CommitHash;
265
268
  author: string;
266
269
  timestamp: string;
267
270
  entities: HistoryEntity[];
268
271
  }
269
272
  export interface LastModified {
270
- commit: string;
273
+ commit: CommitHash;
271
274
  timestamp: string;
272
275
  author: string;
273
276
  }
@@ -276,7 +279,7 @@ export interface SearchIndex {
276
279
  feature: string;
277
280
  segment: string;
278
281
  attribute: string;
279
- commit: string;
282
+ commit: CommitHash;
280
283
  };
281
284
  entities: {
282
285
  attributes: (Attribute & {
@@ -293,3 +296,17 @@ export interface SearchIndex {
293
296
  })[];
294
297
  };
295
298
  }
299
+ export interface EntityDiff {
300
+ type: EntityType;
301
+ key: string;
302
+ created?: boolean;
303
+ deleted?: boolean;
304
+ updated?: boolean;
305
+ content?: string;
306
+ }
307
+ export interface Commit {
308
+ hash: CommitHash;
309
+ author: string;
310
+ timestamp: string;
311
+ entities: EntityDiff[];
312
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@featurevisor/types",
3
- "version": "0.61.0",
3
+ "version": "0.63.0",
4
4
  "description": "Common Typescript types for Featurevisor",
5
5
  "main": "dist/index.js",
6
6
  "module": "lib/index.js",
@@ -44,5 +44,5 @@
44
44
  "url": "https://github.com/featurevisor/featurevisor/issues"
45
45
  },
46
46
  "license": "MIT",
47
- "gitHead": "c781bff1767a1c1680995e7e00b4aad7f0e5c58e"
47
+ "gitHead": "a2eb0aa80dfdc617430d4e05db6734ab28ffd481"
48
48
  }
package/src/index.ts CHANGED
@@ -6,10 +6,12 @@ export interface Context {
6
6
  [key: AttributeKey]: AttributeValue;
7
7
  }
8
8
 
9
+ export type AttributeType = "boolean" | "string" | "integer" | "double" | "date" | "semver";
10
+
9
11
  export interface Attribute {
10
12
  archived?: boolean; // only available in YAML
11
13
  key: AttributeKey;
12
- type: string;
14
+ type: AttributeType;
13
15
  capture?: boolean;
14
16
  }
15
17
 
@@ -384,20 +386,24 @@ export type Test = TestSegment | TestFeature;
384
386
  /**
385
387
  * Site index and history
386
388
  */
389
+ export type EntityType = "attribute" | "segment" | "feature" | "group" | "test";
390
+
391
+ export type CommitHash = string;
392
+
387
393
  export interface HistoryEntity {
388
- type: "attribute" | "segment" | "feature";
394
+ type: EntityType;
389
395
  key: string;
390
396
  }
391
397
 
392
398
  export interface HistoryEntry {
393
- commit: string;
399
+ commit: CommitHash;
394
400
  author: string;
395
401
  timestamp: string;
396
402
  entities: HistoryEntity[];
397
403
  }
398
404
 
399
405
  export interface LastModified {
400
- commit: string;
406
+ commit: CommitHash;
401
407
  timestamp: string;
402
408
  author: string;
403
409
  }
@@ -407,7 +413,7 @@ export interface SearchIndex {
407
413
  feature: string;
408
414
  segment: string;
409
415
  attribute: string;
410
- commit: string;
416
+ commit: CommitHash;
411
417
  };
412
418
  entities: {
413
419
  attributes: (Attribute & {
@@ -424,3 +430,19 @@ export interface SearchIndex {
424
430
  })[];
425
431
  };
426
432
  }
433
+
434
+ export interface EntityDiff {
435
+ type: EntityType;
436
+ key: string;
437
+ created?: boolean;
438
+ deleted?: boolean;
439
+ updated?: boolean;
440
+ content?: string;
441
+ }
442
+
443
+ export interface Commit {
444
+ hash: CommitHash;
445
+ author: string;
446
+ timestamp: string;
447
+ entities: EntityDiff[];
448
+ }