@narrative.io/data-collaboration-sdk-ts 0.0.106 → 0.0.108
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/access-rules/index.d.ts +44 -0
- package/build/access-rules/index.js +51 -0
- package/build/access-rules/types.d.ts +29 -0
- package/build/access-rules/types.js +1 -0
- package/build/apps/index.d.ts +5 -4
- package/build/apps/index.js +8 -3
- package/build/apps/types.d.ts +12 -0
- package/build/apps/types.js +0 -1
- package/build/attributes/index.d.ts +9 -9
- package/build/attributes/index.js +8 -8
- package/build/attributes/types.d.ts +5 -5
- package/build/authentication/index.d.ts +3 -3
- package/build/authentication/index.js +3 -3
- package/build/authentication/types.d.ts +3 -3
- package/build/base-api.d.ts +42 -42
- package/build/base-api.js +51 -51
- package/build/company-info/index.d.ts +3 -3
- package/build/company-info/index.js +2 -2
- package/build/contracts/index.d.ts +18 -18
- package/build/contracts/index.js +18 -18
- package/build/contracts/types.d.ts +3 -3
- package/build/data-streams/index.d.ts +10 -10
- package/build/data-streams/index.js +9 -9
- package/build/data-streams/types.d.ts +7 -7
- package/build/datasets/index.d.ts +30 -30
- package/build/datasets/index.js +32 -32
- package/build/datasets/types.d.ts +9 -9
- package/build/forecast/index.d.ts +3 -3
- package/build/forecast/index.js +3 -3
- package/build/forecast/types.d.ts +7 -7
- package/build/health/index.d.ts +2 -2
- package/build/health/index.js +2 -2
- package/build/health/types.d.ts +1 -1
- package/build/index.d.ts +32 -31
- package/build/index.js +44 -24
- package/build/installations/index.d.ts +3 -3
- package/build/installations/index.js +3 -3
- package/build/installations/types.d.ts +1 -1
- package/build/mappings/index.d.ts +16 -16
- package/build/mappings/index.js +18 -18
- package/build/mappings/types.d.ts +6 -6
- package/build/nql/DataRulesConverter.d.ts +3 -3
- package/build/nql/DataRulesConverter.js +55 -31
- package/build/nql/NQLParser.d.ts +4 -4
- package/build/nql/NQLParser.js +74 -57
- package/build/nql/SubstraitParser.d.ts +173 -173
- package/build/nql/SubstraitParser.js +270 -261
- package/build/nql/index.d.ts +4 -4
- package/build/nql/index.js +3 -3
- package/build/nql/types.d.ts +6 -6
- package/build/nql/types.js +59 -29
- package/build/ping/index.d.ts +2 -2
- package/build/ping/index.js +2 -2
- package/build/ping/types.d.ts +1 -1
- package/build/products/index.d.ts +6 -6
- package/build/products/index.js +6 -6
- package/build/products/types.d.ts +4 -4
- package/build/resources/index.d.ts +4 -4
- package/build/resources/index.js +2 -2
- package/build/resources/types.d.ts +3 -3
- package/build/rosetta/types.d.ts +12 -12
- package/build/rosetta/types.js +69 -42
- package/build/rosetta-stone/index.d.ts +3 -3
- package/build/rosetta-stone/index.js +3 -3
- package/build/types.d.ts +2 -2
- package/build/uploads/index.d.ts +8 -8
- package/build/uploads/index.js +8 -8
- package/build/utils.js +1 -1
- package/package.json +3 -1
package/build/nql/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseApi } from
|
|
2
|
-
import type { Plan } from
|
|
3
|
-
import type { Nql, NqlField, NqlResult, NqlCompileResult, NqlQueryInput, NqlExpression, NqlWhere, NqlFilterBinaryExpression, NqlBooleanExpression, NqlFilterExpression, NqlFilterUnaryExpression } from
|
|
1
|
+
import { BaseApi } from "../base-api";
|
|
2
|
+
import type { Plan } from "./SubstraitParser";
|
|
3
|
+
import type { Nql, NqlField, NqlResult, NqlCompileResult, NqlQueryInput, NqlExpression, NqlWhere, NqlFilterBinaryExpression, NqlBooleanExpression, NqlFilterExpression, NqlFilterUnaryExpression } from "./types";
|
|
4
4
|
/**
|
|
5
5
|
* A class for accessing the NQL API.
|
|
6
6
|
* @extends BaseApi
|
|
@@ -35,4 +35,4 @@ declare class NqlApi extends BaseApi {
|
|
|
35
35
|
*/
|
|
36
36
|
getNqlByJobId(id: string): Promise<NqlResult>;
|
|
37
37
|
}
|
|
38
|
-
export { NqlApi, type Nql, type NqlField, type NqlResult, type NqlQueryInput, type NqlCompileResult, type NqlExpression, type NqlWhere, type NqlFilterExpression, type NqlBooleanExpression, type NqlFilterBinaryExpression, type NqlFilterUnaryExpression };
|
|
38
|
+
export { NqlApi, type Nql, type NqlField, type NqlResult, type NqlQueryInput, type NqlCompileResult, type NqlExpression, type NqlWhere, type NqlFilterExpression, type NqlBooleanExpression, type NqlFilterBinaryExpression, type NqlFilterUnaryExpression, };
|
package/build/nql/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// src/api/NqlApi.ts
|
|
2
|
-
import { BaseApi } from
|
|
2
|
+
import { BaseApi } from "../base-api";
|
|
3
3
|
/**
|
|
4
4
|
* The name of the resource to be used in API requests.
|
|
5
5
|
* @constant
|
|
6
6
|
* @private
|
|
7
7
|
* @type {string}
|
|
8
8
|
*/
|
|
9
|
-
const resourceName =
|
|
9
|
+
const resourceName = "nql";
|
|
10
10
|
/**
|
|
11
11
|
* A class for accessing the NQL API.
|
|
12
12
|
* @extends BaseApi
|
|
@@ -52,4 +52,4 @@ class NqlApi extends BaseApi {
|
|
|
52
52
|
return await this.get(`${resourceName}/${id}`);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
export { NqlApi };
|
|
55
|
+
export { NqlApi, };
|
package/build/nql/types.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @see {@link https://github.com/colinhacks/zod} for more information about Zod.
|
|
6
6
|
*/
|
|
7
|
-
import { z } from
|
|
7
|
+
import { z } from "zod";
|
|
8
8
|
/**
|
|
9
9
|
* Defines the structure for a budget object.
|
|
10
10
|
*
|
|
@@ -1287,7 +1287,7 @@ export interface ForecastBody {
|
|
|
1287
1287
|
details: QueryDetails;
|
|
1288
1288
|
}
|
|
1289
1289
|
export interface QueryDetails {
|
|
1290
|
-
type:
|
|
1290
|
+
type: "marketplace";
|
|
1291
1291
|
pricing: QueryPricing;
|
|
1292
1292
|
data_rules: DataRules;
|
|
1293
1293
|
}
|
|
@@ -1310,7 +1310,7 @@ export interface DataRulesAttributesField {
|
|
|
1310
1310
|
export interface DataRulesAttributesFieldFilter {
|
|
1311
1311
|
expression: string[];
|
|
1312
1312
|
}
|
|
1313
|
-
export type FilterDefinition =
|
|
1313
|
+
export type FilterDefinition = "include_all_values_including_nulls_filter" | "include_only_if_not_null_filter" | EnumFilter | IntervalFilter | TimestampFilter | SparkSqlConstraintFilter;
|
|
1314
1314
|
export interface EnumFilter {
|
|
1315
1315
|
type: InclusionType;
|
|
1316
1316
|
list: string[];
|
|
@@ -1327,11 +1327,11 @@ export interface TimestampFilter {
|
|
|
1327
1327
|
export interface SparkSqlConstraintFilter {
|
|
1328
1328
|
expressions: string[];
|
|
1329
1329
|
}
|
|
1330
|
-
export type IntervalEndType =
|
|
1330
|
+
export type IntervalEndType = "inclusive" | "exclusive";
|
|
1331
1331
|
export interface IntervalEnd {
|
|
1332
1332
|
type: IntervalEndType;
|
|
1333
1333
|
value: string;
|
|
1334
1334
|
}
|
|
1335
|
-
export type SpatialPredicate =
|
|
1336
|
-
export type InclusionType =
|
|
1335
|
+
export type SpatialPredicate = "contains" | "intersects";
|
|
1336
|
+
export type InclusionType = "include" | "exclude";
|
|
1337
1337
|
export {};
|
package/build/nql/types.js
CHANGED
|
@@ -4,16 +4,20 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @see {@link https://github.com/colinhacks/zod} for more information about Zod.
|
|
6
6
|
*/
|
|
7
|
-
import { z } from
|
|
7
|
+
import { z } from "zod";
|
|
8
8
|
/**
|
|
9
9
|
* Defines the structure for a budget object.
|
|
10
10
|
*
|
|
11
11
|
* @type {z.ZodObject}
|
|
12
12
|
*/
|
|
13
13
|
export const NqlBudgetObj = z.object({
|
|
14
|
-
value: z.number().describe(
|
|
15
|
-
currency: z
|
|
16
|
-
|
|
14
|
+
value: z.number().describe("The value of the budget."),
|
|
15
|
+
currency: z
|
|
16
|
+
.enum(["USD"])
|
|
17
|
+
.describe("The currency the budget is described in."),
|
|
18
|
+
period: z
|
|
19
|
+
.enum(["CALENDAR_MONTH"])
|
|
20
|
+
.describe("The period over which the budget will be applied."),
|
|
17
21
|
});
|
|
18
22
|
/**
|
|
19
23
|
* A schema object used to validate and infer the structure of NqlQuery.
|
|
@@ -21,51 +25,77 @@ export const NqlBudgetObj = z.object({
|
|
|
21
25
|
* @constant {z.ZodObject} NqlQueryObj
|
|
22
26
|
*/
|
|
23
27
|
export const NqlQueryInputObj = z.object({
|
|
24
|
-
nql: z
|
|
25
|
-
|
|
28
|
+
nql: z
|
|
29
|
+
.string()
|
|
30
|
+
.trim()
|
|
31
|
+
.includes("SELECT", {
|
|
32
|
+
message: "NQL query must contain a SELECT statement.",
|
|
26
33
|
})
|
|
27
34
|
.regex(/^.*\bLIMIT\b.*/is, {
|
|
28
|
-
message:
|
|
35
|
+
message: "NQL query must contain a LIMIT statement.",
|
|
29
36
|
})
|
|
30
37
|
.regex(/^(?!.*\bJOIN\b).*/is, {
|
|
31
|
-
message:
|
|
38
|
+
message: "NQL query cannot contain a JOIN statement.",
|
|
32
39
|
})
|
|
33
|
-
.describe(
|
|
40
|
+
.describe("A NQL query"),
|
|
34
41
|
});
|
|
35
42
|
/**
|
|
36
43
|
* A schema object used to validate and infer the structure of NqlPreSelectExpression.
|
|
37
44
|
*
|
|
38
45
|
* @constant {z.ZodEnum} NqlPreSelectExpressionObj
|
|
39
46
|
*/
|
|
40
|
-
export const NqlPreSelectExpressionObj = z
|
|
41
|
-
|
|
47
|
+
export const NqlPreSelectExpressionObj = z
|
|
48
|
+
.enum(["EXPLAIN"])
|
|
49
|
+
.describe("Expression that occurs before the SELECT statement.")
|
|
50
|
+
.optional();
|
|
51
|
+
export const NqlDatabaseObject = z
|
|
52
|
+
.string()
|
|
53
|
+
.refine((x) => x.toLowerCase() === "narrative");
|
|
42
54
|
export const NqlTableObject = z.object({
|
|
43
55
|
database: NqlDatabaseObject,
|
|
44
|
-
table: z.string().refine(x => x.toLowerCase() ===
|
|
56
|
+
table: z.string().refine((x) => x.toLowerCase() === "rosetta_stone"),
|
|
45
57
|
});
|
|
46
58
|
export const NqlFieldObj = z.object({
|
|
47
59
|
field: z.string().trim(),
|
|
48
|
-
table: NqlTableObject
|
|
60
|
+
table: NqlTableObject,
|
|
49
61
|
});
|
|
50
62
|
export const NqlFilterUnaryExpressionObj = z.object({
|
|
51
63
|
field: NqlFieldObj,
|
|
52
|
-
operator: z
|
|
64
|
+
operator: z
|
|
65
|
+
.enum(["IS NULL", "IS NOT NULL"])
|
|
66
|
+
.describe("The operator to use for the filter. As a standalone operator it only expects the field to be defined."),
|
|
53
67
|
});
|
|
54
|
-
const NqlExpressionObj = z.union([
|
|
68
|
+
const NqlExpressionObj = z.union([
|
|
69
|
+
NqlFieldObj,
|
|
70
|
+
z.string(),
|
|
71
|
+
z.number(),
|
|
72
|
+
z.boolean(),
|
|
73
|
+
]);
|
|
55
74
|
export const NqlFilterBinaryExpressionObj = z.object({
|
|
56
75
|
left: NqlExpressionObj,
|
|
57
|
-
operator: z
|
|
58
|
-
|
|
76
|
+
operator: z
|
|
77
|
+
.enum(["=", "!=", ">", "<", ">=", "<=", "IN", "NOT IN", "LIKE", "NOT LIKE"])
|
|
78
|
+
.describe("The operator to use for the filter. As a binary operator it expects both a left and right expression"),
|
|
79
|
+
right: NqlExpressionObj,
|
|
59
80
|
});
|
|
60
|
-
export const NqlFilterExpressionObj = z.union([
|
|
61
|
-
|
|
62
|
-
|
|
81
|
+
export const NqlFilterExpressionObj = z.union([
|
|
82
|
+
NqlFilterUnaryExpressionObj,
|
|
83
|
+
NqlFilterBinaryExpressionObj,
|
|
84
|
+
]);
|
|
85
|
+
export const NqlBooleanExpressionObj = z
|
|
86
|
+
.enum(["AND", "OR"])
|
|
87
|
+
.describe("The operator to use for the filter. As a standalone operator it only expects the field to be defined.");
|
|
88
|
+
export const NqlWhereObj = z
|
|
89
|
+
.object({
|
|
63
90
|
booleanExpressions: NqlBooleanExpressionObj.array(),
|
|
64
|
-
filterExpressions: NqlFilterExpressionObj.array()
|
|
65
|
-
})
|
|
66
|
-
|
|
91
|
+
filterExpressions: NqlFilterExpressionObj.array(),
|
|
92
|
+
})
|
|
93
|
+
.refine((clause) => {
|
|
94
|
+
return (clause.booleanExpressions.length ===
|
|
95
|
+
clause.filterExpressions.length - 1 ||
|
|
96
|
+
clause.filterExpressions.length === 0);
|
|
67
97
|
}, {
|
|
68
|
-
message:
|
|
98
|
+
message: "Boolean expression must have one less element than filter expression.",
|
|
69
99
|
});
|
|
70
100
|
export const NqlObj = z.object({
|
|
71
101
|
explain: NqlPreSelectExpressionObj,
|
|
@@ -73,9 +103,9 @@ export const NqlObj = z.object({
|
|
|
73
103
|
from: NqlTableObject.array(),
|
|
74
104
|
where: NqlWhereObj,
|
|
75
105
|
limit: NqlBudgetObj,
|
|
76
|
-
sort: z.undefined().describe(
|
|
77
|
-
group: z.undefined().describe(
|
|
78
|
-
having: z.undefined().describe(
|
|
79
|
-
offset: z.undefined().describe(
|
|
80
|
-
join: z.undefined().describe(
|
|
106
|
+
sort: z.undefined().describe("Sort is not currently supported in NQL"),
|
|
107
|
+
group: z.undefined().describe("Group is not currently supported in NQL"),
|
|
108
|
+
having: z.undefined().describe("Having is not currently supported in NQL"),
|
|
109
|
+
offset: z.undefined().describe("Offset is not currently supported in NQL"),
|
|
110
|
+
join: z.undefined().describe("Join is not currently supported in NQL"),
|
|
81
111
|
});
|
package/build/ping/index.d.ts
CHANGED
package/build/ping/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BaseApi } from
|
|
1
|
+
import { BaseApi } from "../base-api";
|
|
2
2
|
/**
|
|
3
3
|
* The name of the resource to be used in API requests.
|
|
4
4
|
* @constant
|
|
5
5
|
* @private
|
|
6
6
|
* @type {string}
|
|
7
7
|
*/
|
|
8
|
-
const resourceName =
|
|
8
|
+
const resourceName = "ping";
|
|
9
9
|
/**
|
|
10
10
|
* A class for accessing the Ping API.
|
|
11
11
|
* @extends BaseApi
|
package/build/ping/types.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type PingStatus =
|
|
1
|
+
export type PingStatus = "healthy" | unknown;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { BaseApi } from
|
|
2
|
-
import { type Product } from
|
|
1
|
+
import { BaseApi } from "../base-api";
|
|
2
|
+
import { type Product } from "./types";
|
|
3
3
|
/**
|
|
4
4
|
* A class for accessing the Products API.
|
|
5
5
|
* @extends BaseApi
|
|
6
6
|
*/
|
|
7
7
|
declare class ProductsApi extends BaseApi {
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
* Gets the result of a product from the API.
|
|
10
|
+
*
|
|
11
|
+
* @returns {Promise<Product[]>} A promise that resolves with the products.
|
|
12
|
+
*/
|
|
13
13
|
getHealthCheck(): Promise<Product[]>;
|
|
14
14
|
}
|
|
15
15
|
export { ProductsApi, type Product };
|
package/build/products/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { BaseApi } from
|
|
1
|
+
import { BaseApi } from "../base-api";
|
|
2
2
|
/**
|
|
3
3
|
* The name of the resource to be used in API requests.
|
|
4
4
|
* @constant
|
|
5
5
|
* @private
|
|
6
6
|
* @type {string}
|
|
7
7
|
*/
|
|
8
|
-
const resourceName =
|
|
8
|
+
const resourceName = "admin/products";
|
|
9
9
|
/**
|
|
10
10
|
* A class for accessing the Products API.
|
|
11
11
|
* @extends BaseApi
|
|
12
12
|
*/
|
|
13
13
|
class ProductsApi extends BaseApi {
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
* Gets the result of a product from the API.
|
|
16
|
+
*
|
|
17
|
+
* @returns {Promise<Product[]>} A promise that resolves with the products.
|
|
18
|
+
*/
|
|
19
19
|
async getHealthCheck() {
|
|
20
20
|
return await this.get(resourceName);
|
|
21
21
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
type ProductId = string;
|
|
2
|
-
type ProductSkuType =
|
|
3
|
-
type ProductCloudType =
|
|
4
|
-
type ProductUnitType =
|
|
5
|
-
type ProductStatus =
|
|
2
|
+
type ProductSkuType = "processing" | "storage" | "transfer";
|
|
3
|
+
type ProductCloudType = "aws" | "gcp" | "azure";
|
|
4
|
+
type ProductUnitType = "bytes" | "average-bytes-per-month";
|
|
5
|
+
type ProductStatus = "active" | "archived";
|
|
6
6
|
interface ProductRate {
|
|
7
7
|
type: string;
|
|
8
8
|
unitPrice: {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* @fileoverview This module provides methods for fetching resources.
|
|
3
3
|
* @author Your Name
|
|
4
4
|
*/
|
|
5
|
-
import { type ApiRecords } from
|
|
6
|
-
import { BaseApi } from
|
|
7
|
-
import { type Resource, type BucketCreationRequest, type UpdateAccessTypeRequest } from
|
|
8
|
-
export { type Resource, type BucketCreationRequest, type UpdateAccessTypeRequest };
|
|
5
|
+
import { type ApiRecords } from "../types";
|
|
6
|
+
import { BaseApi } from "../base-api";
|
|
7
|
+
import { type Resource, type BucketCreationRequest, type UpdateAccessTypeRequest } from "./types";
|
|
8
|
+
export { type Resource, type BucketCreationRequest, type UpdateAccessTypeRequest, };
|
|
9
9
|
/**
|
|
10
10
|
* @class ResourceApi
|
|
11
11
|
* @extends {BaseApi}
|
package/build/resources/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @fileoverview This module provides methods for fetching resources.
|
|
3
3
|
* @author Your Name
|
|
4
4
|
*/
|
|
5
|
-
import { BaseApi } from
|
|
6
|
-
const resourceName =
|
|
5
|
+
import { BaseApi } from "../base-api";
|
|
6
|
+
const resourceName = "resources";
|
|
7
7
|
/**
|
|
8
8
|
* @class ResourceApi
|
|
9
9
|
* @extends {BaseApi}
|
|
@@ -2,7 +2,7 @@ export interface Resource {
|
|
|
2
2
|
id: string;
|
|
3
3
|
company_id: number;
|
|
4
4
|
auth: {
|
|
5
|
-
type:
|
|
5
|
+
type: "bucket_policy" | "role";
|
|
6
6
|
account_id: string;
|
|
7
7
|
external_id?: string;
|
|
8
8
|
role?: string;
|
|
@@ -13,11 +13,11 @@ export interface Resource {
|
|
|
13
13
|
is_access_mutable: boolean;
|
|
14
14
|
}
|
|
15
15
|
export interface RoleBasedBucketAccess {
|
|
16
|
-
type:
|
|
16
|
+
type: "role";
|
|
17
17
|
external_id: string;
|
|
18
18
|
}
|
|
19
19
|
export interface PolicyBasedBucketAccess {
|
|
20
|
-
type:
|
|
20
|
+
type: "bucket_policy";
|
|
21
21
|
}
|
|
22
22
|
export interface UpdateAccessTypeRequest {
|
|
23
23
|
bucket_name: string;
|
package/build/rosetta/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import z from
|
|
1
|
+
import z from "zod";
|
|
2
2
|
declare const ChatCompletionRequestMessageRoleEnum: z.ZodEnum<["system", "user", "assistant", "function"]>;
|
|
3
3
|
type ConversationMessageRole = z.infer<typeof ChatCompletionRequestMessageRoleEnum>;
|
|
4
4
|
declare const isConversationMessageRole: (input: unknown) => input is "function" | "system" | "user" | "assistant";
|
|
@@ -880,24 +880,24 @@ declare const isRosettaRequestMessage: (input: unknown) => input is {
|
|
|
880
880
|
} | {
|
|
881
881
|
type: "history";
|
|
882
882
|
};
|
|
883
|
-
type InfoMessageType =
|
|
883
|
+
type InfoMessageType = "info";
|
|
884
884
|
interface InfoMessageData {
|
|
885
885
|
message: string;
|
|
886
886
|
code?: string;
|
|
887
887
|
}
|
|
888
888
|
interface ConverationHistoryObj {
|
|
889
|
-
type:
|
|
889
|
+
type: "human" | "ai";
|
|
890
890
|
text: string;
|
|
891
891
|
timestamp: number;
|
|
892
892
|
reference?: string;
|
|
893
893
|
reference_type?: string;
|
|
894
894
|
}
|
|
895
|
-
type ConversationHistoryType =
|
|
895
|
+
type ConversationHistoryType = "history";
|
|
896
896
|
interface ConversationHistoryData {
|
|
897
897
|
history: ConverationHistoryObj[];
|
|
898
898
|
}
|
|
899
|
-
type ConversationUpdatedType =
|
|
900
|
-
type ConversationDeletedType =
|
|
899
|
+
type ConversationUpdatedType = "conversationUpdated";
|
|
900
|
+
type ConversationDeletedType = "conversationDeleted";
|
|
901
901
|
interface ConversationUpdatedData {
|
|
902
902
|
change: ConversationDeletedType;
|
|
903
903
|
message?: string;
|
|
@@ -920,7 +920,7 @@ interface ConversationSummary {
|
|
|
920
920
|
description?: string;
|
|
921
921
|
timestamp?: string;
|
|
922
922
|
}
|
|
923
|
-
type ConversationsType =
|
|
923
|
+
type ConversationsType = "userConversations";
|
|
924
924
|
interface ConversationsData {
|
|
925
925
|
userConversations: ConversationSummary[];
|
|
926
926
|
}
|
|
@@ -928,11 +928,11 @@ interface ConversationListMessage {
|
|
|
928
928
|
type: ConversationsType;
|
|
929
929
|
data: ConversationsData;
|
|
930
930
|
}
|
|
931
|
-
type PongType =
|
|
931
|
+
type PongType = "pong";
|
|
932
932
|
interface PongMessage {
|
|
933
933
|
type: PongType;
|
|
934
934
|
}
|
|
935
|
-
type ErrorType =
|
|
935
|
+
type ErrorType = "error";
|
|
936
936
|
interface ErrorData {
|
|
937
937
|
message: string;
|
|
938
938
|
code?: string;
|
|
@@ -941,7 +941,7 @@ interface ErrorMessage {
|
|
|
941
941
|
type: ErrorType;
|
|
942
942
|
data: ErrorData;
|
|
943
943
|
}
|
|
944
|
-
type ThoughtType =
|
|
944
|
+
type ThoughtType = "thought-start";
|
|
945
945
|
interface ThoughtData {
|
|
946
946
|
text: string;
|
|
947
947
|
timestamp?: string;
|
|
@@ -950,7 +950,7 @@ interface ThoughtMessage {
|
|
|
950
950
|
type: ThoughtType;
|
|
951
951
|
data: ThoughtData;
|
|
952
952
|
}
|
|
953
|
-
type ResponseType =
|
|
953
|
+
type ResponseType = "response";
|
|
954
954
|
interface ResponseData {
|
|
955
955
|
response: string;
|
|
956
956
|
reference_type?: string;
|
|
@@ -963,4 +963,4 @@ interface RespomseMessage {
|
|
|
963
963
|
}
|
|
964
964
|
type RosettaResponseMessage = InfoMessage | HistoryMessage | ConversationUpdatedMessage | PongMessage | ErrorMessage | ThoughtMessage | RespomseMessage | ConversationListMessage;
|
|
965
965
|
declare function isType<T>(input: unknown, schema: z.ZodType<T>): input is T;
|
|
966
|
-
export { type ConversationMessageRole, isConversationMessageRole, type ConversationMessageName, isConversationMessageName, type ConversationUserMessage, isConversationUserMessage, type ConversationAssistantMessage, isConversationAssistantMessage, type ConversationSystemMessage, isConversationSystemMessage, type ConversationFunctionMessage, isConversationFunctionMessage, type ConversationMessage, isConversationMessage, type ConversationIOMessage, isConversationInputMessage, type ConversationMessages, isConversationMessages, isType, type RosettaRequestMessage, isRosettaRequestMessage, type RosettaResponseMessage, type ConversationMessageFunctionCall, isConversationMessageFunctionCall, type ConversationAssistantMessageWithFunctionCall, isConversationAssistantMessageWithFunctionCall, type ConversationAssistantMessageWithoutFunctionCall, isConversationAssistantMessageWithoutFunctionCall };
|
|
966
|
+
export { type ConversationMessageRole, isConversationMessageRole, type ConversationMessageName, isConversationMessageName, type ConversationUserMessage, isConversationUserMessage, type ConversationAssistantMessage, isConversationAssistantMessage, type ConversationSystemMessage, isConversationSystemMessage, type ConversationFunctionMessage, isConversationFunctionMessage, type ConversationMessage, isConversationMessage, type ConversationIOMessage, isConversationInputMessage, type ConversationMessages, isConversationMessages, isType, type RosettaRequestMessage, isRosettaRequestMessage, type RosettaResponseMessage, type ConversationMessageFunctionCall, isConversationMessageFunctionCall, type ConversationAssistantMessageWithFunctionCall, isConversationAssistantMessageWithFunctionCall, type ConversationAssistantMessageWithoutFunctionCall, isConversationAssistantMessageWithoutFunctionCall, };
|