@squidcloud/client 1.0.363 → 1.0.365

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.
Files changed (45) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/esm/index.js +1 -1
  3. package/dist/internal-common/src/public-types/ai-agent.public-types.d.ts +26 -8
  4. package/dist/internal-common/src/public-types/extraction.public-types.d.ts +77 -0
  5. package/dist/typescript-client/src/agent/ai-agent-client-reference.d.ts +8 -8
  6. package/dist/typescript-client/src/agent/ai-agent-client.types.d.ts +14 -3
  7. package/dist/typescript-client/src/ai-client.d.ts +15 -1
  8. package/dist/typescript-client/src/collection-reference.d.ts +1 -1
  9. package/dist/typescript-client/src/document-reference.d.ts +1 -1
  10. package/dist/typescript-client/src/extraction-client.d.ts +8 -1
  11. package/dist/typescript-client/src/query/join-query-builder.factory.d.ts +1 -1
  12. package/dist/typescript-client/src/squid.d.ts +6 -7
  13. package/dist/typescript-client/src/version.d.ts +1 -1
  14. package/package.json +1 -1
  15. package/dist/internal-common/src/metric-name.d.ts +0 -9
  16. package/dist/internal-common/src/public-types-backend/api-call.public-context.d.ts +0 -30
  17. package/dist/internal-common/src/public-types-backend/mutation.public-context.d.ts +0 -148
  18. package/dist/internal-common/src/public-types-backend/native-query.public-context.d.ts +0 -60
  19. package/dist/internal-common/src/public-types-backend/query.public-context.d.ts +0 -166
  20. package/dist/internal-common/src/types/ai-agent.types.d.ts +0 -135
  21. package/dist/internal-common/src/types/ai-assistant.types.d.ts +0 -1
  22. package/dist/internal-common/src/types/ai-matchmaking.types.d.ts +0 -59
  23. package/dist/internal-common/src/types/backend-function.types.d.ts +0 -1
  24. package/dist/internal-common/src/types/communication.types.d.ts +0 -1
  25. package/dist/internal-common/src/types/document.types.d.ts +0 -1
  26. package/dist/internal-common/src/types/file.types.d.ts +0 -6
  27. package/dist/internal-common/src/types/mutation.types.d.ts +0 -1
  28. package/dist/internal-common/src/types/observability.types.d.ts +0 -71
  29. package/dist/internal-common/src/types/query.types.d.ts +0 -13
  30. package/dist/internal-common/src/types/secret.types.d.ts +0 -2
  31. package/dist/internal-common/src/types/socket.types.d.ts +0 -1
  32. package/dist/internal-common/src/types/time-units.d.ts +0 -1
  33. package/dist/internal-common/src/types/url-shortener.types.d.ts +0 -41
  34. package/dist/internal-common/src/utils/array.d.ts +0 -1
  35. package/dist/internal-common/src/utils/e2e-test-utils.d.ts +0 -2
  36. package/dist/internal-common/src/utils/global.utils.d.ts +0 -1
  37. package/dist/internal-common/src/utils/http.d.ts +0 -2
  38. package/dist/internal-common/src/utils/lock.manager.d.ts +0 -14
  39. package/dist/internal-common/src/utils/metric-utils.d.ts +0 -4
  40. package/dist/internal-common/src/utils/metrics.types.d.ts +0 -7
  41. package/dist/internal-common/src/utils/object.d.ts +0 -49
  42. package/dist/internal-common/src/utils/serialization.d.ts +0 -10
  43. package/dist/internal-common/src/utils/squid.constants.d.ts +0 -1
  44. package/dist/internal-common/src/utils/validation.d.ts +0 -19
  45. package/dist/internal-common/src/websocket.impl.d.ts +0 -26
@@ -1,60 +0,0 @@
1
- import { IntegrationId } from '../public-types/communication.public-types';
2
- /**
3
- * Represents the type of native query request, either relational or MongoDB.
4
- * @category Database
5
- */
6
- export type NativeQueryRequestType = 'relational' | 'mongo';
7
- interface BaseNativeQueryContext {
8
- /** Type of the native query request. */
9
- type: NativeQueryRequestType;
10
- /** Identifier for the integration. */
11
- integrationId: IntegrationId;
12
- }
13
- /**
14
- * Context for executing a relational database query.
15
- * @category Database
16
- */
17
- export interface RelationalNativeQueryContext extends BaseNativeQueryContext {
18
- /** Specifies that the query is for a relational database. */
19
- type: 'relational';
20
- /** SQL query string to be executed. */
21
- query: string;
22
- /** Parameters to be used in the query. */
23
- params: Record<string, any>;
24
- }
25
- /**
26
- * Context for executing a MongoDB query.
27
- * @category Database
28
- */
29
- export interface MongoNativeQueryContext extends BaseNativeQueryContext {
30
- /** Specifies that the query is for a Mongo database. */
31
- type: 'mongo';
32
- /** Name of the MongoDB collection to query. */
33
- collectionName: string;
34
- /** Array of aggregation pipeline stages. */
35
- aggregationPipeline: Array<any | undefined>;
36
- }
37
- /**
38
- * Context for executing an Elasticsearch query.
39
- * @category Database
40
- */
41
- export interface ElasticsearchNativeQueryContext {
42
- /** Specifies that the query is for an Elasticsearch database. */
43
- type: 'elasticsearch';
44
- /** Elasticsearch index to query. */
45
- index: string;
46
- /** Elasticsearch query string. */
47
- endpoint?: string;
48
- /** HTTP method to use for the request. */
49
- method?: 'GET' | 'POST';
50
- /** Body of the request. */
51
- body: Record<string, any>;
52
- /** Headers to include in the request. */
53
- integrationId: IntegrationId;
54
- }
55
- /**
56
- * Union type representing either a relational or MongoDB native query context.
57
- * @category Database
58
- */
59
- export type NativeQueryContext = RelationalNativeQueryContext | MongoNativeQueryContext | ElasticsearchNativeQueryContext;
60
- export {};
@@ -1,166 +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
- * @category Database
9
- */
10
- export declare class QueryContext<T extends DocumentData = any> {
11
- readonly query: Query<T>;
12
- /**
13
- * The ID of the integration being queried.
14
- */
15
- get integrationId(): IntegrationId;
16
- /**
17
- * The name of the collection being queried.
18
- */
19
- get collectionName(): CollectionName;
20
- /**
21
- * The query limit if one exists, -1 otherwise.
22
- */
23
- get limit(): number;
24
- /**
25
- * Verifies that the query's sort order aligns with the provided field sorts. The fields specified in the `sorts`
26
- * parameter must appear in the exact order at the beginning of the query's sort sequence. The query can include
27
- * additional fields in its sort order, but only after the specified sorts.
28
- *
29
- * @param sorts An array of field sorts.
30
- * @returns Whether the query's sorts matches the provided field sorts.
31
- */
32
- sortedBy(sorts: Array<PartialBy<FieldSort<T>, 'asc'>>): boolean;
33
- /**
34
- * Verifies that the query's sort order exactly matches the provided field sorts. The fields specified in the
35
- * `sorts` parameter must appear in the exact order in the query's sort sequence. No additional sorts may be present
36
- * in the query.
37
- *
38
- * @param sorts An array of field sorts.
39
- * @returns Whether the query's sorts exactly match the provided field sorts.
40
- */
41
- sortedByExact(sorts: Array<PartialBy<FieldSort<T>, 'asc'>>): boolean;
42
- /**
43
- * Verifies that the query is a subquery of the specified condition. A subquery is defined as a query that evaluates
44
- * to a subset of the results that would be obtained by applying the parent condition. The subquery may also include
45
- * additional conditions, as these only narrow the result set.
46
- *
47
- * @param fieldName The name of the field for the condition.
48
- * @param operator The operator of the condition.
49
- * @param value The value of the condition.
50
- * @returns Whether the query is a subquery of the parent condition.
51
- */
52
- isSubqueryOf<F extends Paths<T>, O extends AllOperators>(fieldName: F, operator: O, value: GenericValue<T, F, O> | null): boolean;
53
- /**
54
- * Verifies that the query is a subquery of the specified condition. A subquery is defined as a query that evaluates
55
- * to a subset of the results that would be obtained by applying the parent condition. The subquery may also include
56
- * additional conditions, as these only narrow the result set.
57
- *
58
- * @param condition The condition to validate.
59
- * @returns Whether the query is a subquery of the parent condition.
60
- */
61
- isSubqueryOfCondition(condition: GeneralCondition<T>): boolean;
62
- /**
63
- * Verifies that the query is a subquery of the specified conditions. A subquery is defined as a query that evaluates
64
- * to a subset of the results that would be obtained by applying the parent conditions. The subquery may also include
65
- * additional conditions, as these only narrow the result set.
66
- *
67
- * @param conditions The conditions to validate.
68
- * @returns Whether the query includes subquery of the parent conditions.
69
- */
70
- isSubqueryOfConditions(conditions: GeneralConditions<T>): boolean;
71
- /**
72
- * Verifies that the query is a subquery of the specified query. A subquery is defined as a query that evaluates
73
- * to a subset of the results that obtained for the parent query, including sorts and limits.
74
- *
75
- * @param query The query to validate.
76
- * @returns Whether the query is a subquery of the parent query.
77
- */
78
- isSubqueryOfQuery(query: Query<T>): boolean;
79
- /**
80
- * Returns all conditions that apply to any of the specified field names. This method
81
- * provides a convenient way to retrieve all conditions that involve a specific set of fields.
82
- *
83
- * @param fieldNames The field names for which to retrieve conditions.
84
- * @returns An array of conditions that involve any of the specified field names.
85
- */
86
- getConditionsFor<K extends Paths<T>>(...fieldNames: Array<K>): ContextConditions<T, K>;
87
- /**
88
- * Returns all conditions that apply to the specified field name. This method provides
89
- * a convenient way to retrieve all conditions that involve a specific field.
90
- *
91
- * @param fieldName The field name for which to retrieve conditions.
92
- * @returns An array of conditions that involve the specified field name.
93
- */
94
- getConditionsForField<K extends Paths<T>>(fieldName: K): ContextConditions<T>;
95
- /**
96
- * Returns true if the given document can be a result of the query.
97
- * The method does not account for limit and sort order.
98
- */
99
- documentMatchesQuery(doc: DocumentData): boolean;
100
- }
101
- /**
102
- * A list of context conditions.
103
- * @category Database
104
- */
105
- export type ContextConditions<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> = Array<ContextCondition<Doc, F>>;
106
- /**
107
- * A Context condition - a condition that replaces multiple '==' or '!=' conditions with 'in' and 'not in'.
108
- * @category Database
109
- */
110
- export type ContextCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> = InContextCondition<Doc, F> | NotInContextCondition<Doc, F> | OtherContextCondition<Doc, F>;
111
- /**
112
- * A condition using the 'in' operator to match values within a set.
113
- * @category Database
114
- */
115
- export interface InContextCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> extends SimpleCondition<Doc, F, 'in'> {
116
- /** Specifies the 'in' operator to check if a value exists within an array. */
117
- operator: 'in';
118
- /** An array of values to match against the field. */
119
- value: Array<FieldOf<DeepRecord<Doc>, Paths<Doc>> | any>;
120
- }
121
- /**
122
- * A condition using the 'not in' operator to exclude values within a set.
123
- * @category Database
124
- */
125
- export interface NotInContextCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> extends SimpleCondition<Doc, F, 'not in'> {
126
- /** Specifies the 'not in' operator to check if a value does not exist within an array. */
127
- operator: 'not in';
128
- /** An array of values to exclude from the field. */
129
- value: Array<FieldOf<DeepRecord<Doc>, Paths<Doc>> | any>;
130
- }
131
- /**
132
- * A condition using operators other than 'in' or 'not in' for field comparisons.
133
- * @category Database
134
- */
135
- export interface OtherContextCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> extends SimpleCondition<Doc, F, Exclude<ContextOperator, 'in' | 'not in'>> {
136
- /** The operator to use for the comparison, excluding 'in' and 'not in'. */
137
- operator: Exclude<ContextOperator, 'in' | 'not in'>;
138
- /** The value to compare against the field. */
139
- value: FieldOf<DeepRecord<Doc>, Paths<Doc>> | any;
140
- }
141
- /**
142
- * A condition that includes all operators, including 'in' and 'not in', for general use.
143
- * @category Database
144
- */
145
- export interface GeneralCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> extends SimpleCondition<Doc, F, AllOperators> {
146
- /** The operator to apply to the condition, including all possible operators. */
147
- operator: AllOperators;
148
- /** The value to use in the condition comparison. */
149
- value: any;
150
- }
151
- /**
152
- * A list of general conditions.
153
- * @category Database
154
- */
155
- export type GeneralConditions<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> = Array<GeneralCondition<Doc, F>>;
156
- /**
157
- * @category Database
158
- */
159
- export type ContextOperator = Exclude<Operator, '==' | '!='> | 'in' | 'not in';
160
- type AllOperators = Operator | 'in' | 'not in';
161
- /**
162
- * A generic value that can exist in a query.
163
- * @category Database
164
- */
165
- 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;
166
- export {};
@@ -1,135 +0,0 @@
1
- import { AgentContextRequest, AiAgent, AiAgentChatOptions, AiAgentContext, AiAudioCreateSpeechOptions, AiChatModelName, AiContextMetadata, AiContextMetadataFilter, AiEmbeddingsModelName, AiGenerateImageOptions, AiSearchOptions, AiSearchResultChunk, AllAiAgentChatOptions } from '../public-types/ai-agent.public-types';
2
- import { AiAgentId, AppId, ClientRequestId } from '../public-types/communication.public-types';
3
- import { AiFunctionId } from '../public-types/backend.public-types';
4
- type ModelDataType = {
5
- maxTokens: number;
6
- };
7
- export declare const AiModelData: Record<AiChatModelName, ModelDataType>;
8
- export declare const AiEmbeddingModelData: Record<AiEmbeddingsModelName, ModelDataType>;
9
- export interface AiChatRequest {
10
- agentId: AiAgentId;
11
- clientRequestId: ClientRequestId;
12
- prompt?: string;
13
- options?: AllAiAgentChatOptions;
14
- }
15
- export interface AiAskRequest {
16
- agentId: AiAgentId;
17
- prompt?: string;
18
- options?: AllAiAgentChatOptions;
19
- }
20
- export interface AiGenerateImageRequest {
21
- prompt: string;
22
- options: AiGenerateImageOptions;
23
- }
24
- export interface AiAskQuestionInternalRequest {
25
- appId: AppId;
26
- prompt: string;
27
- options: AiAgentChatOptions;
28
- }
29
- export interface AiAskQuestionInternalResponse {
30
- answer: string;
31
- }
32
- export interface AiContextSizeRequest {
33
- appId: AppId;
34
- agentId: AiAgentId;
35
- }
36
- export interface AiContextSizeResponse {
37
- sizeBytes: number;
38
- }
39
- export interface AiAskResponse {
40
- responseString: string;
41
- }
42
- export interface AiAskWithVoiceResponse {
43
- responseString: string;
44
- voiceResponse: AiAudioCreateSpeechResponse;
45
- }
46
- export interface AiTranscribeAndAskWithVoiceResponse {
47
- transcribedPrompt: string;
48
- responseString: string;
49
- voiceResponse: AiAudioCreateSpeechResponse;
50
- }
51
- export interface AiTranscribeAndChatResponse {
52
- transcribedPrompt: string;
53
- }
54
- export interface AiSearchRequest {
55
- options: AiSearchOptions;
56
- agentId: AiAgentId;
57
- }
58
- export interface AiSearchResponse {
59
- chunks: Array<AiSearchResultChunk>;
60
- }
61
- export interface AiAudioCreateSpeechResponse {
62
- mimeType: string;
63
- extension: string;
64
- base64File: string;
65
- }
66
- export interface AiAudioCreateSpeechRequest {
67
- input: string;
68
- options: AiAudioCreateSpeechOptions;
69
- }
70
- export interface GetAgentRequest {
71
- agentId: AiAgentId;
72
- }
73
- export interface GetAgentResponse {
74
- agent: AiAgent | undefined;
75
- }
76
- export interface GetAgentContextRequest {
77
- agentId: AiAgentId;
78
- contextId: string;
79
- }
80
- export interface DeleteAgentRequest {
81
- agentId: AiAgentId;
82
- }
83
- export interface ListAgentContextsRequest {
84
- agentId: AiAgentId;
85
- }
86
- export interface ListAgentContextsResponse {
87
- contexts: Array<AiAgentContext>;
88
- }
89
- export interface DeleteAgentContextsRequest {
90
- agentId: AiAgentId;
91
- contextIds: Array<string>;
92
- }
93
- export interface UpsertAgentContextsRequest {
94
- agentId: AiAgentId;
95
- contextRequests: Array<AgentContextRequest>;
96
- }
97
- export interface UpsertAgentCustomGuardrailsRequest {
98
- agentId: AiAgentId;
99
- customGuardrail: string;
100
- }
101
- export interface DeleteAgentCustomGuardrailsRequest {
102
- agentId: AiAgentId;
103
- }
104
- export interface ProvideAgentFeedbackRequest {
105
- agentId: AiAgentId;
106
- feedback: string;
107
- }
108
- export interface ResetAgentFeedbackRequest {
109
- agentId: AiAgentId;
110
- }
111
- export interface ListAgentsResponse {
112
- agents: Array<AiAgent>;
113
- }
114
- export declare function validateAiContextMetadata(metadata: AiContextMetadata): void;
115
- export declare function validateAiContextMetadataFilter(filter: AiContextMetadataFilter): void;
116
- export declare const METADATA_SERVICE_FUNCTION_NAME = "default:metadata";
117
- /**
118
- * A dictionary model contains either direct prompt-to-answer pairs or prompt-to-function/call-agent instructions.
119
- * Keys within this dictionary model are treated as case-insensitive by the Squid system.
120
- */
121
- export type AiDictionaryModel = Record<string, string | AiDictionaryFunctionCall | AiDictionaryAgentCall>;
122
- export interface AiDictionaryFunctionCall {
123
- type: 'function';
124
- /** ID (name) of the AI function to call. */
125
- id: AiFunctionId;
126
- /** Args to pass to the AI function. */
127
- args: Record<string, unknown>;
128
- }
129
- export interface AiDictionaryAgentCall {
130
- type: 'agent';
131
- id: AiAgentId;
132
- /** Prompt to send to the connected agent. */
133
- prompt: string;
134
- }
135
- export {};
@@ -1,59 +0,0 @@
1
- import { MmEntity, MmEntityMatch, MmFindMatchesOptions, MmListEntitiesOptions, MmMatchMaker } from '../public-types/ai-matchmaking.public-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 MmListMatchMakersResponse {
43
- matchMakers: Array<MmMatchMaker>;
44
- }
45
- export interface MmListEntitiesRequest {
46
- matchMakerId: string;
47
- categoryId: string;
48
- options: MmListEntitiesOptions;
49
- }
50
- export interface MmListEntitiesResponse {
51
- entities: Array<MmEntity>;
52
- }
53
- export interface MmGetEntityRequest {
54
- matchMakerId: string;
55
- entityId: string;
56
- }
57
- export interface MmGetEntityResponse {
58
- entity: MmEntity | undefined;
59
- }
@@ -1 +0,0 @@
1
- export type ChatId = string;
@@ -1 +0,0 @@
1
- export {};
@@ -1,6 +0,0 @@
1
- export interface Base64File {
2
- filename: string;
3
- mimetype: string;
4
- base64: string;
5
- __isSquidBase64File__: true;
6
- }
@@ -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,13 +0,0 @@
1
- import { Condition, SimpleCondition } from '../public-types/query.public-types';
2
- /**
3
- * Generates the regex pattern, handling special characters as follows:
4
- * - `_` is replaced with a `.`
5
- * - `%` is replaced with `[\s\S]*`.
6
- * - The above characters can be escaped with \, eg. `\_` is replaced with `_` and `\%` with `%`.
7
- * - All special characters in regex (-, /, \, ^, $, *, +, ?, ., (, ), |, [, ], {, }) get escaped with \
8
- *
9
- * Exported for testing purposes.
10
- * */
11
- export declare function replaceSpecialCharacters(input: string): string;
12
- /** Returns true if the condition is a 'SimpleCondition' or false otherwise. */
13
- export declare function isSimpleCondition(condition: Condition): condition is SimpleCondition;
@@ -1,2 +0,0 @@
1
- export declare const BACKEND_API_KEY = "_BACKEND_API_KEY";
2
- export declare const APP_API_KEY = "APP_API_KEY";
@@ -1 +0,0 @@
1
- export declare const SOCKET_RECONNECT_TIMEOUT: number;
@@ -1 +0,0 @@
1
- export {};
@@ -1,41 +0,0 @@
1
- import { AppId } from '../public-types/communication.public-types';
2
- /**
3
- * Request to create a shortened URL.
4
- */
5
- export interface ShortUrlRequest {
6
- /** The URL to shorten. It must be a valid URL and should include the protocol (start with http:// or https://). */
7
- url: string;
8
- /** The application ID that will own this shortened URL. */
9
- appId: AppId;
10
- /** Seconds to live for the shortened URL. If set to 0, the URL will never expire. Defaults to 1 day. */
11
- secondsToLive?: number;
12
- }
13
- /**
14
- * Request to create shortened URLs.
15
- */
16
- export interface ShortUrlBulkRequest {
17
- /** The URLs to shorten. They must be valid URLs and should include the protocol (start with http:// or https://). */
18
- urls: string[];
19
- /** The application ID that will own these shortened URLs. */
20
- appId: AppId;
21
- /** Seconds to live for all shortened URLs. If set to 0, the URLs will never expire. Defaults to 1 day. */
22
- secondsToLive?: number;
23
- }
24
- /**
25
- * Request to delete a shortened URL.
26
- */
27
- export interface ShortUrlDeleteRequest {
28
- /** The ID of the shortened URL to delete. */
29
- id: string;
30
- /** The application ID that owns the shortened URL. */
31
- appId: AppId;
32
- }
33
- /**
34
- * Request to delete a shortened URL.
35
- */
36
- export interface ShortUrlBulkDeleteRequest {
37
- /** The IDs of the shortened URLs to delete. */
38
- ids: string[];
39
- /** The application ID that owns the shortened URLs. */
40
- appId: AppId;
41
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- /** Returns true if the application is run by a Playwright test. */
2
- export declare function isPlaywrightTestMode(): boolean | undefined;
@@ -1 +0,0 @@
1
- export declare function isTimestampEnabled(): boolean;
@@ -1,2 +0,0 @@
1
- export declare const KOTLIN_CONTROLLERS: string[];
2
- 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;