@squidcloud/client 1.0.422 → 1.0.423

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 (44) 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-knowledge-base.public-types.d.ts +1 -1
  4. package/dist/typescript-client/src/index.d.ts +0 -1
  5. package/dist/typescript-client/src/squid.d.ts +0 -7
  6. package/dist/typescript-client/src/version.d.ts +1 -1
  7. package/package.json +1 -1
  8. package/dist/internal-common/src/metric-name.d.ts +0 -9
  9. package/dist/internal-common/src/public-types-backend/api-call.public-context.d.ts +0 -30
  10. package/dist/internal-common/src/public-types-backend/mutation.public-context.d.ts +0 -148
  11. package/dist/internal-common/src/public-types-backend/native-query.public-context.d.ts +0 -72
  12. package/dist/internal-common/src/public-types-backend/query.public-context.d.ts +0 -177
  13. package/dist/internal-common/src/types/ai-agent.types.d.ts +0 -199
  14. package/dist/internal-common/src/types/ai-assistant.types.d.ts +0 -1
  15. package/dist/internal-common/src/types/ai-knowledge-base.types.d.ts +0 -202
  16. package/dist/internal-common/src/types/ai-matchmaking.types.d.ts +0 -59
  17. package/dist/internal-common/src/types/backend-function.types.d.ts +0 -1
  18. package/dist/internal-common/src/types/communication.types.d.ts +0 -1
  19. package/dist/internal-common/src/types/document.types.d.ts +0 -1
  20. package/dist/internal-common/src/types/file.types.d.ts +0 -6
  21. package/dist/internal-common/src/types/headers.types.d.ts +0 -17
  22. package/dist/internal-common/src/types/mutation.types.d.ts +0 -1
  23. package/dist/internal-common/src/types/notification.types.d.ts +0 -5
  24. package/dist/internal-common/src/types/observability.types.d.ts +0 -78
  25. package/dist/internal-common/src/types/query.types.d.ts +0 -13
  26. package/dist/internal-common/src/types/secret.types.d.ts +0 -7
  27. package/dist/internal-common/src/types/socket.types.d.ts +0 -1
  28. package/dist/internal-common/src/types/stage.d.ts +0 -9
  29. package/dist/internal-common/src/types/time-units.d.ts +0 -1
  30. package/dist/internal-common/src/types/url-shortener.types.d.ts +0 -41
  31. package/dist/internal-common/src/utils/array.d.ts +0 -7
  32. package/dist/internal-common/src/utils/e2e-test-utils.d.ts +0 -2
  33. package/dist/internal-common/src/utils/global.utils.d.ts +0 -1
  34. package/dist/internal-common/src/utils/http.d.ts +0 -5
  35. package/dist/internal-common/src/utils/lock.manager.d.ts +0 -14
  36. package/dist/internal-common/src/utils/metric-utils.d.ts +0 -4
  37. package/dist/internal-common/src/utils/metrics.types.d.ts +0 -7
  38. package/dist/internal-common/src/utils/object.d.ts +0 -58
  39. package/dist/internal-common/src/utils/serialization.d.ts +0 -17
  40. package/dist/internal-common/src/utils/squid.constants.d.ts +0 -1
  41. package/dist/internal-common/src/utils/trace-id-generator.d.ts +0 -1
  42. package/dist/internal-common/src/utils/validation.d.ts +0 -19
  43. package/dist/internal-common/src/websocket.impl.d.ts +0 -26
  44. package/dist/typescript-client/src/personal-storage-client.d.ts +0 -85
@@ -1,199 +0,0 @@
1
- import { AgentContextRequest, AiAgent, AiAgentContext, AiAnnotation, AiAudioCreateSpeechOptions, AiChatMessage, AiChatOptions, AiGenerateImageOptions, AllAiAgentChatOptions, ApplicationAiSettings } from '../public-types/ai-agent.public-types';
2
- import { AiChatModelName, AiEmbeddingsModelName, AiProviderType } from '../public-types/ai-common.public-types';
3
- import { AiContextMetadata, AiContextMetadataFilter } from '../public-types/ai-knowledge-base.public-types';
4
- import { AiAgentId, AiKnowledgeBaseId, AppId, ClientRequestId } from '../public-types/communication.public-types';
5
- import { JobId } from '../public-types/job.public-types';
6
- import { SecretKey } from '../public-types/secret.public-types';
7
- /** Specification for an AI model, defining its operational parameters. */
8
- export type AiModelSpec = {
9
- /** Maximum tokens the model can generate in a single response. */
10
- maxOutputTokens: number;
11
- /** Total context window size: input (aka prompt) + output (aka completion) tokens combined. */
12
- contextWindowTokens: number;
13
- };
14
- /** Map of AI model details by model name. */
15
- export declare const AI_VENDOR_MODEL_SPECS: Record<AiChatModelName, AiModelSpec>;
16
- /** Map of embedding AI model specs by model name. */
17
- export declare const AI_VENDOR_EMBEDDING_MODEL_SPECS: Record<AiEmbeddingsModelName, AiModelSpec>;
18
- export interface AiChatRequest {
19
- agentId: AiAgentId;
20
- clientRequestId: ClientRequestId;
21
- prompt?: string;
22
- options?: AllAiAgentChatOptions;
23
- jobId: JobId;
24
- }
25
- export interface AiAskRequest {
26
- agentId: AiAgentId;
27
- prompt?: string;
28
- options?: AllAiAgentChatOptions;
29
- jobId: JobId;
30
- }
31
- export interface AiGenerateImageRequest {
32
- prompt: string;
33
- options: AiGenerateImageOptions;
34
- }
35
- export interface AiAskQuestionInternalRequest {
36
- appId: AppId;
37
- prompt: string;
38
- options: AiChatOptions;
39
- }
40
- export interface AiAskQuestionInternalResponse {
41
- answer: string;
42
- }
43
- export interface GetSharedAgentsInternalRequest {
44
- organizationId: string;
45
- }
46
- export interface GetSharedAgentsInternalResponse {
47
- sharedAgents: Array<{
48
- agentId: AiAgentId;
49
- appId: AppId;
50
- }>;
51
- }
52
- export interface ClearSharedAgentsForOrgInternalRequest {
53
- organizationId: string;
54
- }
55
- export interface AiContextSizeRequest {
56
- appId: AppId;
57
- agentId: AiAgentId;
58
- }
59
- export interface AiContextSizeResponse {
60
- sizeBytes: number;
61
- }
62
- export interface AiAskResponse {
63
- responseString: string;
64
- annotations?: Record<string, AiAnnotation>;
65
- }
66
- export interface AiAskWithVoiceResponse {
67
- responseString: string;
68
- voiceResponse: AiAudioCreateSpeechResponse;
69
- annotations?: Record<string, AiAnnotation>;
70
- }
71
- export interface AiTranscribeAndAskWithVoiceResponse {
72
- transcribedPrompt: string;
73
- responseString: string;
74
- voiceResponse: AiAudioCreateSpeechResponse;
75
- annotations?: Record<string, AiAnnotation>;
76
- }
77
- export interface AiTranscribeAndChatResponse {
78
- transcribedPrompt: string;
79
- }
80
- export interface AiAudioCreateSpeechResponse {
81
- mimeType: string;
82
- extension: string;
83
- base64File: string;
84
- }
85
- export interface AiAudioCreateSpeechRequest {
86
- input: string;
87
- options: AiAudioCreateSpeechOptions;
88
- }
89
- export interface GetAgentRequest {
90
- agentId: AiAgentId;
91
- }
92
- export interface GetAgentResponse {
93
- agent: AiAgent | undefined;
94
- }
95
- export interface GetAgentContextRequest {
96
- agentId: AiAgentId;
97
- contextId: string;
98
- }
99
- export interface ConnectAgentKnowledgeBaseRequest {
100
- agentId: AiAgentId;
101
- knowledgeBaseId: AiKnowledgeBaseId;
102
- description: string;
103
- }
104
- export interface DisconnectAgentKnowledgeBaseRequest {
105
- agentId: AiAgentId;
106
- knowledgeBaseId: AiKnowledgeBaseId;
107
- }
108
- export interface DeleteAgentRequest {
109
- agentId: AiAgentId;
110
- }
111
- export interface UnshareAgentRequest {
112
- agentId: AiAgentId;
113
- }
114
- export interface SetAgentOptionInPathRequest {
115
- agentId: AiAgentId;
116
- path: string;
117
- value: unknown;
118
- }
119
- export interface ListAgentContextsRequest {
120
- agentId: AiAgentId;
121
- }
122
- export interface ListAgentContextsResponse {
123
- contexts: Array<AiAgentContext>;
124
- }
125
- export interface DeleteAgentContextsRequest {
126
- agentId: AiAgentId;
127
- contextIds: Array<string>;
128
- }
129
- export interface UpsertAgentContextsRequest {
130
- agentId: AiAgentId;
131
- contextRequests: Array<AgentContextRequest>;
132
- }
133
- export interface UpsertAgentCustomGuardrailsRequest {
134
- agentId: AiAgentId;
135
- customGuardrail: string;
136
- }
137
- export interface DeleteAgentCustomGuardrailsRequest {
138
- agentId: AiAgentId;
139
- }
140
- export interface ListAgentsResponse {
141
- agents: Array<AiAgent>;
142
- }
143
- export interface GetApplicationAiSettingsResponse {
144
- settings: ApplicationAiSettings;
145
- }
146
- export interface GetApplicationAiSettingsResponse {
147
- settings: ApplicationAiSettings;
148
- }
149
- export interface SetApplicationAiSettingsRequest {
150
- settings: ApplicationAiSettings;
151
- }
152
- export interface SetAiProviderApiKeySecretRequest {
153
- providerType: AiProviderType;
154
- secretKey: SecretKey | undefined;
155
- }
156
- export interface SetAiProviderApiKeySecretResponse {
157
- settings: ApplicationAiSettings;
158
- }
159
- export interface RegenerateAgentApiKeyRequest {
160
- agentId: AiAgentId;
161
- }
162
- export interface GetAgentApiKeyRequest {
163
- agentId: AiAgentId;
164
- }
165
- export declare function validateAiContextMetadata(metadata: AiContextMetadata): void;
166
- export declare function validateAiContextMetadataFilter(filter: AiContextMetadataFilter): void;
167
- export declare const METADATA_SERVICE_FUNCTION_NAME = "default:metadata";
168
- export interface UpdateApplicationAiSettingsWebhookPayload {
169
- appId: AppId;
170
- aiSettings: ApplicationAiSettings;
171
- }
172
- export interface GetChatHistoryRequest {
173
- agentId: AiAgentId;
174
- memoryId: string;
175
- }
176
- export interface GetChatHistoryResponse {
177
- messages: Array<AiChatMessage>;
178
- }
179
- export interface ProvideAgentFeedbackRequest {
180
- agentId: string;
181
- feedback: string;
182
- }
183
- export interface UploadAiFileRequest {
184
- /** AI provider to upload file to. */
185
- provider: AiProviderType;
186
- /** Optional expiration time in seconds. If provided, file will be registered for automatic cleanup. */
187
- expirationInSeconds?: number;
188
- }
189
- export interface UploadAiFileResponse {
190
- fileId: string;
191
- }
192
- export interface DeleteAiFileRequest {
193
- fileId: string;
194
- /** AI provider that owns the file. */
195
- provider: AiProviderType;
196
- }
197
- export interface DeleteAiFileResponse {
198
- deleted: boolean;
199
- }
@@ -1,202 +0,0 @@
1
- import { AiKnowledgeBase, AiKnowledgeBaseChatOptions, AiKnowledgeBaseContext, AiKnowledgeBaseContextRequest, AiKnowledgeBaseSearchResultChunk, AiKnowledgeBaseWithOptionalChatModel } from '../public-types/ai-knowledge-base.public-types';
2
- import { AiContextId, AiKnowledgeBaseId, AppId } from '../public-types/communication.public-types';
3
- /**
4
- * Request structure for getting an AiKnowledgeBase
5
- * @category AI
6
- */
7
- export interface GetAiKnowledgeBaseRequest {
8
- /** The id of the app */
9
- appId: AppId;
10
- /** The id of the AiKnowledgeBase */
11
- knowledgeBaseId: AiKnowledgeBaseId;
12
- }
13
- /**
14
- * Request structure for getting all AiKnowledgeBases
15
- * @category AI
16
- */
17
- export interface GetAiKnowledgeBasesRequest {
18
- /** The id of the app */
19
- appId: AppId;
20
- }
21
- /**
22
- * Response structure for getting an AiKnowledgeBase
23
- * @category AI
24
- */
25
- export interface GetAiKnowledgeBaseResponse {
26
- /** The resulting AiKnowledgeBase, if it is found */
27
- knowledgeBase: AiKnowledgeBase | undefined;
28
- }
29
- /**
30
- * Request structure for deleting an AiKnowledgeBase
31
- * @category AI
32
- */
33
- export interface DeleteAiKnowledgeBaseRequest {
34
- /** The id of the AiKnowledgeBase */
35
- id: string;
36
- }
37
- /**
38
- * Request structure for upserting an AiKnowledgeBase
39
- * @category AI
40
- */
41
- export interface UpsertAiKnowledgeBaseRequest {
42
- /** The AiKnowledgeBase to upsert */
43
- knowledgeBase: Omit<AiKnowledgeBaseWithOptionalChatModel, 'appId' | 'updatedAt'>;
44
- }
45
- /**
46
- * Response structure for listing AiKnowledgeBases
47
- * @category AI
48
- */
49
- export interface ListAiKnowledgeBasesResponse {
50
- /** The list of AiKnowledgeBases */
51
- knowledgeBases: Array<AiKnowledgeBase>;
52
- }
53
- /**
54
- * Request structure for listing AiKnowledgeBaseContexts
55
- * @category AI
56
- */
57
- export interface ListAiKnowledgeBaseContextsRequest {
58
- /** The id of the AiKnowledgeBase */
59
- id: string;
60
- /** The number of characters after which text is truncated. Optional */
61
- truncateTextAfter?: number;
62
- }
63
- /**
64
- * Response structure to list AiKnowledgeBaseContexts
65
- * @category AI
66
- */
67
- export interface ListAiKnowledgeBaseContextsResponse {
68
- /** The list of AiKnowledgeBaseContexts */
69
- contexts: Array<AiKnowledgeBaseContext>;
70
- }
71
- /**
72
- * Response structure to list contextids for an AiKnowledgeBase
73
- * @category AI
74
- */
75
- export interface ListAiKnowledgeBaseContextIdsResponse {
76
- /** The list of AiContextIds */
77
- contextIds: Array<AiContextId>;
78
- }
79
- /**
80
- * Request structure for deleting AiKnowledgeBaseContexts
81
- * @category AI
82
- */
83
- export interface DeleteAiKnowledgeBaseContextsRequest {
84
- /** The id of the AiKnowledgeBase */
85
- knowledgeBaseId: string;
86
- /** An array of AiKnowledgeBaseContext ids */
87
- contextIds: Array<string>;
88
- }
89
- /**
90
- * Request structure for getting an AiKnowledgeBaseContext
91
- * @category AI
92
- */
93
- export interface GetAiKnowledgeBaseContextRequest {
94
- /** The id of the AiKnowledgeBase */
95
- knowledgeBaseId: string;
96
- /** The id of the AiKnowledgeBaseContext */
97
- contextId: string;
98
- }
99
- /**
100
- * Request structure for getting all AiKnowledgeBaseContexts
101
- * for a given knowledge base
102
- * @category AI
103
- */
104
- export interface GetAiKnowledgeBaseContextsRequest {
105
- /** The id of the app */
106
- appId: AppId;
107
- /** The id of the AiKnowledgeBase */
108
- knowledgeBaseId: AiKnowledgeBaseId;
109
- /** The number of characters after which text is truncated. Optional */
110
- truncateTextAfter?: number;
111
- }
112
- /**
113
- * Response structure for getting an AiKnowledgeBaseContext
114
- * @category AI
115
- */
116
- export interface GetAiKnowledgeBaseContextResponse {
117
- /** The resulting AiKnowledgeBaseContext, if it is found */
118
- context: AiKnowledgeBaseContext | undefined;
119
- }
120
- /**
121
- * Request structure for upserting context for an AiKnowledgeBase
122
- * @category AI
123
- */
124
- export interface UpsertAiKnowledgeBaseContextsRequest {
125
- /** The id of the AiKnowledgeBase */
126
- knowledgeBaseId: string;
127
- /** The AiKnowledgeBaseContext data, which could be a file or text */
128
- contextRequests: Array<AiKnowledgeBaseContextRequest>;
129
- /** The job ID to use for the async upsert job */
130
- jobId: string;
131
- }
132
- /**
133
- * Response structure for searching an AiKnowledgeBase
134
- * @category AI
135
- */
136
- export interface AiKnowledgeBaseSearchResponse {
137
- /** Array of result chunks from the search */
138
- chunks: Array<AiKnowledgeBaseSearchResultChunk>;
139
- }
140
- /**
141
- * Request structure for getting the size of context
142
- * for an AiKnowledgeBase
143
- * @category AI
144
- */
145
- export interface AiKnowledgeBaseContextSizeRequest {
146
- /** The ID of the App */
147
- appId: AppId;
148
- /** The ID of the AIKnowledgeBase */
149
- knowledgeBaseId: AiKnowledgeBaseId;
150
- }
151
- /**
152
- * Request structure for identifying a knowledge base to reimport the context files (when possible).
153
- */
154
- export interface AiKnowledgeBaseReimportAllFilesRequest {
155
- /** The ID of the AIKnowledgeBase */
156
- knowledgeBaseId: AiKnowledgeBaseId;
157
- }
158
- /**
159
- * Request structure for identifying a knowledge base to reimport the context files (when possible).
160
- */
161
- export interface AiKnowledgeBaseReimportFilesRequest {
162
- /** The ID of the AIKnowledgeBase */
163
- knowledgeBaseId: AiKnowledgeBaseId;
164
- /** The ids of the AiKnowledgeBaseContexts to reimport */
165
- contextIds: Array<string>;
166
- }
167
- /**
168
- * Response structure for getting size of context
169
- * @category AI
170
- */
171
- export interface AiKnowledgeBaseContextSizeResponse {
172
- /** Size of context bytes, as a number */
173
- sizeBytes: number;
174
- }
175
- /**
176
- * Request structure for getting the values vector of
177
- * a specific context
178
- *
179
- * @category AI
180
- */
181
- export interface AiKnowledgeBaseValueVectorRequest {
182
- /** The ID of the App */
183
- appId: AppId;
184
- /** The ID of the AIKnowledgeBase */
185
- knowledgeBaseId: AiKnowledgeBaseId;
186
- /** The ID of the context */
187
- contextId: AiContextId;
188
- }
189
- /**
190
- * Response structure for getting values vector of a
191
- * specific context
192
- * @category AI
193
- */
194
- export interface AiKnowledgeBaseValueVectorResponse {
195
- /** The vector */
196
- vector: number[];
197
- }
198
- export interface AiKnowledgeBaseChatRequest {
199
- knowledgeBaseId: AiKnowledgeBaseId;
200
- prompt?: string;
201
- options?: AiKnowledgeBaseChatOptions;
202
- }
@@ -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,17 +0,0 @@
1
- /** HTTP header names used by Squid for request metadata. */
2
- export declare const SquidHeaders: {
3
- /** Correlates logs and spans across distributed calls. */
4
- readonly TRACE_ID: "x-squid-traceid";
5
- /** Shared secret header for internal authentication. */
6
- readonly SECRET: "x-squid-secret";
7
- /** API key provided by the calling application. */
8
- readonly APP_API_KEY: "x-app-api-key";
9
- /** Unique identifier of the client application. */
10
- readonly APP_ID: "x-squid-appid";
11
- /** Unique identifier of the end user or service client. */
12
- readonly CLIENT_ID: "x-squid-clientid";
13
- /** Version string of the Squid client library. */
14
- readonly CLIENT_VERSION: "x-squid-client-version";
15
- /** Originating IP address of the request. */
16
- readonly SOURCE_IP: "x-squid-source-ip";
17
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- import { ClientId } from '../public-types/communication.public-types';
2
- export interface PublishNotificationRequest {
3
- clientIds: Array<ClientId>;
4
- payload: unknown;
5
- }
@@ -1,78 +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 testAgentProtocolConnection: ObservableNameMetrics;
21
- readonly graphql: ObservableNameMetrics;
22
- };
23
- export type ObservableName = keyof typeof ObservableNames;
24
- export interface MetricEvent {
25
- appId: AppId;
26
- name: MetricName;
27
- tags: Record<string, string>;
28
- timestamp: Date;
29
- value: number;
30
- isExposedToUser: boolean;
31
- }
32
- export interface LogEvent {
33
- message: string;
34
- level: string;
35
- tags: Record<string, string>;
36
- timestamp: Date;
37
- isExposedToUser: boolean;
38
- host: string;
39
- source?: string;
40
- service?: string;
41
- }
42
- export declare const AUDIT_LOG_EVENT_NAMES: readonly ["ai_agent"];
43
- export type AuditLogEventName = (typeof AUDIT_LOG_EVENT_NAMES)[number];
44
- export interface AuditLogEvent {
45
- appId: AppId;
46
- name: AuditLogEventName;
47
- timestamp: Date;
48
- context: {
49
- clientId?: string;
50
- userId: string;
51
- };
52
- tags: Record<string, string>;
53
- }
54
- /** Tag for metric events. Value: '0' - not an error, '1' - is an error. */
55
- export declare const O11Y_TAG_IS_ERROR = "isError";
56
- /** Tag for log events. Metrics have an explicit appId field. */
57
- export declare const O11Y_TAG_APP_ID = "appId";
58
- /** Tag for metric and log events. */
59
- export declare const O11Y_TAG_INTEGRATION_ID = "integrationId";
60
- /** Tag for AI events. */
61
- export declare const O11Y_TAG_AI_MODEL = "aiModel";
62
- export declare const O11Y_TAG_AI_PROFILE = "aiProfile";
63
- /** Tag for AI KnowledgeBase events */
64
- export declare const O11Y_TAG_AI_KNOWLEDGE_BASE_MODEL = "aiKnowledgeBaseModel";
65
- export declare const O11Y_TAG_API_KEY_SOURCE = "apiKeySource";
66
- /** Tag for metric and log events. Value: '0' - not a tenant originated, '1' - is a tenant originated. */
67
- export declare const O11Y_TAG_IS_TENANT_ORIGINATED = "isTenantOriginated";
68
- /** Contains a full (with a service name) function name for backend functions. */
69
- export declare const O11Y_TAG_FUNCTION_NAME = "functionName";
70
- /** Contains a type of the function name for backend functions (See ExecuteFunctionAnnotationType.). */
71
- export declare const O11Y_TAG_FUNCTION_TYPE = "functionType";
72
- /** Tag for the trace ID. Used in logs. */
73
- export declare const O11Y_TAG_TRACE_ID = "trace_id";
74
- /** Tag for the span ID. Used in logs. */
75
- export declare const O11Y_TAG_SPAN_ID = "span_id";
76
- export declare function getBooleanMetricTagValue(value: boolean): string;
77
- export declare const COUNT_METRIC_SUFFIXES: string[];
78
- 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,7 +0,0 @@
1
- import { ApiKeyEntry } from '../public-types/secret.public-types';
2
- export declare const BACKEND_API_KEY = "_BACKEND_API_KEY";
3
- export declare const APP_API_KEY = "APP_API_KEY";
4
- export declare const AGENT_API_HEADER = "x-squid-agent-api-key";
5
- export interface AgentSecrets {
6
- apiKey: ApiKeyEntry | undefined;
7
- }
@@ -1 +0,0 @@
1
- export declare const SOCKET_RECONNECT_TIMEOUT: number;
@@ -1,9 +0,0 @@
1
- /**
2
- * Stage of the Squid deployment:
3
- * - 'local' - Squid is run locally.
4
- * - 'prod' - Production environment (https://console.getsquid.ai).
5
- * - 'sandbox' - One of the sandbox environments (https://console.sandbox.squid.cloud).
6
- * - 'staging' - One of the staging environments (https://console.staging.squid.cloud).
7
- */
8
- export declare const STAGES: readonly ["local", "prod", "sandbox", "staging"];
9
- export type Stage = (typeof STAGES)[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,7 +0,0 @@
1
- export declare function truncateOrPadArray(arr: number[], length: number): number[];
2
- /**
3
- * Computes a single “recommended” chunk size so that if you loop
4
- * `for (let i = 0; i < length; i += chunkSize)`,
5
- * no slice will exceed `maxChunkSize` and all chunk sizes are 'almost' equal.
6
- */
7
- export declare function computeRecommendedChunkSize(length: number, maxChunkSize: number): number;
@@ -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 {};