@hawk.so/types 0.6.5 → 0.8.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/build/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './src/ai/stream';
1
2
  export * from './src/auth/tokensPair';
2
3
  export * from './src/base/businessOperation/businessOperation';
3
4
  export * from './src/billing/planProlongrationPayload';
package/build/index.js CHANGED
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./src/ai/stream"), exports);
17
18
  __exportStar(require("./src/auth/tokensPair"), exports);
18
19
  __exportStar(require("./src/base/businessOperation/businessOperation"), exports);
19
20
  __exportStar(require("./src/billing/planProlongrationPayload"), exports);
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Stream part that carries generated text.
3
+ */
4
+ export type AiStreamTextDeltaPart = {
5
+ /**
6
+ * Discriminant of a text-carrying part.
7
+ */
8
+ type: 'text-delta';
9
+ /**
10
+ * Text generated for this part.
11
+ */
12
+ delta: string;
13
+ };
14
+ /**
15
+ * Stream part that carries a generation failure.
16
+ */
17
+ export type AiStreamErrorPart = {
18
+ /**
19
+ * Discriminant of a failure-carrying part.
20
+ */
21
+ type: 'error';
22
+ /**
23
+ * Description of the failure.
24
+ */
25
+ errorText: string;
26
+ };
27
+ /**
28
+ * Discriminated union of parts an AI stream consists of.
29
+ */
30
+ export type AiStreamPart = AiStreamTextDeltaPart | AiStreamErrorPart;
31
+ /**
32
+ * Asynchronous sequence of parts forming an AI-generated answer.
33
+ */
34
+ export type AiStream = AsyncIterable<AiStreamPart>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -50,6 +50,14 @@ export interface GroupedEventDBScheme {
50
50
  * (created by the Collector)
51
51
  */
52
52
  timestamp: number;
53
+ /**
54
+ * First release in which the event stopped occurring
55
+ */
56
+ resolvedInRelease?: string;
57
+ /**
58
+ * First release in which the resolved event occurred again
59
+ */
60
+ regressionInRelease?: string;
53
61
  /**
54
62
  * Event marks for tracking status
55
63
  */
@@ -13,6 +13,10 @@ export interface RepetitionDBScheme {
13
13
  * Hash for grouping similar events
14
14
  */
15
15
  groupHash: string;
16
+ /**
17
+ * Release in which the repetition occurred
18
+ */
19
+ release?: string;
16
20
  /**
17
21
  * @deprecated use delta instead
18
22
  * And any of EventData field with diff
package/index.ts CHANGED
@@ -1,3 +1,5 @@
1
+ export * from './src/ai/stream';
2
+
1
3
  export * from './src/auth/tokensPair';
2
4
 
3
5
  export * from './src/base/businessOperation/businessOperation';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hawk.so/types",
3
- "version": "0.6.5",
3
+ "version": "0.8.0",
4
4
  "description": "TypeScript definitions for Hawk",
5
5
  "types": "build/index.d.ts",
6
6
  "main": "build/index.js",
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Stream part that carries generated text.
3
+ */
4
+ export type AiStreamTextDeltaPart = {
5
+ /**
6
+ * Discriminant of a text-carrying part.
7
+ */
8
+ type: 'text-delta';
9
+
10
+ /**
11
+ * Text generated for this part.
12
+ */
13
+ delta: string;
14
+ };
15
+
16
+ /**
17
+ * Stream part that carries a generation failure.
18
+ */
19
+ export type AiStreamErrorPart = {
20
+ /**
21
+ * Discriminant of a failure-carrying part.
22
+ */
23
+ type: 'error';
24
+
25
+ /**
26
+ * Description of the failure.
27
+ */
28
+ errorText: string;
29
+ };
30
+
31
+ /**
32
+ * Discriminated union of parts an AI stream consists of.
33
+ */
34
+ export type AiStreamPart = AiStreamTextDeltaPart | AiStreamErrorPart;
35
+
36
+ /**
37
+ * Asynchronous sequence of parts forming an AI-generated answer.
38
+ */
39
+ export type AiStream = AsyncIterable<AiStreamPart>;
@@ -60,6 +60,16 @@ export interface GroupedEventDBScheme {
60
60
  */
61
61
  timestamp: number;
62
62
 
63
+ /**
64
+ * First release in which the event stopped occurring
65
+ */
66
+ resolvedInRelease?: string;
67
+
68
+ /**
69
+ * First release in which the resolved event occurred again
70
+ */
71
+ regressionInRelease?: string;
72
+
63
73
  /**
64
74
  * Event marks for tracking status
65
75
  */
@@ -16,6 +16,11 @@ export interface RepetitionDBScheme {
16
16
  */
17
17
  groupHash: string;
18
18
 
19
+ /**
20
+ * Release in which the repetition occurred
21
+ */
22
+ release?: string;
23
+
19
24
  /**
20
25
  * @deprecated use delta instead
21
26
  * And any of EventData field with diff
package/tsconfig.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "compilerOptions": {
3
3
  /* Basic Options */
4
4
  // "incremental": true, /* Enable incremental compilation */
5
- "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
5
+ "target": "es2018", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', 'ES2022', 'ES2023', 'ES2024', or 'ESNEXT'. */
6
6
  "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
7
7
  // "lib": [], /* Specify library files to be included in the compilation. */
8
8
  // "allowJs": true, /* Allow javascript files to be compiled. */