@squidcloud/client 1.0.263 → 1.0.265
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/dist/cjs/index.js +1 -1
- package/dist/internal-common/src/public-types/metric.public-types.d.ts +10 -1
- package/dist/internal-common/src/types/time-units.d.ts +1 -0
- package/dist/internal-common/src/utils/e2e-test-utils.d.ts +2 -0
- package/dist/internal-common/src/utils/global.utils.d.ts +1 -1
- package/dist/internal-common/src/utils/metric-utils.d.ts +4 -0
- package/dist/internal-common/src/utils/validation.d.ts +1 -1
- package/dist/typescript-client/src/ai.types.d.ts +16 -0
- package/dist/typescript-client/src/query/join-query-builder.factory.d.ts +1 -4
- package/dist/typescript-client/src/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* A timestamp + value pair. If there is no data for the point 'null' value is used.
|
|
3
|
+
* The timestamp is always equal to the point period start date and is measured in Unix epoch seconds.
|
|
4
|
+
*/
|
|
5
|
+
export type QueryMetricResultPoint = [number, number | null];
|
|
6
|
+
export interface QueryMetricResultGroup {
|
|
7
|
+
/** Values of the tags in the group. The tags are ordered the same way as in request.groupByTags collection. */
|
|
8
|
+
tagValues: string[];
|
|
9
|
+
points: Array<QueryMetricResultPoint>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function isTimestampEnabled(): boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { QueryMetricRequestCommon, QueryMetricResultGroup } from '../public-types/metric.public-types';
|
|
2
|
+
export type QueryMetricRequestIntervals = Required<Pick<QueryMetricRequestCommon, 'fillValue' | 'groupByTags' | 'periodEndSeconds' | 'periodStartSeconds' | 'pointIntervalAlignment' | 'pointIntervalSeconds' | 'tagDomains' | 'noDataBehavior'>>;
|
|
3
|
+
/** Adds missed known tag domain groups and fills all missed points with a request.fillValue. */
|
|
4
|
+
export declare function fillMissedPoints(request: QueryMetricRequestIntervals, resultGroups: Array<QueryMetricResultGroup>): void;
|
|
@@ -5,7 +5,7 @@ export declare class ValidationError extends Error {
|
|
|
5
5
|
readonly details?: any;
|
|
6
6
|
constructor(error: string, statusCode: StatusCode, details?: Record<string, any>);
|
|
7
7
|
}
|
|
8
|
-
export declare function isValidId(id: unknown): boolean;
|
|
8
|
+
export declare function isValidId(id: unknown, maxLength?: number): boolean;
|
|
9
9
|
export declare function validateFieldSort(fieldSort: unknown): void;
|
|
10
10
|
export declare function validateQueryLimit(limit: unknown): void;
|
|
11
11
|
/**
|
|
@@ -7,6 +7,10 @@ export interface ExecuteAiQueryRequest {
|
|
|
7
7
|
integrationId: IntegrationId;
|
|
8
8
|
prompt: string;
|
|
9
9
|
}
|
|
10
|
+
export interface ExecuteAiQueryMultiRequest {
|
|
11
|
+
integrationIds: Array<IntegrationId>;
|
|
12
|
+
prompt: string;
|
|
13
|
+
}
|
|
10
14
|
export interface ExecuteAiQueryResponse {
|
|
11
15
|
answer: string;
|
|
12
16
|
explanation?: string;
|
|
@@ -14,6 +18,16 @@ export interface ExecuteAiQueryResponse {
|
|
|
14
18
|
queryMarkdownType?: string;
|
|
15
19
|
success: boolean;
|
|
16
20
|
}
|
|
21
|
+
interface ExecutedQuery {
|
|
22
|
+
query: string;
|
|
23
|
+
markdownType: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ExecuteAiQueryMultiResponse {
|
|
26
|
+
answer: string;
|
|
27
|
+
explanation?: string;
|
|
28
|
+
executedQueries: Array<ExecutedQuery>;
|
|
29
|
+
success: boolean;
|
|
30
|
+
}
|
|
17
31
|
/**
|
|
18
32
|
* AiClient class serves as a facade for interacting with different AI services.
|
|
19
33
|
* It provides simplified access to AI chatbot and assistant functionalities
|
|
@@ -67,4 +81,6 @@ export declare class AiClient {
|
|
|
67
81
|
* {@link https://docs.squid.cloud/docs/ai}.
|
|
68
82
|
*/
|
|
69
83
|
executeAiQuery(integrationId: IntegrationId, prompt: string): Promise<ExecuteAiQueryResponse>;
|
|
84
|
+
executeAiQueryMulti(integrationIds: Array<IntegrationId>, prompt: string): Promise<ExecuteAiQueryMultiResponse>;
|
|
70
85
|
}
|
|
86
|
+
export {};
|
|
@@ -119,6 +119,7 @@ export declare class JoinQueryBuilder<Aliases extends Record<Alias, Alias[]>, Re
|
|
|
119
119
|
extractData(data: WithDocumentReferences<ReturnType>): Required<ReturnType>[RootAlias];
|
|
120
120
|
serialize(): SerializedJoinQuery;
|
|
121
121
|
paginate(options?: Partial<PaginationOptions>): Pagination<WithDocumentReferences<ReturnType>>;
|
|
122
|
+
hasIsInner(): boolean;
|
|
122
123
|
}
|
|
123
124
|
declare class DereferencedJoin<Aliases extends Record<Alias, Alias[]>, ReturnType extends Record<Alias, DocumentData>, RootAlias extends Alias, LatestAlias extends Alias> implements SnapshotEmitter<ReturnType>, HasGrouped {
|
|
124
125
|
private readonly joinQueryBuilder;
|
|
@@ -137,11 +138,9 @@ declare class DereferencedJoin<Aliases extends Record<Alias, Alias[]>, ReturnTyp
|
|
|
137
138
|
clone(): DereferencedJoin<Aliases, ReturnType, RootAlias, LatestAlias>;
|
|
138
139
|
addCompositeCondition(conditions: Array<SimpleCondition>): DereferencedJoin<Aliases, ReturnType, RootAlias, LatestAlias>;
|
|
139
140
|
flipSortOrder(): DereferencedJoin<Aliases, ReturnType, RootAlias, LatestAlias>;
|
|
140
|
-
limit(limit: number): DereferencedJoin<Aliases, ReturnType, RootAlias, LatestAlias>;
|
|
141
141
|
extractData(data: ReturnType): any;
|
|
142
142
|
paginate(options?: Partial<PaginationOptions>): Pagination<ReturnType>;
|
|
143
143
|
serialize(): SerializedJoinQuery;
|
|
144
|
-
getLimit(): number;
|
|
145
144
|
}
|
|
146
145
|
declare class GroupedJoin<Aliases extends Record<Alias, Alias[]>, ReturnType extends Record<Alias, DocumentData>, RootAlias extends Alias, LatestAlias extends Alias> implements SnapshotEmitter<Grouped<Aliases, WithDocumentReferences<ReturnType>, RootAlias>>, HasDereference {
|
|
147
146
|
readonly joinQueryBuilder: JoinQueryBuilder<Aliases, ReturnType, LatestAlias, RootAlias>;
|
|
@@ -162,8 +161,6 @@ declare class GroupedJoin<Aliases extends Record<Alias, Alias[]>, ReturnType ext
|
|
|
162
161
|
clone(): GroupedJoin<Aliases, ReturnType, RootAlias, LatestAlias>;
|
|
163
162
|
addCompositeCondition(conditions: Array<SimpleCondition>): GroupedJoin<Aliases, ReturnType, RootAlias, LatestAlias>;
|
|
164
163
|
flipSortOrder(): GroupedJoin<Aliases, ReturnType, RootAlias, LatestAlias>;
|
|
165
|
-
limit(limit: number): GroupedJoin<Aliases, ReturnType, RootAlias, LatestAlias>;
|
|
166
|
-
getLimit(): number;
|
|
167
164
|
extractData(data: Grouped<Aliases, WithDocumentReferences<ReturnType>, RootAlias>): any;
|
|
168
165
|
serialize(): SerializedJoinQuery;
|
|
169
166
|
paginate(options?: Partial<PaginationOptions>): Pagination<Grouped<Aliases, WithDocumentReferences<ReturnType>, RootAlias>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.
|
|
1
|
+
export declare const SQUIDCLOUD_CLIENT_PACKAGE_VERSION = "1.0.265";
|