@squidcloud/client 1.0.338 → 1.0.339
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/ai-agent.public-types.d.ts +287 -62
- package/dist/internal-common/src/public-types/ai-assistant.public-types.d.ts +9 -2
- package/dist/internal-common/src/public-types/ai-matchmaking.types.d.ts +6 -0
- package/dist/internal-common/src/public-types/backend.public-types.d.ts +13 -0
- package/dist/internal-common/src/public-types/communication.public-types.d.ts +7 -0
- package/dist/internal-common/src/public-types/context.public-types.d.ts +12 -1
- package/dist/internal-common/src/public-types/document.public-types.d.ts +42 -12
- package/dist/internal-common/src/public-types/extraction.public-types.d.ts +21 -0
- package/dist/internal-common/src/public-types/integration.public-types.d.ts +16 -2
- package/dist/internal-common/src/public-types/integrations/api.public-types.d.ts +0 -11
- package/dist/internal-common/src/public-types/query.public-types.d.ts +35 -7
- package/dist/internal-common/src/public-types/scheduler.public-types.d.ts +13 -4
- package/dist/internal-common/src/public-types/secret.public-types.d.ts +24 -7
- package/dist/internal-common/src/public-types/serialized-query.public-types.d.ts +12 -0
- package/dist/internal-common/src/public-types/typescript.public-types.d.ts +0 -3
- package/dist/typescript-client/src/admin-client.d.ts +1 -0
- package/dist/typescript-client/src/agent/ai-agent-client-reference.d.ts +73 -2
- package/dist/typescript-client/src/agent/ai-agent-client.d.ts +1 -0
- package/dist/typescript-client/src/agent/ai-agent-client.types.d.ts +8 -1
- package/dist/typescript-client/src/ai-assistant-client.d.ts +3 -2
- package/dist/typescript-client/src/ai-audio-client.d.ts +15 -0
- package/dist/typescript-client/src/ai-client.d.ts +5 -0
- package/dist/typescript-client/src/ai-image-client.d.ts +16 -1
- package/dist/typescript-client/src/ai-matchmaking-client.d.ts +57 -11
- package/dist/typescript-client/src/ai.types.d.ts +24 -30
- package/dist/typescript-client/src/api-client.d.ts +1 -0
- package/dist/typescript-client/src/auth.manager.d.ts +4 -1
- package/dist/typescript-client/src/collection-reference.d.ts +2 -0
- package/dist/typescript-client/src/connection-details.d.ts +1 -0
- package/dist/typescript-client/src/destruct.manager.d.ts +1 -21
- package/dist/typescript-client/src/distributed-lock.manager.d.ts +4 -1
- package/dist/typescript-client/src/document-reference.d.ts +1 -0
- package/dist/typescript-client/src/document-store.d.ts +1 -17
- package/dist/typescript-client/src/extraction-client.d.ts +1 -0
- package/dist/typescript-client/src/integration-client.d.ts +1 -0
- package/dist/typescript-client/src/observability-client.d.ts +5 -1
- package/dist/typescript-client/src/personal-storage-client.d.ts +23 -4
- package/dist/typescript-client/src/public-types.d.ts +1 -4
- package/dist/typescript-client/src/query/deserializer.d.ts +1 -0
- package/dist/typescript-client/src/query/join-query-builder.factory.d.ts +34 -8
- package/dist/typescript-client/src/query/pagination.d.ts +10 -10
- package/dist/typescript-client/src/query/query-builder.factory.d.ts +12 -4
- package/dist/typescript-client/src/query/query-subscription.manager.d.ts +1 -12
- package/dist/typescript-client/src/query/query.types.d.ts +2 -93
- package/dist/typescript-client/src/query/snapshot-emitter.d.ts +1 -0
- package/dist/typescript-client/src/query-utils.d.ts +5 -1
- package/dist/typescript-client/src/queue.manager.d.ts +1 -0
- package/dist/typescript-client/src/scheduler-client.d.ts +1 -0
- package/dist/typescript-client/src/secret.client.d.ts +2 -0
- package/dist/typescript-client/src/squid.d.ts +16 -4
- package/dist/typescript-client/src/storage-client.d.ts +9 -9
- package/dist/typescript-client/src/types.d.ts +4 -1
- package/dist/typescript-client/src/version.d.ts +2 -2
- package/package.json +6 -2
- package/dist/internal-common/src/metric-name.d.ts +0 -9
- package/dist/internal-common/src/public-types/application.public-types.d.ts +0 -94
- package/dist/internal-common/src/public-types/bundle-data.public-types.d.ts +0 -33
- package/dist/internal-common/src/public-types/mutation.public-types.d.ts +0 -54
- package/dist/internal-common/src/public-types/storage.types.d.ts +0 -9
- package/dist/internal-common/src/public-types-backend/api-call.public-context.d.ts +0 -21
- package/dist/internal-common/src/public-types-backend/native-query.public-context.d.ts +0 -18
- package/dist/internal-common/src/public-types-backend/query.public-context.d.ts +0 -127
- package/dist/internal-common/src/types/ai-agent.types.d.ts +0 -1
- package/dist/internal-common/src/types/ai-assistant.types.d.ts +0 -1
- package/dist/internal-common/src/types/ai-matchmaking.types.d.ts +0 -53
- package/dist/internal-common/src/types/backend-function.types.d.ts +0 -1
- package/dist/internal-common/src/types/communication.types.d.ts +0 -1
- package/dist/internal-common/src/types/document.types.d.ts +0 -1
- package/dist/internal-common/src/types/mutation.types.d.ts +0 -1
- package/dist/internal-common/src/types/observability.types.d.ts +0 -71
- package/dist/internal-common/src/types/query.types.d.ts +0 -10
- package/dist/internal-common/src/types/secret.types.d.ts +0 -2
- package/dist/internal-common/src/types/socket.types.d.ts +0 -1
- package/dist/internal-common/src/types/time-units.d.ts +0 -1
- package/dist/internal-common/src/utils/array.d.ts +0 -1
- package/dist/internal-common/src/utils/e2e-test-utils.d.ts +0 -2
- package/dist/internal-common/src/utils/global.utils.d.ts +0 -1
- package/dist/internal-common/src/utils/http.d.ts +0 -1
- package/dist/internal-common/src/utils/lock.manager.d.ts +0 -14
- package/dist/internal-common/src/utils/metric-utils.d.ts +0 -4
- package/dist/internal-common/src/utils/metrics.types.d.ts +0 -7
- package/dist/internal-common/src/utils/object.d.ts +0 -49
- package/dist/internal-common/src/utils/serialization.d.ts +0 -5
- package/dist/internal-common/src/utils/squid.constants.d.ts +0 -1
- package/dist/internal-common/src/utils/validation.d.ts +0 -19
- package/dist/internal-common/src/websocket.impl.d.ts +0 -26
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { IntegrationId } from '../public-types/communication.public-types';
|
|
2
|
-
export type NativeQueryRequestType = 'relational' | 'mongo';
|
|
3
|
-
interface BaseNativeQueryContext {
|
|
4
|
-
type: NativeQueryRequestType;
|
|
5
|
-
integrationId: IntegrationId;
|
|
6
|
-
}
|
|
7
|
-
export interface RelationalNativeQueryContext extends BaseNativeQueryContext {
|
|
8
|
-
type: 'relational';
|
|
9
|
-
query: string;
|
|
10
|
-
params: Record<string, any>;
|
|
11
|
-
}
|
|
12
|
-
export interface MongoNativeQueryContext extends BaseNativeQueryContext {
|
|
13
|
-
type: 'mongo';
|
|
14
|
-
collectionName: string;
|
|
15
|
-
aggregationPipeline: Array<any | undefined>;
|
|
16
|
-
}
|
|
17
|
-
export type NativeQueryContext = RelationalNativeQueryContext | MongoNativeQueryContext;
|
|
18
|
-
export {};
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { FieldSort, Operator, Query, SimpleCondition } from '../public-types/query.public-types';
|
|
2
|
-
import { DeepRecord, FieldOf, PartialBy, Paths } from '../public-types/typescript.public-types';
|
|
3
|
-
import { CollectionName, DocumentData } from '../public-types/document.public-types';
|
|
4
|
-
import { IntegrationId } from '../public-types/communication.public-types';
|
|
5
|
-
/**
|
|
6
|
-
* Represents the Squid query context.
|
|
7
|
-
* Passed to methods that require query details, such as those annotated with the `@secureCollection` annotation.
|
|
8
|
-
*/
|
|
9
|
-
export declare class QueryContext<T extends DocumentData = any> {
|
|
10
|
-
readonly query: Query<T>;
|
|
11
|
-
/**
|
|
12
|
-
* The ID of the integration being queried.
|
|
13
|
-
*/
|
|
14
|
-
get integrationId(): IntegrationId;
|
|
15
|
-
/**
|
|
16
|
-
* The name of the collection being queried.
|
|
17
|
-
*/
|
|
18
|
-
get collectionName(): CollectionName;
|
|
19
|
-
/**
|
|
20
|
-
* The query limit if one exists, -1 otherwise.
|
|
21
|
-
*/
|
|
22
|
-
get limit(): number;
|
|
23
|
-
/**
|
|
24
|
-
* Verifies that the query's sort order aligns with the provided field sorts. The fields specified in the `sorts`
|
|
25
|
-
* parameter must appear in the exact order at the beginning of the query's sort sequence. The query can include
|
|
26
|
-
* additional fields in its sort order, but only after the specified sorts.
|
|
27
|
-
*
|
|
28
|
-
* @param sorts An array of field sorts.
|
|
29
|
-
* @returns Whether the query's sorts matches the provided field sorts.
|
|
30
|
-
*/
|
|
31
|
-
sortedBy(sorts: Array<PartialBy<FieldSort<T>, 'asc'>>): boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Verifies that the query's sort order exactly matches the provided field sorts. The fields specified in the
|
|
34
|
-
* `sorts` parameter must appear in the exact order in the query's sort sequence. No additional sorts may be present
|
|
35
|
-
* in the query.
|
|
36
|
-
*
|
|
37
|
-
* @param sorts An array of field sorts.
|
|
38
|
-
* @returns Whether the query's sorts exactly match the provided field sorts.
|
|
39
|
-
*/
|
|
40
|
-
sortedByExact(sorts: Array<PartialBy<FieldSort<T>, 'asc'>>): boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Verifies that the query is a subquery of the specified condition. A subquery is defined as a query that evaluates
|
|
43
|
-
* to a subset of the results that would be obtained by applying the parent condition. The subquery may also include
|
|
44
|
-
* additional conditions, as these only narrow the result set.
|
|
45
|
-
*
|
|
46
|
-
* @param fieldName The name of the field for the condition.
|
|
47
|
-
* @param operator The operator of the condition.
|
|
48
|
-
* @param value The value of the condition.
|
|
49
|
-
* @returns Whether the query is a subquery of the parent condition.
|
|
50
|
-
*/
|
|
51
|
-
isSubqueryOf<F extends Paths<T>, O extends AllOperators>(fieldName: F, operator: O, value: GenericValue<T, F, O> | null): boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Verifies that the query is a subquery of the specified condition. A subquery is defined as a query that evaluates
|
|
54
|
-
* to a subset of the results that would be obtained by applying the parent condition. The subquery may also include
|
|
55
|
-
* additional conditions, as these only narrow the result set.
|
|
56
|
-
*
|
|
57
|
-
* @param condition The condition to validate.
|
|
58
|
-
* @returns Whether the query is a subquery of the parent condition.
|
|
59
|
-
*/
|
|
60
|
-
isSubqueryOfCondition(condition: GeneralCondition<T>): boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Verifies that the query is a subquery of the specified conditions. A subquery is defined as a query that evaluates
|
|
63
|
-
* to a subset of the results that would be obtained by applying the parent conditions. The subquery may also include
|
|
64
|
-
* additional conditions, as these only narrow the result set.
|
|
65
|
-
*
|
|
66
|
-
* @param conditions The conditions to validate.
|
|
67
|
-
* @returns Whether the query includes subquery of the parent conditions.
|
|
68
|
-
*/
|
|
69
|
-
isSubqueryOfConditions(conditions: GeneralConditions<T>): boolean;
|
|
70
|
-
/**
|
|
71
|
-
* Verifies that the query is a subquery of the specified query. A subquery is defined as a query that evaluates
|
|
72
|
-
* to a subset of the results that obtained for the parent query, including sorts and limits.
|
|
73
|
-
*
|
|
74
|
-
* @param query The query to validate.
|
|
75
|
-
* @returns Whether the query is a subquery of the parent query.
|
|
76
|
-
*/
|
|
77
|
-
isSubqueryOfQuery(query: Query<T>): boolean;
|
|
78
|
-
/**
|
|
79
|
-
* Returns all conditions that apply to any of the specified field names. This method
|
|
80
|
-
* provides a convenient way to retrieve all conditions that involve a specific set of fields.
|
|
81
|
-
*
|
|
82
|
-
* @param fieldNames The field names for which to retrieve conditions.
|
|
83
|
-
* @returns An array of conditions that involve any of the specified field names.
|
|
84
|
-
*/
|
|
85
|
-
getConditionsFor<K extends Paths<T>>(...fieldNames: Array<K>): ContextConditions<T, K>;
|
|
86
|
-
/**
|
|
87
|
-
* Returns all conditions that apply to the specified field name. This method provides
|
|
88
|
-
* a convenient way to retrieve all conditions that involve a specific field.
|
|
89
|
-
*
|
|
90
|
-
* @param fieldName The field name for which to retrieve conditions.
|
|
91
|
-
* @returns An array of conditions that involve the specified field name.
|
|
92
|
-
*/
|
|
93
|
-
getConditionsForField<K extends Paths<T>>(fieldName: K): ContextConditions<T>;
|
|
94
|
-
/**
|
|
95
|
-
* Returns true if the given document can be a result of the query.
|
|
96
|
-
* The method does not account for limit and sort order.
|
|
97
|
-
*/
|
|
98
|
-
documentMatchesQuery(doc: DocumentData): boolean;
|
|
99
|
-
}
|
|
100
|
-
/** A list of context conditions */
|
|
101
|
-
export type ContextConditions<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> = Array<ContextCondition<Doc, F>>;
|
|
102
|
-
/** A Context condition - a condition that replaces multiple '==' or '!=' conditions with 'in' and 'not in'. */
|
|
103
|
-
export type ContextCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> = InContextCondition<Doc, F> | NotInContextCondition<Doc, F> | OtherContextCondition<Doc, F>;
|
|
104
|
-
export interface InContextCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> extends SimpleCondition<Doc, F, 'in'> {
|
|
105
|
-
operator: 'in';
|
|
106
|
-
value: Array<FieldOf<DeepRecord<Doc>, Paths<Doc>> | any>;
|
|
107
|
-
}
|
|
108
|
-
export interface NotInContextCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> extends SimpleCondition<Doc, F, 'not in'> {
|
|
109
|
-
operator: 'not in';
|
|
110
|
-
value: Array<FieldOf<DeepRecord<Doc>, Paths<Doc>> | any>;
|
|
111
|
-
}
|
|
112
|
-
export interface OtherContextCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> extends SimpleCondition<Doc, F, Exclude<ContextOperator, 'in' | 'not in'>> {
|
|
113
|
-
operator: Exclude<ContextOperator, 'in' | 'not in'>;
|
|
114
|
-
value: FieldOf<DeepRecord<Doc>, Paths<Doc>> | any;
|
|
115
|
-
}
|
|
116
|
-
/** A condition that includes the 'in' and 'not in' operators. */
|
|
117
|
-
export interface GeneralCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> extends SimpleCondition<Doc, F, AllOperators> {
|
|
118
|
-
operator: AllOperators;
|
|
119
|
-
value: any;
|
|
120
|
-
}
|
|
121
|
-
/** A list of general conditions. */
|
|
122
|
-
export type GeneralConditions<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> = Array<GeneralCondition<Doc, F>>;
|
|
123
|
-
export type ContextOperator = Exclude<Operator, '==' | '!='> | 'in' | 'not in';
|
|
124
|
-
type AllOperators = Operator | 'in' | 'not in';
|
|
125
|
-
/** A generic value that can exist in a query. */
|
|
126
|
-
export type GenericValue<Doc = any, F extends Paths<Doc> = Paths<Doc>, O extends AllOperators = any> = O extends 'in' ? Array<DeepRecord<Doc>[F]> | null : O extends 'not in' ? Array<DeepRecord<Doc>[F]> | null : DeepRecord<Doc>[F] | null;
|
|
127
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { MmEntity, MmEntityMatch, MmFindMatchesOptions, MmListEntitiesOptions, MmMatchMaker } from '../public-types/ai-matchmaking.types';
|
|
2
|
-
export interface MmCreateMatchMakerRequest {
|
|
3
|
-
matchMaker: MmMatchMaker;
|
|
4
|
-
}
|
|
5
|
-
export interface MmDeleteMatchMakerRequest {
|
|
6
|
-
matchMakerId: string;
|
|
7
|
-
}
|
|
8
|
-
export interface MmGetMatchMakerRequest {
|
|
9
|
-
matchMakerId: string;
|
|
10
|
-
}
|
|
11
|
-
export interface MmGetMatchMakerResponse {
|
|
12
|
-
matchMaker: MmMatchMaker | undefined;
|
|
13
|
-
}
|
|
14
|
-
export interface MmDeleteEntityRequest {
|
|
15
|
-
matchMakerId: string;
|
|
16
|
-
entityId: string;
|
|
17
|
-
}
|
|
18
|
-
export interface MmInsertEntityRequest {
|
|
19
|
-
matchMakerId: string;
|
|
20
|
-
entity: MmEntity;
|
|
21
|
-
}
|
|
22
|
-
export interface MmInsertEntitiesRequest {
|
|
23
|
-
matchMakerId: string;
|
|
24
|
-
entities: Array<MmEntity>;
|
|
25
|
-
}
|
|
26
|
-
export interface MmFindMatchesRequest {
|
|
27
|
-
matchMakerId: string;
|
|
28
|
-
entityId: string;
|
|
29
|
-
options: MmFindMatchesOptions;
|
|
30
|
-
}
|
|
31
|
-
export interface MmFindMatchesResponse {
|
|
32
|
-
matches: Array<MmEntityMatch>;
|
|
33
|
-
}
|
|
34
|
-
export interface MmFindMatchesForEntityRequest {
|
|
35
|
-
matchMakerId: string;
|
|
36
|
-
entity: Omit<MmEntity, 'metadata' | 'id'>;
|
|
37
|
-
options: MmFindMatchesOptions;
|
|
38
|
-
}
|
|
39
|
-
export interface MmFindMatchesForEntityResponse {
|
|
40
|
-
matches: Array<MmEntityMatch>;
|
|
41
|
-
}
|
|
42
|
-
export interface MmListEntitiesRequest {
|
|
43
|
-
matchMakerId: string;
|
|
44
|
-
categoryId: string;
|
|
45
|
-
options: MmListEntitiesOptions;
|
|
46
|
-
}
|
|
47
|
-
export interface MmGetEntityRequest {
|
|
48
|
-
matchMakerId: string;
|
|
49
|
-
entityId: string;
|
|
50
|
-
}
|
|
51
|
-
export interface MmGetEntityResponse {
|
|
52
|
-
entity: MmEntity | undefined;
|
|
53
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type ChatId = string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { MetricName } from '../metric-name';
|
|
2
|
-
import { AppId } from '../public-types/communication.public-types';
|
|
3
|
-
export interface ObservableNameMetrics {
|
|
4
|
-
count: MetricName;
|
|
5
|
-
time: MetricName;
|
|
6
|
-
}
|
|
7
|
-
export declare const ObservableNames: {
|
|
8
|
-
readonly functionExecution: ObservableNameMetrics;
|
|
9
|
-
readonly codeInitialization: ObservableNameMetrics;
|
|
10
|
-
readonly getAiChatbotProfiles: ObservableNameMetrics;
|
|
11
|
-
readonly aiImageGeneration: ObservableNameMetrics;
|
|
12
|
-
readonly aiRemoveBackground: ObservableNameMetrics;
|
|
13
|
-
readonly aiAudioTranscribe: ObservableNameMetrics;
|
|
14
|
-
readonly aiAudioCreateSpeech: ObservableNameMetrics;
|
|
15
|
-
readonly discoverGraphQLConnectionSchema: ObservableNameMetrics;
|
|
16
|
-
readonly discoverOpenApiSchema: ObservableNameMetrics;
|
|
17
|
-
readonly discoverOpenApiSchemaFromFile: ObservableNameMetrics;
|
|
18
|
-
readonly graphqlQuery: ObservableNameMetrics;
|
|
19
|
-
readonly testGraphQLConnection: ObservableNameMetrics;
|
|
20
|
-
readonly graphql: ObservableNameMetrics;
|
|
21
|
-
};
|
|
22
|
-
export type ObservableName = keyof typeof ObservableNames;
|
|
23
|
-
export interface MetricEvent {
|
|
24
|
-
appId: AppId;
|
|
25
|
-
name: MetricName;
|
|
26
|
-
tags: Record<string, string>;
|
|
27
|
-
timestamp: Date;
|
|
28
|
-
value: number;
|
|
29
|
-
isExposedToUser: boolean;
|
|
30
|
-
}
|
|
31
|
-
export interface LogEvent {
|
|
32
|
-
message: string;
|
|
33
|
-
level: string;
|
|
34
|
-
tags: Record<string, string>;
|
|
35
|
-
timestamp: Date;
|
|
36
|
-
isExposedToUser: boolean;
|
|
37
|
-
host: string;
|
|
38
|
-
source?: string;
|
|
39
|
-
service?: string;
|
|
40
|
-
}
|
|
41
|
-
export declare const AUDIT_LOG_EVENT_NAMES: readonly ["ai_agent"];
|
|
42
|
-
export type AuditLogEventName = (typeof AUDIT_LOG_EVENT_NAMES)[number];
|
|
43
|
-
export interface AuditLogEvent {
|
|
44
|
-
appId: AppId;
|
|
45
|
-
name: AuditLogEventName;
|
|
46
|
-
timestamp: Date;
|
|
47
|
-
context: {
|
|
48
|
-
clientId?: string;
|
|
49
|
-
userId: string;
|
|
50
|
-
};
|
|
51
|
-
tags: Record<string, string>;
|
|
52
|
-
}
|
|
53
|
-
/** Tag for metric events. Value: '0' - not an error, '1' - is an error. */
|
|
54
|
-
export declare const O11Y_TAG_IS_ERROR = "isError";
|
|
55
|
-
/** Tag for log events. Metrics have an explicit appId field. */
|
|
56
|
-
export declare const O11Y_TAG_APP_ID = "appId";
|
|
57
|
-
/** Tag for metric and log events. */
|
|
58
|
-
export declare const O11Y_TAG_INTEGRATION_ID = "integrationId";
|
|
59
|
-
/** Tag for AI events. */
|
|
60
|
-
export declare const O11Y_TAG_AI_MODEL = "aiModel";
|
|
61
|
-
export declare const O11Y_TAG_AI_PROFILE = "aiProfile";
|
|
62
|
-
export declare const O11Y_TAG_API_KEY_SOURCE = "apiKeySource";
|
|
63
|
-
/** Tag for metric and log events. Value: '0' - not a tenant originated, '1' - is a tenant originated. */
|
|
64
|
-
export declare const O11Y_TAG_IS_TENANT_ORIGINATED = "isTenantOriginated";
|
|
65
|
-
/** Contains a full (with a service name) function name for backend functions. */
|
|
66
|
-
export declare const O11Y_TAG_FUNCTION_NAME = "functionName";
|
|
67
|
-
/** Contains a type of the function name for backend functions (See ExecuteFunctionAnnotationType.). */
|
|
68
|
-
export declare const O11Y_TAG_FUNCTION_TYPE = "functionType";
|
|
69
|
-
export declare function getBooleanMetricTagValue(value: boolean): string;
|
|
70
|
-
export declare const COUNT_METRIC_SUFFIXES: string[];
|
|
71
|
-
export declare const GAUGE_METRIC_SUFFIXES: string[];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generates the regex pattern, handling special characters as follows:
|
|
3
|
-
* - `_` is replaced with a `.`
|
|
4
|
-
* - `%` is replaced with `[\s\S]*`.
|
|
5
|
-
* - The above characters can be escaped with \, eg. `\_` is replaced with `_` and `\%` with `%`.
|
|
6
|
-
* - All special characters in regex (-, /, \, ^, $, *, +, ?, ., (, ), |, [, ], {, }) get escaped with \
|
|
7
|
-
*
|
|
8
|
-
* Exported for testing purposes.
|
|
9
|
-
* */
|
|
10
|
-
export declare function replaceSpecialCharacters(input: string): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SOCKET_RECONNECT_TIMEOUT: number;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isTimestampEnabled(): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getApplicationUrl(regionPrefix: string, appId: string, path: string): string;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
type LockMutex = string;
|
|
2
|
-
/**
|
|
3
|
-
* A simple lock manager that locks a list of mutexes.
|
|
4
|
-
* When locking a list of mutexes, the lock will start only when all the mutexes are available - preventing partial lock
|
|
5
|
-
* and potential deadlocks.
|
|
6
|
-
*/
|
|
7
|
-
export declare class LockManager {
|
|
8
|
-
private readonly locks;
|
|
9
|
-
lock(...mutexes: LockMutex[]): Promise<void>;
|
|
10
|
-
release(...mutexes: LockMutex[]): void;
|
|
11
|
-
canGetLock(...mutexes: LockMutex[]): boolean;
|
|
12
|
-
lockSync(...mutexes: LockMutex[]): void;
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { QueryMetricsRequestCommon, QueryMetricsResultGroup } from '../public-types/metric.public-types';
|
|
2
|
-
export type QueryMetricsRequestIntervals = Required<Pick<QueryMetricsRequestCommon, 'fillValue' | 'fn' | '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: QueryMetricsRequestIntervals, resultGroups: Array<QueryMetricsResultGroup>): void;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type suffixes defines the type of the metric and can be used for
|
|
3
|
-
* metric value validation for incoming metrics.
|
|
4
|
-
*/
|
|
5
|
-
export declare const SQUID_METRIC_TYPE_SUFFIXES: readonly ["_count", "_time", "_size", "_entries", "_value"];
|
|
6
|
-
/** Returns true if the given metric has a valid metric type. */
|
|
7
|
-
export declare function hasValidMetricTypeSuffix(metricName: string): boolean;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/** Returns a value by the `path`. Works with array indexes, like a.b[0]. */
|
|
2
|
-
export declare function getInPath(obj: unknown, path: string): any;
|
|
3
|
-
export declare function isDateObject(value: unknown): value is Date;
|
|
4
|
-
/** Sets a value by path . Does not support array indexes. */
|
|
5
|
-
export declare function setInPath(obj: object, path: string, value: unknown, delimiter?: string): void;
|
|
6
|
-
export declare function deleteInPath(obj: object, path: string, delimiter?: string): void;
|
|
7
|
-
export declare function replaceKeyInMap<K, T>(map: Map<K, T | undefined>, a: K, b: K): void;
|
|
8
|
-
export declare function replaceKeyInRecord<K extends keyof any, T>(record: Record<K, T>, a: K, b: K): void;
|
|
9
|
-
export declare function isNil(obj: unknown): obj is null | undefined;
|
|
10
|
-
export declare function isEqual(a: unknown, b: unknown): boolean;
|
|
11
|
-
export declare function isEmpty(a: unknown): boolean;
|
|
12
|
-
export declare function omit<T extends object, K extends PropertyKey[]>(object: T | null | undefined, ...fieldsToRemove: K): Pick<T, Exclude<keyof T, K[number]>>;
|
|
13
|
-
export type CloneCustomizer = (value: unknown) => unknown | undefined;
|
|
14
|
-
/**
|
|
15
|
-
* Creates a deep copy of the specified object, including all nested objects and specifically handling Date, Map, and
|
|
16
|
-
* Set fields.
|
|
17
|
-
*
|
|
18
|
-
* The customizer function can modify the cloning process for the object and its fields. If the customizer
|
|
19
|
-
* returns 'undefined' for any input, the function falls back to the standard cloning logic.
|
|
20
|
-
*
|
|
21
|
-
* The cloning process is recursive, ensuring deep cloning of all objects.
|
|
22
|
-
*
|
|
23
|
-
* Note: This function does not support cloning objects with circular dependencies and will throw a system stack
|
|
24
|
-
* overflow error if encountered.
|
|
25
|
-
*/
|
|
26
|
-
export declare function cloneDeep<R = unknown>(value: R, customizer?: CloneCustomizer): R;
|
|
27
|
-
/** Creates a shallow clone of the object. */
|
|
28
|
-
export declare function cloneShallow<T>(value: T): T;
|
|
29
|
-
export declare function deepMerge<T extends object, U extends object>(target: T, source: U): T & U;
|
|
30
|
-
/** Compares 2 values. 'null' and 'undefined' values are considered equal and are less than any other values. */
|
|
31
|
-
export declare function compareValues(v1: unknown, v2: unknown): number;
|
|
32
|
-
/** Returns a new object with all top-level object fields re-mapped using `valueMapperFn`. */
|
|
33
|
-
export declare function mapValues<ResultType extends object = Record<string, unknown>, InputType extends Record<string, unknown> = Record<string, unknown>>(obj: InputType, valueMapperFn: (value: any, key: keyof InputType, obj: InputType) => unknown): ResultType;
|
|
34
|
-
/** Groups elements of the array by key. See _.groupBy for details. */
|
|
35
|
-
export declare function groupBy<T, K extends PropertyKey>(array: T[], getKey: (item: T) => K): Record<K, T[]>;
|
|
36
|
-
/**
|
|
37
|
-
* Picks selected fields from the object and returns a new object with the fields selected.
|
|
38
|
-
* The selected fields are assigned by reference (there is no cloning).
|
|
39
|
-
*/
|
|
40
|
-
export declare function pick<T extends object, K extends keyof T>(obj: T, keys: ReadonlyArray<K>): Pick<T, K>;
|
|
41
|
-
/** Inverts the record: swaps keys and values. */
|
|
42
|
-
export declare function invert<K extends string | number, V extends string | number>(record: Record<K, V>): Record<V, K>;
|
|
43
|
-
/**
|
|
44
|
-
* Creates an array of numbers (positive and/or negative) progressing from start up to, but not including, end.
|
|
45
|
-
* If end is less than start a zero-length range is created unless a negative step is specified.
|
|
46
|
-
*
|
|
47
|
-
* Same as lodash range but with an additional parameter: `maximumNumberOfItems`.
|
|
48
|
-
*/
|
|
49
|
-
export declare function range(start: number, end: number, step: number, maximumNumberOfItems?: number): number[];
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function normalizeJsonAsString(json: unknown): string;
|
|
2
|
-
export declare function serializeObj(obj: unknown): string;
|
|
3
|
-
export declare function deserializeObj<T = any>(str: string): T;
|
|
4
|
-
export declare function encodeValueForMapping(value: unknown): string;
|
|
5
|
-
export declare function decodeValueForMapping(encodedString: string): any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SQUID_SUPPORT_EMAIL = "support@getsquid.ai";
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { HttpStatusCode } from '../public-types/http-status.enum';
|
|
2
|
-
export declare class ValidationError extends Error {
|
|
3
|
-
readonly statusCode: HttpStatusCode;
|
|
4
|
-
readonly details?: any;
|
|
5
|
-
constructor(error: string, statusCode: HttpStatusCode, details?: Record<string, unknown>);
|
|
6
|
-
}
|
|
7
|
-
export declare function isValidId(id: unknown, maxLength?: number): boolean;
|
|
8
|
-
export declare function validateFieldSort(fieldSort: unknown): void;
|
|
9
|
-
export declare function validateQueryLimit(limit: unknown): void;
|
|
10
|
-
/**
|
|
11
|
-
* All type names returned by 'typeof' supported by JavaScript:
|
|
12
|
-
* {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof}.
|
|
13
|
-
* and a few other supported types.
|
|
14
|
-
*/
|
|
15
|
-
export type JavascriptTypeName = 'undefined' | 'object' | 'boolean' | 'number' | 'bigint' | 'string' | 'symbol' | 'function';
|
|
16
|
-
/** Returns true if 'typeof' of the 'value' is 'type' or 'type[]'. */
|
|
17
|
-
export declare function isRightType(value: unknown, type: JavascriptTypeName): boolean;
|
|
18
|
-
/** Returns true if 'obj' has only keys listed in the 'keys'. Object can't be an array. */
|
|
19
|
-
export declare function hasOnlyKeys(obj: object, keys: string[]): boolean;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
interface Options {
|
|
2
|
-
maxAttempts?: number;
|
|
3
|
-
protocols?: string[];
|
|
4
|
-
onmessage?: (event: any) => void;
|
|
5
|
-
onopen?: (event: any) => void;
|
|
6
|
-
onclose?: (event: any) => void;
|
|
7
|
-
onerror?: (event: any) => void;
|
|
8
|
-
onreconnect?: (event: any) => void;
|
|
9
|
-
onmaximum?: (event: any) => void;
|
|
10
|
-
timeoutMillis?: number;
|
|
11
|
-
}
|
|
12
|
-
export interface WebSocketWrapper {
|
|
13
|
-
open: () => void;
|
|
14
|
-
reconnect: (e: any) => void;
|
|
15
|
-
json: (x: any) => void;
|
|
16
|
-
send: (x: string) => void;
|
|
17
|
-
close: (x?: number, y?: string) => void;
|
|
18
|
-
connected: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Websocket is explicitly closed by calling socket.close().
|
|
21
|
-
* Used to ignore errors after socket.closed() is called.
|
|
22
|
-
*/
|
|
23
|
-
closeCalled: boolean;
|
|
24
|
-
}
|
|
25
|
-
export declare function createWebSocketWrapper(url: string, opts?: Options): WebSocketWrapper;
|
|
26
|
-
export {};
|