@squidcloud/local-backend 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.
Files changed (85) hide show
  1. package/dist/internal-common/src/code-executor.types.d.ts +1 -1
  2. package/dist/internal-common/src/public-types/ai-agent.public-types.d.ts +24 -96
  3. package/dist/internal-common/src/public-types/ai-agent.public-types.js +1 -61
  4. package/dist/internal-common/src/public-types/ai-agent.public-types.js.map +1 -1
  5. package/dist/internal-common/src/public-types/backend.public-types.d.ts +8 -0
  6. package/dist/internal-common/src/{public-types-backend/ai-chatbot.public-context.js → public-types/backend.public-types.js} +1 -1
  7. package/dist/internal-common/src/public-types/backend.public-types.js.map +1 -0
  8. package/dist/internal-common/src/public-types/communication.public-types.js.map +1 -1
  9. package/dist/internal-common/src/public-types/document.public-types.d.ts +0 -4
  10. package/dist/internal-common/src/public-types/integration.public-types.js.map +1 -1
  11. package/dist/internal-common/src/public-types/integrations/api.public-types.d.ts +0 -11
  12. package/dist/internal-common/src/public-types/integrations/api.public-types.js.map +1 -1
  13. package/dist/internal-common/src/public-types/query.public-types.d.ts +0 -1
  14. package/dist/internal-common/src/public-types/query.public-types.js +0 -4
  15. package/dist/internal-common/src/public-types/query.public-types.js.map +1 -1
  16. package/dist/internal-common/src/public-types/scheduler.public-types.d.ts +1 -4
  17. package/dist/internal-common/src/public-types/secret.public-types.d.ts +0 -4
  18. package/dist/internal-common/src/public-types/typescript.public-types.d.ts +0 -3
  19. package/dist/internal-common/src/public-types-backend/{ai-chatbot.public-context.d.ts → ai-agent.public-context.d.ts} +5 -0
  20. package/dist/internal-common/src/public-types-backend/ai-agent.public-context.js +11 -0
  21. package/dist/internal-common/src/public-types-backend/ai-agent.public-context.js.map +1 -0
  22. package/dist/internal-common/src/public-types-backend/application.public-types.js.map +1 -0
  23. package/dist/internal-common/src/public-types-backend/bundle-api.public-types.d.ts +5 -7
  24. package/dist/internal-common/src/{public-types → public-types-backend}/bundle-data.public-types.d.ts +1 -9
  25. package/dist/internal-common/src/public-types-backend/bundle-data.public-types.js.map +1 -0
  26. package/dist/internal-common/src/public-types-backend/mutation.public-context.d.ts +49 -2
  27. package/dist/internal-common/src/public-types-backend/mutation.public-context.js +2 -1
  28. package/dist/internal-common/src/public-types-backend/mutation.public-context.js.map +1 -1
  29. package/dist/internal-common/src/public-types-backend/query.public-context.js +2 -3
  30. package/dist/internal-common/src/public-types-backend/query.public-context.js.map +1 -1
  31. package/dist/internal-common/src/{public-types → public-types-backend}/storage.types.d.ts +1 -1
  32. package/dist/internal-common/src/public-types-backend/storage.types.js.map +1 -0
  33. package/dist/internal-common/src/types/ai-agent.types.d.ts +78 -1
  34. package/dist/internal-common/src/types/ai-agent.types.js +52 -0
  35. package/dist/internal-common/src/types/ai-agent.types.js.map +1 -1
  36. package/dist/internal-common/src/types/api.types.d.ts +11 -1
  37. package/dist/internal-common/src/types/application.types.d.ts +2 -2
  38. package/dist/internal-common/src/types/backend-run.types.d.ts +1 -1
  39. package/dist/internal-common/src/types/bundle-data.types.d.ts +3 -2
  40. package/dist/internal-common/src/types/query.types.d.ts +2 -1
  41. package/dist/internal-common/src/types/query.types.js +4 -0
  42. package/dist/internal-common/src/types/query.types.js.map +1 -1
  43. package/dist/internal-common/src/utils/backend-transforms.js +2 -2
  44. package/dist/internal-common/src/utils/backend-transforms.js.map +1 -1
  45. package/dist/internal-common/src/utils/squid-code-bundle.utils.d.ts +10 -0
  46. package/dist/internal-common/src/utils/squid-code-bundle.utils.js +106 -0
  47. package/dist/internal-common/src/utils/squid-code-bundle.utils.js.map +1 -0
  48. package/dist/internal-common/src/utils/squid-service.utils.d.ts +34 -0
  49. package/dist/internal-common/src/utils/{squid-service-utils.js → squid-service.utils.js} +50 -1
  50. package/dist/internal-common/src/utils/squid-service.utils.js.map +1 -0
  51. package/dist/internal-common/src/utils.d.ts +0 -1
  52. package/dist/internal-common/src/utils.js +0 -14
  53. package/dist/internal-common/src/utils.js.map +1 -1
  54. package/dist/local-backend/src/index.d.ts +1 -0
  55. package/dist/local-backend/src/index.js +1 -0
  56. package/dist/local-backend/src/index.js.map +1 -1
  57. package/dist/local-backend/src/local-backend-connectors.service.d.ts +3 -9
  58. package/dist/local-backend/src/local-backend-connectors.service.js +20 -44
  59. package/dist/local-backend/src/local-backend-connectors.service.js.map +1 -1
  60. package/dist/local-backend/src/local-backend.module.d.ts +2 -1
  61. package/dist/local-backend/src/local-backend.module.js +4 -3
  62. package/dist/local-backend/src/local-backend.module.js.map +1 -1
  63. package/dist/local-backend/src/local-backend.service.d.ts +4 -2
  64. package/dist/local-backend/src/local-backend.service.js +40 -49
  65. package/dist/local-backend/src/local-backend.service.js.map +1 -1
  66. package/dist/local-backend/src/local-backend.types.d.ts +1 -0
  67. package/dist/local-backend/src/local-backend.types.js +5 -0
  68. package/dist/local-backend/src/local-backend.types.js.map +1 -0
  69. package/dist/local-backend/src/main.js +9 -2
  70. package/dist/local-backend/src/main.js.map +1 -1
  71. package/dist/tsconfig.build.tsbuildinfo +1 -1
  72. package/package.json +2 -2
  73. package/dist/internal-common/src/public-types/application.public-types.js.map +0 -1
  74. package/dist/internal-common/src/public-types/bundle-data.public-types.js.map +0 -1
  75. package/dist/internal-common/src/public-types/mutation.public-types.d.ts +0 -45
  76. package/dist/internal-common/src/public-types/mutation.public-types.js +0 -5
  77. package/dist/internal-common/src/public-types/mutation.public-types.js.map +0 -1
  78. package/dist/internal-common/src/public-types/storage.types.js.map +0 -1
  79. package/dist/internal-common/src/public-types-backend/ai-chatbot.public-context.js.map +0 -1
  80. package/dist/internal-common/src/utils/squid-service-utils.d.ts +0 -15
  81. package/dist/internal-common/src/utils/squid-service-utils.js.map +0 -1
  82. /package/dist/internal-common/src/{public-types → public-types-backend}/application.public-types.d.ts +0 -0
  83. /package/dist/internal-common/src/{public-types → public-types-backend}/application.public-types.js +0 -0
  84. /package/dist/internal-common/src/{public-types → public-types-backend}/bundle-data.public-types.js +0 -0
  85. /package/dist/internal-common/src/{public-types → public-types-backend}/storage.types.js +0 -0
@@ -1,6 +1,6 @@
1
1
  import { ExecuteFunctionAnnotationType, RunConfiguration, RunSecrets } from './types/backend-run.types';
2
2
  import { Auth, RunContext } from './public-types/context.public-types';
3
- import { ServiceFunctionName } from './public-types/bundle-data.public-types';
3
+ import { ServiceFunctionName } from './public-types/backend.public-types';
4
4
  export type SingleExecuteFunctionRequest = {
5
5
  functionName: ServiceFunctionName;
6
6
  params: Array<any>;
@@ -1,6 +1,6 @@
1
1
  import { AiAgentId, AiContextId, IntegrationId } from './communication.public-types';
2
2
  import { IntegrationType } from './integration.public-types';
3
- import { FunctionName, FunctionNameWithContext } from './bundle-data.public-types';
3
+ import { FunctionName, FunctionNameWithContext } from './backend.public-types';
4
4
  export declare const OPENAI_O1_CHAT_MODEL_NAMES: readonly ["o1", "o1-mini"];
5
5
  export declare const OPENAI_REASONING_CHAT_MODEL_NAMES: readonly ["o1", "o1-mini", "o3-mini"];
6
6
  export declare const OPENAI_CHAT_MODEL_NAMES: readonly ["gpt-4o", "gpt-4o-mini", "o1", "o1-mini", "o3-mini"];
@@ -38,17 +38,6 @@ export type FluxModelName = (typeof FLUX_MODEL_NAMES)[number];
38
38
  export type AiGenerateImageOptions = DallEOptions | StableDiffusionCoreOptions | FluxOptions;
39
39
  export type AiAudioTranscribeOptions = WhisperOptions;
40
40
  export type AiAudioCreateSpeechOptions = OpenAiCreateSpeechOptions;
41
- export declare const VECTOR_DB_TYPES: readonly ["postgres"];
42
- export type VectorDbType = (typeof VECTOR_DB_TYPES)[number];
43
- export interface AiAudioCreateSpeechResponse {
44
- mimeType: string;
45
- extension: string;
46
- base64File: string;
47
- }
48
- export interface AiAudioCreateSpeechRequest {
49
- input: string;
50
- options: AiAudioCreateSpeechOptions;
51
- }
52
41
  export interface BaseAiGenerateImageOptions {
53
42
  modelName: AiImageModelName;
54
43
  }
@@ -103,6 +92,7 @@ export interface AiConnectedIntegrationMetadata {
103
92
  integrationId: IntegrationId;
104
93
  integrationType: IntegrationType;
105
94
  description?: string;
95
+ instructions?: string;
106
96
  }
107
97
  export interface AiConnectedAgentMetadata {
108
98
  agentId: AiAgentId;
@@ -111,7 +101,7 @@ export interface AiConnectedAgentMetadata {
111
101
  export interface AiChatPromptQuotas {
112
102
  maxAiCallStackSize: number;
113
103
  }
114
- interface BaseAiAgentChatOptions {
104
+ export interface BaseAiAgentChatOptions {
115
105
  maxTokens?: number;
116
106
  chatId?: string;
117
107
  disableHistory?: boolean;
@@ -129,6 +119,7 @@ interface BaseAiAgentChatOptions {
129
119
  quotas?: AiChatPromptQuotas;
130
120
  includeMetadata?: boolean;
131
121
  temperature?: number;
122
+ guardrails?: GuardrailsOptions;
132
123
  model?: AiChatModelName;
133
124
  }
134
125
  export interface GeminiChatOptions extends BaseAiAgentChatOptions {
@@ -156,9 +147,6 @@ export type AiAgentChatOptions<T extends AiChatModelName | undefined = undefined
156
147
  export type AllAiAgentChatOptions = {
157
148
  [K in keyof BaseAiAgentChatOptions | keyof GeminiChatOptions | keyof OpenAiReasoningChatOptions | keyof OpenAiChatOptions | keyof AnthropicChatOptions]?: (K extends keyof BaseAiAgentChatOptions ? BaseAiAgentChatOptions[K] : never) | (K extends keyof GeminiChatOptions ? GeminiChatOptions[K] : never) | (K extends keyof OpenAiReasoningChatOptions ? OpenAiReasoningChatOptions[K] : never) | (K extends keyof OpenAiChatOptions ? OpenAiChatOptions[K] : never) | (K extends keyof AnthropicChatOptions ? AnthropicChatOptions[K] : never);
158
149
  };
159
- export type AllOpenAiAgentChatOptions = {
160
- [K in keyof OpenAiChatOptions | keyof OpenAiReasoningChatOptions]?: (K extends keyof OpenAiChatOptions ? OpenAiChatOptions[K] : never) | (K extends keyof OpenAiReasoningChatOptions ? OpenAiReasoningChatOptions[K] : never);
161
- };
162
150
  export interface AiAgent<T extends AiChatModelName | undefined = undefined> {
163
151
  id: AiAgentId;
164
152
  createdAt: Date;
@@ -168,43 +156,6 @@ export interface AiAgent<T extends AiChatModelName | undefined = undefined> {
168
156
  auditLog?: boolean;
169
157
  options: AiAgentChatOptions<T>;
170
158
  }
171
- export interface GetAgentRequest {
172
- agentId: AiAgentId;
173
- }
174
- export interface GetAgentResponse {
175
- agent: AiAgent | undefined;
176
- }
177
- export interface GetAgentContextRequest {
178
- agentId: AiAgentId;
179
- contextId: string;
180
- }
181
- export interface DeleteAgentRequest {
182
- agentId: AiAgentId;
183
- }
184
- export interface ListAgentContextsRequest {
185
- agentId: AiAgentId;
186
- }
187
- export interface ListAgentContextsResponse {
188
- contexts: Array<AiAgentContext>;
189
- }
190
- export interface DeleteAgentContextsRequest {
191
- agentId: AiAgentId;
192
- contextIds: Array<string>;
193
- }
194
- export interface UpsertAgentContextsRequest {
195
- agentId: AiAgentId;
196
- contextRequests: Array<AgentContextRequest>;
197
- }
198
- export interface ProvideAgentFeedbackRequest {
199
- agentId: AiAgentId;
200
- feedback: string;
201
- }
202
- export interface ResetAgentFeedbackRequest {
203
- agentId: AiAgentId;
204
- }
205
- export interface ListAgentsResponse {
206
- agents: Array<AiAgent>;
207
- }
208
159
  export type UpsertAgentRequest = Omit<AiAgent, 'createdAt' | 'updatedAt' | 'options'> & {
209
160
  options?: AiAgentChatOptions;
210
161
  };
@@ -217,47 +168,16 @@ export interface AiStatusMessage {
217
168
  title: string;
218
169
  tags?: Record<string, any>;
219
170
  }
220
- export interface AiAskResponse {
221
- responseString: string;
222
- }
223
- export interface AiTranscribeAndAskResponse {
224
- responseString: string;
225
- transcribedPrompt: string;
226
- }
227
- export interface AiAskWithVoiceResponse {
228
- responseString: string;
229
- voiceResponse: AiAudioCreateSpeechResponse;
230
- }
231
- export interface AiTranscribeAndAskWithVoiceResponse {
232
- transcribedPrompt: string;
233
- responseString: string;
234
- voiceResponse: AiAudioCreateSpeechResponse;
235
- }
236
- export interface AiTranscribeAndChatResponse {
237
- transcribedPrompt: string;
238
- }
239
171
  export interface AiSearchOptions {
240
172
  prompt: string;
241
173
  contextMetadataFilter?: AiContextMetadataFilter;
242
174
  limit?: number;
243
175
  }
244
- export interface AiSearchRequest {
245
- options: AiSearchOptions;
246
- agentId: AiAgentId;
247
- }
248
- export interface AiSearchResponse {
249
- chunks: Array<AiSearchResultChunk>;
250
- }
251
176
  export interface AiSearchResultChunk {
252
177
  data: string;
253
178
  metadata?: AiContextMetadata;
254
179
  score: number;
255
180
  }
256
- export declare class SecureAiAgentContext {
257
- readonly prompt?: string;
258
- readonly agentId: AiAgentId;
259
- constructor(prototype: SecureAiAgentContext);
260
- }
261
181
  export interface AiAgentContext {
262
182
  id: AiContextId;
263
183
  createdAt: Date;
@@ -271,7 +191,7 @@ export interface AiAgentContext {
271
191
  metadata: AiContextMetadata;
272
192
  }
273
193
  export type AgentContextRequest = TextContextRequest | FileContextRequest;
274
- export interface BaseContextRequest {
194
+ interface BaseContextRequest {
275
195
  contextId: string;
276
196
  type: AiContextType;
277
197
  metadata?: AiContextMetadata;
@@ -293,31 +213,31 @@ export interface FileContextRequest extends BaseContextRequest {
293
213
  }
294
214
  export type AiContextMetadataValue = number | string | boolean | undefined;
295
215
  export type AiContextMetadataValueArray = AiContextMetadataValue[];
296
- export interface AiContextMetadataEqFilter {
216
+ interface AiContextMetadataEqFilter {
297
217
  $eq: AiContextMetadataValue;
298
218
  }
299
- export interface AiContextMetadataNeFilter {
219
+ interface AiContextMetadataNeFilter {
300
220
  $ne: AiContextMetadataValue;
301
221
  }
302
- export interface AiContextMetadataGtFilter {
222
+ interface AiContextMetadataGtFilter {
303
223
  $gt: number;
304
224
  }
305
- export interface AiContextMetadataGteFilter {
225
+ interface AiContextMetadataGteFilter {
306
226
  $gte: number;
307
227
  }
308
- export interface AiContextMetadataLtFilter {
228
+ interface AiContextMetadataLtFilter {
309
229
  $lt: number;
310
230
  }
311
- export interface AiContextMetadataLteFilter {
231
+ interface AiContextMetadataLteFilter {
312
232
  $lte: number;
313
233
  }
314
- export interface AiContextMetadataInFilter {
234
+ interface AiContextMetadataInFilter {
315
235
  $in: AiContextMetadataValueArray;
316
236
  }
317
- export interface AiContextMetadataNinFilter {
237
+ interface AiContextMetadataNinFilter {
318
238
  $nin: AiContextMetadataValueArray;
319
239
  }
320
- export interface AiContextMetadataExistsFilter {
240
+ interface AiContextMetadataExistsFilter {
321
241
  $exists: boolean;
322
242
  }
323
243
  export type AiContextMetadataSimpleFilter = AiContextMetadataEqFilter | AiContextMetadataNeFilter | AiContextMetadataGtFilter | AiContextMetadataGteFilter | AiContextMetadataLtFilter | AiContextMetadataLteFilter | AiContextMetadataInFilter | AiContextMetadataNinFilter | AiContextMetadataExistsFilter;
@@ -332,6 +252,14 @@ export interface AiContextMetadataOrFilter {
332
252
  }
333
253
  export type AiContextMetadataFilter = AiContextMetadataFieldFilter | AiContextMetadataAndFilter | AiContextMetadataOrFilter;
334
254
  export type AiContextMetadata = Record<string, AiContextMetadataValue>;
335
- export declare function validateAiContextMetadata(metadata: AiContextMetadata): void;
336
- export declare function validateAiContextMetadataFilter(filter: AiContextMetadataFilter): void;
255
+ export type GuardrailKeysType = 'disableProfanity' | 'offTopicAnswers' | 'professionalTone' | 'disablePii';
256
+ export type GuardrailsOptions = {
257
+ [k in GuardrailKeysType]?: boolean;
258
+ } & {
259
+ custom?: string;
260
+ };
261
+ export interface AiTranscribeAndAskResponse {
262
+ responseString: string;
263
+ transcribedPrompt: string;
264
+ }
337
265
  export {};
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SecureAiAgentContext = exports.VECTOR_DB_TYPES = exports.OPEN_AI_CREATE_SPEECH_FORMATS = exports.AI_AUDIO_CREATE_SPEECH_MODEL_NAMES = exports.AI_AUDIO_TRANSCRIPTION_MODEL_NAMES = exports.AI_IMAGE_MODEL_NAMES = exports.FLUX_MODEL_NAMES = exports.STABLE_DIFFUSION_MODEL_NAMES = exports.OPENAI_AUDIO_MODEL_NAMES = exports.OPENAI_AUDIO_CREATE_SPEECH_MODEL_NAMES = exports.OPENAI_AUDIO_TRANSCRIPTION_MODEL_NAMES = exports.OPENAI_IMAGE_MODEL_NAMES = exports.AI_EMBEDDINGS_MODEL_NAMES = exports.OPENAI_EMBEDDINGS_MODEL_NAMES = exports.AI_CHAT_MODEL_NAMES = exports.ANTHROPIC_CHAT_MODEL_NAMES = exports.GEMINI_CHAT_MODEL_NAMES = exports.OPENAI_CHAT_MODEL_NAMES = exports.OPENAI_REASONING_CHAT_MODEL_NAMES = exports.OPENAI_O1_CHAT_MODEL_NAMES = void 0;
4
- exports.validateAiContextMetadata = validateAiContextMetadata;
5
- exports.validateAiContextMetadataFilter = validateAiContextMetadataFilter;
3
+ exports.OPEN_AI_CREATE_SPEECH_FORMATS = exports.AI_AUDIO_CREATE_SPEECH_MODEL_NAMES = exports.AI_AUDIO_TRANSCRIPTION_MODEL_NAMES = exports.AI_IMAGE_MODEL_NAMES = exports.FLUX_MODEL_NAMES = exports.STABLE_DIFFUSION_MODEL_NAMES = exports.OPENAI_AUDIO_MODEL_NAMES = exports.OPENAI_AUDIO_CREATE_SPEECH_MODEL_NAMES = exports.OPENAI_AUDIO_TRANSCRIPTION_MODEL_NAMES = exports.OPENAI_IMAGE_MODEL_NAMES = exports.AI_EMBEDDINGS_MODEL_NAMES = exports.OPENAI_EMBEDDINGS_MODEL_NAMES = exports.AI_CHAT_MODEL_NAMES = exports.ANTHROPIC_CHAT_MODEL_NAMES = exports.GEMINI_CHAT_MODEL_NAMES = exports.OPENAI_CHAT_MODEL_NAMES = exports.OPENAI_REASONING_CHAT_MODEL_NAMES = exports.OPENAI_O1_CHAT_MODEL_NAMES = void 0;
6
4
  exports.OPENAI_O1_CHAT_MODEL_NAMES = ['o1', 'o1-mini'];
7
5
  exports.OPENAI_REASONING_CHAT_MODEL_NAMES = [...exports.OPENAI_O1_CHAT_MODEL_NAMES, 'o3-mini'];
8
6
  exports.OPENAI_CHAT_MODEL_NAMES = ['gpt-4o', 'gpt-4o-mini', ...exports.OPENAI_REASONING_CHAT_MODEL_NAMES];
@@ -36,62 +34,4 @@ exports.AI_IMAGE_MODEL_NAMES = [
36
34
  exports.AI_AUDIO_TRANSCRIPTION_MODEL_NAMES = [...exports.OPENAI_AUDIO_TRANSCRIPTION_MODEL_NAMES];
37
35
  exports.AI_AUDIO_CREATE_SPEECH_MODEL_NAMES = [...exports.OPENAI_AUDIO_CREATE_SPEECH_MODEL_NAMES];
38
36
  exports.OPEN_AI_CREATE_SPEECH_FORMATS = ['mp3', 'opus', 'aac', 'flac', 'wav', 'pcm'];
39
- exports.VECTOR_DB_TYPES = ['postgres'];
40
- class SecureAiAgentContext {
41
- constructor(prototype) {
42
- this.agentId = prototype.agentId;
43
- this.prompt = prototype.prompt;
44
- }
45
- }
46
- exports.SecureAiAgentContext = SecureAiAgentContext;
47
- const INTERNAL_METADATA_KEYS = ['groupId', 'appId', 'integrationId', 'profileId', 'index', 'text', 'filePathInBucket'];
48
- function validateAiContextMetadata(metadata) {
49
- for (const key in metadata) {
50
- const value = metadata[key];
51
- if (typeof value !== 'string' && typeof value !== 'number' && typeof value !== 'boolean' && value !== undefined) {
52
- throw new Error(`Invalid metadata value for key ${key} - cannot be of type ${typeof value}`);
53
- }
54
- if (INTERNAL_METADATA_KEYS.includes(key)) {
55
- throw new Error(`Invalid metadata key ${key} - cannot be an internal key. Internal keys: ${INTERNAL_METADATA_KEYS.join(', ')}`);
56
- }
57
- if (!/^[a-zA-Z0-9_]+$/.test(key)) {
58
- throw new Error(`Invalid metadata key ${key} - can only contain letters, numbers, and underscores`);
59
- }
60
- }
61
- }
62
- function validateAiContextMetadataFilter(filter) {
63
- if (isAndFilter(filter)) {
64
- for (const subFilter of filter.$and) {
65
- validateAiContextMetadataFilter(subFilter);
66
- }
67
- }
68
- else if (isOrFilter(filter)) {
69
- for (const subFilter of filter.$or) {
70
- validateAiContextMetadataFilter(subFilter);
71
- }
72
- }
73
- else {
74
- for (const key in filter) {
75
- if (!/^[a-zA-Z0-9_]+$/.test(key)) {
76
- throw new Error(`Invalid metadata filter key ${key} - can only contain letters, numbers, and underscores`);
77
- }
78
- if (INTERNAL_METADATA_KEYS.includes(key)) {
79
- throw new Error(`Invalid metadata filter key ${key} - cannot be an internal key. Internal keys: ${INTERNAL_METADATA_KEYS.join(', ')}`);
80
- }
81
- const value = filter[key];
82
- if (typeof value !== 'object' &&
83
- typeof value !== 'string' &&
84
- typeof value !== 'number' &&
85
- typeof value !== 'boolean') {
86
- throw new Error(`Invalid metadata filter value for key ${key} - cannot be of type ${typeof value}`);
87
- }
88
- }
89
- }
90
- }
91
- function isAndFilter(filter) {
92
- return '$and' in filter;
93
- }
94
- function isOrFilter(filter) {
95
- return '$or' in filter;
96
- }
97
37
  //# sourceMappingURL=ai-agent.public-types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ai-agent.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/ai-agent.public-types.ts"],"names":[],"mappings":";;;AAkkBA,8DAgBC;AAGD,0EAkCC;AAlnBY,QAAA,0BAA0B,GAAG,CAAC,IAAI,EAAE,SAAS,CAAU,CAAC;AACxD,QAAA,iCAAiC,GAAG,CAAC,GAAG,kCAA0B,EAAE,SAAS,CAAU,CAAC;AACxF,QAAA,uBAAuB,GAAG,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,yCAAiC,CAAU,CAAC;AAEnG,QAAA,uBAAuB,GAAG,CAAC,gBAAgB,EAAE,kBAAkB,CAAU,CAAC;AAE1E,QAAA,0BAA0B,GAAG,CAAC,yBAAyB,EAAE,0BAA0B,CAAU,CAAC;AAG9F,QAAA,mBAAmB,GAAG;IACjC,GAAG,+BAAuB;IAC1B,GAAG,kCAA0B;IAC7B,GAAG,+BAAuB;CAClB,CAAC;AAEE,QAAA,6BAA6B,GAAG;IAC3C,wBAAwB;IACxB,wBAAwB;IACxB,wBAAwB;CAChB,CAAC;AAEE,QAAA,yBAAyB,GAAG,CAAC,GAAG,qCAA6B,CAAU,CAAC;AAGxE,QAAA,wBAAwB,GAAG,CAAC,UAAU,CAAU,CA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,CAAC;YACJ,CAAC;YACD,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;YAC1B,IACE,OAAO,KAAK,KAAK,QAAQ;gBACzB,OAAO,KAAK,KAAK,QAAQ;gBACzB,OAAO,KAAK,KAAK,QAAQ;gBACzB,OAAO,KAAK,KAAK,SAAS,EAC1B,CAAC;gBACD,MAAM,IAAI,KAAK,CAAC,yCAAyC,GAAG,wBAAwB,OAAO,KAAK,EAAE,CAAC,CAAC;YACtG,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,MAA+B;IAClD,OAAO,MAAM,IAAI,MAAM,CAAC;AAC1B,CAAC;AAED,SAAS,UAAU,CAAC,MAA+B;IACjD,OAAO,KAAK,IAAI,MAAM,CAAC;AACzB,CAAC"}
1
+ {"version":3,"file":"ai-agent.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/ai-agent.public-types.ts"],"names":[],"mappings":";;;AAQa,QAAA,0BAA0B,GAAG,CAAC,IAAI,EAAE,SAAS,CAAU,CAAC;AAKxD,QAAA,iCAAiC,GAAG,CAAC,GAAG,kCAA0B,EAAE,SAAS,CAAU,CAAC;AAKxF,QAAA,uBAAuB,GAAG,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,yCAAiC,CAAU,CAAC;AAKnG,QAAA,uBAAuB,GAAG,CAAC,gBAAgB,EAAE,kBAAkB,CAAU,CAAC;AAK1E,QAAA,0BAA0B,GAAG,CAAC,yBAAyB,EAAE,0BAA0B,CAAU,CAAC;AAM9F,QAAA,mBAAmB,GAAG;IACjC,GAAG,+BAAuB;IAC1B,GAAG,kCAA0B;IAC7B,GAAG,+BAAuB;CAClB,CAAC;AAKE,QAAA,6BAA6B,GAAG;IAC3C,wBAAwB;IACxB,wBAAwB;IACxB,wBAAwB;CAChB,CAAC;AAKE,QAAA,yBAAyB,GAAG,CAAC,GAAG,qCAA6B,CAAU,CAAC;AAMxE,QAAA,wBAAwB,GAAG,CAAC,UAAU,CAAU,CAAC;AAKjD,QAAA,sCAAsC,GAAG,CAAC,WAAW,CAAU,CAAC;AAKhE,QAAA,sCAAsC,GAAG,CAAC,OAAO,EAAE,UAAU,CAAU,CAAC;AAKxE,QAAA,wBAAwB,GAAG;IACtC,GAAG,8CAAsC;IACzC,GAAG,8CAAsC;CACjC,CAAC;AAKE,QAAA,4BAA4B,GAAG,CAAC,uBAAuB,CAAU,CAAC;AAKlE,QAAA,gBAAgB,GAAG,CAAC,cAAc,CAAU,CAAC;AAK7C,QAAA,oBAAoB,GAAG;IAClC,GAAG,gCAAwB;IAC3B,GAAG,oCAA4B;IAC/B,GAAG,wBAAgB;CACX,CAAC;AAKE,QAAA,kCAAkC,GAAG,CAAC,GAAG,8CAAsC,CAAU,CAAC;AAK1F,QAAA,kCAAkC,GAAG,CAAC,GAAG,8CAAsC,CAAU,CAAC;AAK1F,QAAA,6BAA6B,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAU,CAAC"}
@@ -0,0 +1,8 @@
1
+ export type TopicName = string;
2
+ export type ServiceName = string;
3
+ export type FunctionName = string;
4
+ export interface FunctionNameWithContext {
5
+ name: FunctionName;
6
+ context: Record<string, unknown>;
7
+ }
8
+ export type ServiceFunctionName = `${ServiceName}:${FunctionName}`;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ai-chatbot.public-context.js.map
3
+ //# sourceMappingURL=backend.public-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/backend.public-types.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"communication.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/communication.public-types.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAG,CAAC,KAAK,EAAE,MAAM,CAAU,CAAC;AAe3C,QAAA,iBAAiB,GAAG,gBAAgB,CAAC"}
1
+ {"version":3,"file":"communication.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/communication.public-types.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAG,CAAC,KAAK,EAAE,MAAM,CAAU,CAAC;AAoB3C,QAAA,iBAAiB,GAAG,gBAAgB,CAAC"}
@@ -15,10 +15,6 @@ export interface SquidDocument {
15
15
  __ts__: DocTimestamp;
16
16
  [fieldName: string]: FieldType | undefined;
17
17
  }
18
- export interface BeforeAndAfterDocs<T = SquidDocument> {
19
- before: T | undefined;
20
- after: T | undefined;
21
- }
22
18
  export interface SquidDocIdObj {
23
19
  collectionName: CollectionName;
24
20
  docId: DocId;
@@ -1 +1 @@
1
- {"version":3,"file":"integration.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/integration.public-types.ts"],"names":[],"mappings":";;;AAEa,QAAA,wBAAwB,GAAG,WAAW,CAAC;AAGvC,QAAA,iBAAiB,GAAG;IAC/B,kBAAkB;IAClB,WAAW;IACX,YAAY;IACZ,SAAS;IACT,SAAS;IACT,KAAK;IACL,OAAO;IACP,gBAAgB;IAChB,kBAAkB;IAClB,WAAW;IACX,UAAU;IACV,aAAa;IACb,cAAc;IACd,gBAAgB;IAChB,aAAa;IACb,WAAW;IACX,YAAY;IACZ,UAAU;IACV,WAAW;IACX,SAAS;IACT,YAAY;IACZ,WAAW;IACX,SAAS;IACT,KAAK;IACL,SAAS;IACT,YAAY;IACZ,UAAU;IACV,2BAA2B;IAC3B,uBAAuB;IACvB,gBAAgB;IAChB,eAAe;IACf,WAAW;IACX,KAAK;IACL,aAAa;IACb,cAAc;IACd,SAAS;IACT,SAAS;IACT,MAAM;IACN,UAAU;IACV,SAAS;IACT,OAAO;IACP,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,OAAO;IACP,OAAO;IACP,OAAO;IACP,UAAU;IACV,MAAM;IACN,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,OAAO;IACP,IAAI;IACJ,gBAAgB;IAChB,UAAU;IACV,QAAQ;IACR,YAAY;IACZ,WAAW;IACX,SAAS;IACT,MAAM;IACN,SAAS;IACT,MAAM;IACN,OAAO;CACC,CAAC;AAEE,QAAA,sBAAsB,GAAG;IACpC,UAAU;IACV,aAAa;IACb,YAAY;IACZ,WAAW;IACX,OAAO;IACP,OAAO;IACP,OAAO;IACP,UAAU;IACV,UAAU;IACV,UAAU;IACV,WAAW;CACH,CAAC;AAEE,QAAA,sBAAsB,GAAG;IACpC,OAAO;IACP,SAAS;IACT,UAAU;IACV,SAAS;IACT,MAAM;IACN,SAAS;IACT,eAAe;CACP,CAAC;AAEE,QAAA,yBAAyB,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAU,CAAC;AAC3D,QAAA,sBAAsB,GAAG,CAAC,KAAK,EAAE,YAAY,CAAU,CAAC;AAIxD,QAAA,wBAAwB,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,CAAU,CAAC;AAI/D,QAAA,0BAA0B,GAAkB,aAAa,CAAC;AAC1D,QAAA,6BAA6B,GAAkB,gBAAgB,CAAC;AAEhE,QAAA,+BAA+B,GAAkB,kBAAkB,CAAC"}
1
+ {"version":3,"file":"integration.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/integration.public-types.ts"],"names":[],"mappings":";;;AAGa,QAAA,wBAAwB,GAAG,WAAW,CAAC;AAGvC,QAAA,iBAAiB,GAAG;IAC/B,kBAAkB;IAClB,WAAW;IACX,YAAY;IACZ,SAAS;IACT,SAAS;IACT,KAAK;IACL,OAAO;IACP,gBAAgB;IAChB,kBAAkB;IAClB,WAAW;IACX,UAAU;IACV,aAAa;IACb,cAAc;IACd,gBAAgB;IAChB,aAAa;IACb,WAAW;IACX,YAAY;IACZ,UAAU;IACV,WAAW;IACX,SAAS;IACT,YAAY;IACZ,WAAW;IACX,SAAS;IACT,KAAK;IACL,SAAS;IACT,YAAY;IACZ,UAAU;IACV,2BAA2B;IAC3B,uBAAuB;IACvB,gBAAgB;IAChB,eAAe;IACf,WAAW;IACX,KAAK;IACL,aAAa;IACb,cAAc;IACd,SAAS;IACT,SAAS;IACT,MAAM;IACN,UAAU;IACV,SAAS;IACT,OAAO;IACP,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,OAAO;IACP,OAAO;IACP,OAAO;IACP,UAAU;IACV,MAAM;IACN,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,OAAO;IACP,IAAI;IACJ,gBAAgB;IAChB,UAAU;IACV,QAAQ;IACR,YAAY;IACZ,WAAW;IACX,SAAS;IACT,MAAM;IACN,SAAS;IACT,MAAM;IACN,OAAO;CACC,CAAC;AAKE,QAAA,sBAAsB,GAAG;IACpC,UAAU;IACV,aAAa;IACb,YAAY;IACZ,WAAW;IACX,OAAO;IACP,OAAO;IACP,OAAO;IACP,UAAU;IACV,UAAU;IACV,UAAU;IACV,WAAW;CACH,CAAC;AAKE,QAAA,sBAAsB,GAAG;IACpC,OAAO;IACP,SAAS;IACT,UAAU;IACV,SAAS;IACT,MAAM;IACN,SAAS;IACT,eAAe;CACP,CAAC;AAEE,QAAA,yBAAyB,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAU,CAAC;AAC3D,QAAA,sBAAsB,GAAG,CAAC,KAAK,EAAE,YAAY,CAAU,CAAC;AAIxD,QAAA,wBAAwB,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,CAAU,CAAC;AAO/D,QAAA,0BAA0B,GAAkB,aAAa,CAAC;AAK1D,QAAA,6BAA6B,GAAkB,gBAAgB,CAAC;AAKhE,QAAA,+BAA+B,GAAkB,kBAAkB,CAAC"}
@@ -1,6 +1,4 @@
1
- import { IntegrationType } from '../integration.public-types';
2
1
  import { FieldName } from '../document.public-types';
3
- import { IntegrationId } from '../communication.public-types';
4
2
  export type HttpMethod = 'post' | 'get' | 'delete' | 'patch' | 'put';
5
3
  export type ApiEndpointId = string;
6
4
  export type ApiParameterLocation = 'query' | 'body' | 'header' | 'path';
@@ -53,12 +51,3 @@ export interface ApiEndpoint {
53
51
  bodyMimeType?: string;
54
52
  isRequestBodyRequired?: boolean;
55
53
  }
56
- export interface DiscoverOpenApiSchemaRequest {
57
- integrationId: IntegrationId;
58
- integrationType: Extract<IntegrationType, 'api'>;
59
- discoveryOptions: OpenApiDiscoveryOptions;
60
- }
61
- export interface DiscoverOpenApiSchemaFromFileRequest {
62
- integrationId: IntegrationId;
63
- integrationType: Extract<IntegrationType, 'api'>;
64
- }
@@ -1 +1 @@
1
- {"version":3,"file":"api.public-types.js","sourceRoot":"","sources":["../../../../../../internal-common/src/public-types/integrations/api.public-types.ts"],"names":[],"mappings":";;;AA4Ca,QAAA,yBAAyB,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAU,CAAC"}
1
+ {"version":3,"file":"api.public-types.js","sourceRoot":"","sources":["../../../../../../internal-common/src/public-types/integrations/api.public-types.ts"],"names":[],"mappings":";;;AA0Ca,QAAA,yBAAyB,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAU,CAAC"}
@@ -17,7 +17,6 @@ export interface SimpleCondition<Doc extends DocumentData = any, F extends Paths
17
17
  export interface CompositeCondition<Doc extends DocumentData = any> {
18
18
  fields: Array<SimpleCondition<Doc, Paths<Doc>, CompositeConditionOperator>>;
19
19
  }
20
- export declare function isSimpleCondition(condition: Condition): condition is SimpleCondition;
21
20
  type CompositeConditionOperator = '>=' | '<=' | '>' | '<';
22
21
  export declare const ARRAY_OPERATORS: readonly ["in", "not in", "array_includes_some", "array_includes_all", "array_not_includes"];
23
22
  export declare const ALL_OPERATORS: readonly ["in", "not in", "array_includes_some", "array_includes_all", "array_not_includes", "==", "!=", ">=", "<=", ">", "<", "like", "not like", "like_cs", "not like_cs"];
@@ -1,10 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ALL_OPERATORS = exports.ARRAY_OPERATORS = void 0;
4
- exports.isSimpleCondition = isSimpleCondition;
5
- function isSimpleCondition(condition) {
6
- return 'fieldName' in condition;
7
- }
8
4
  exports.ARRAY_OPERATORS = [
9
5
  'in',
10
6
  'not in',
@@ -1 +1 @@
1
- {"version":3,"file":"query.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/query.public-types.ts"],"names":[],"mappings":";;;AA8CA,8CAEC;AAFD,SAAgB,iBAAiB,CAAC,SAAoB;IACpD,OAAO,WAAW,IAAI,SAAS,CAAC;AAClC,CAAC;AAIY,QAAA,eAAe,GAAG;IAC7B,IAAI;IACJ,QAAQ;IACR,qBAAqB;IACrB,oBAAoB;IACpB,oBAAoB;CACZ,CAAC;AAEE,QAAA,aAAa,GAAG;IAC3B,GAAG,uBAAe;IAClB,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,GAAG;IACH,MAAM;IACN,UAAU;IACV,SAAS;IACT,aAAa;CACL,CAAC"}
1
+ {"version":3,"file":"query.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/query.public-types.ts"],"names":[],"mappings":";;;AAiEa,QAAA,eAAe,GAAG;IAC7B,IAAI;IACJ,QAAQ;IACR,qBAAqB;IACrB,oBAAoB;IACpB,oBAAoB;CACZ,CAAC;AAME,QAAA,aAAa,GAAG;IAC3B,GAAG,uBAAe;IAClB,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,GAAG;IACH,MAAM;IACN,UAAU;IACV,SAAS;IACT,aAAa;CACL,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ServiceFunctionName } from './bundle-data.public-types';
1
+ import { ServiceFunctionName } from './backend.public-types';
2
2
  export interface SchedulerConfig {
3
3
  functionName: ServiceFunctionName;
4
4
  cronExpression: string;
@@ -9,9 +9,6 @@ export interface SchedulerInfo {
9
9
  config: SchedulerConfig;
10
10
  enabled: boolean;
11
11
  }
12
- export interface ListSchedulersResponse {
13
- schedulers: SchedulerInfo[];
14
- }
15
12
  export interface UpdateSchedulerOptions {
16
13
  schedulerId: string;
17
14
  enabled?: boolean;
@@ -11,10 +11,6 @@ export interface SecretEntry<T extends SecretValue = SecretValue> extends Secret
11
11
  export interface ApiKeyEntry extends SecretMetadata {
12
12
  value: string;
13
13
  }
14
- export type SetSecretEntry = {
15
- key: SecretKey;
16
- value?: SecretValue;
17
- };
18
14
  export interface SetSecretRequestEntry {
19
15
  key: SecretKey;
20
16
  value: SecretValue;
@@ -1,6 +1,3 @@
1
- export interface Type<T> extends Function {
2
- new (...args: any[]): T;
3
- }
4
1
  export type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
5
2
  type PropertiesWithPrefix<Prefix extends string> = {
6
3
  [key in `${Prefix}${string}`]: any;
@@ -4,3 +4,8 @@ export interface AiFunctionContext<AgentContextType = unknown, FunctionContextTy
4
4
  agentContext: AgentContextType;
5
5
  functionContext: FunctionContextType;
6
6
  }
7
+ export declare class SecureAiAgentContext {
8
+ readonly prompt?: string;
9
+ readonly agentId: AiAgentId;
10
+ constructor(prototype: SecureAiAgentContext);
11
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SecureAiAgentContext = void 0;
4
+ class SecureAiAgentContext {
5
+ constructor(prototype) {
6
+ this.agentId = prototype.agentId;
7
+ this.prompt = prototype.prompt;
8
+ }
9
+ }
10
+ exports.SecureAiAgentContext = SecureAiAgentContext;
11
+ //# sourceMappingURL=ai-agent.public-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-agent.public-context.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types-backend/ai-agent.public-context.ts"],"names":[],"mappings":";;;AA6BA,MAAa,oBAAoB;IAO/B,YAAY,SAA+B;QACzC,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;IACjC,CAAC;CACF;AAXD,oDAWC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types-backend/application.public-types.ts"],"names":[],"mappings":";;;AAgBA,IAAY,cAoFX;AApFD,WAAY,cAAc;IACxB,8CAA4B,CAAA;IAC5B,mDAAiC,CAAA;IACjC,qDAAmC,CAAA;IACnC,qDAAmC,CAAA;IACnC,8CAA4B,CAAA;IAC5B,mDAAiC,CAAA;IACjC,qDAAmC,CAAA;IACnC,qDAAmC,CAAA;IACnC,+CAA6B,CAAA;IAC7B,kDAAgC,CAAA;IAChC,kDAAgC,CAAA;IAChC,kDAAgC,CAAA;IAChC,kDAAgC,CAAA;IAChC,kDAAgC,CAAA;IAChC,kDAAgC,CAAA;IAChC,kDAAgC,CAAA;IAChC,kDAAgC,CAAA;IAChC,oDAAkC,CAAA;IAClC,oDAAkC,CAAA;IAClC,oDAAkC,CAAA;IAClC,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,kDAAgC,CAAA;IAChC,kDAAgC,CAAA;IAChC,kDAAgC,CAAA;IAChC,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,kDAAgC,CAAA;IAChC,kDAAgC,CAAA;IAChC,qDAAmC,CAAA;IACnC,0CAAwB,CAAA;IACxB,+CAA6B,CAAA;IAC7B,+CAA6B,CAAA;IAC7B,kEAAgD,CAAA;IAChD,+DAA6C,CAAA;IAC7C,gDAA8B,CAAA;IAC9B,yEAAuD,CAAA;IACvD,iDAA+B,CAAA;IAC/B,+CAA6B,CAAA;IAC7B,gDAA8B,CAAA;IAC9B,0CAAwB,CAAA;IACxB,4EAA0D,CAAA;IAC1D,4EAA0D,CAAA;IAC1D,8EAA4D,CAAA;IAC5D,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,iEAA+C,CAAA;IAC/C,6DAA2C,CAAA;IAC3C,6DAA2C,CAAA;IAC3C,iEAA+C,CAAA;IAC/C,6DAA2C,CAAA;IAC3C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,6DAA2C,CAAA;IAC3C,6DAA2C,CAAA;AAC7C,CAAC,EApFW,cAAc,8BAAd,cAAc,QAoFzB"}
@@ -1,19 +1,17 @@
1
- import { MutationContext } from './mutation.public-context';
1
+ import { MutationContext, MutationType } from './mutation.public-context';
2
2
  import { ApiCallContext } from './api-call.public-context';
3
3
  import { QueryContext } from './query.public-context';
4
- import { DatabaseActionType, MetricActionType, StorageActionType, TopicActionType } from '../public-types/bundle-data.public-types';
5
4
  import { ClientConnectionState } from '../public-types/socket.public-types';
6
5
  import { CollectionName, DocIdOrDocIdObj, DocumentData } from '../public-types/document.public-types';
7
- import { MutationType } from '../public-types/mutation.public-types';
8
6
  import { ClientId, IntegrationId, SquidDocId } from '../public-types/communication.public-types';
9
7
  import { TopicReadContext, TopicWriteContext } from './topic.public-context';
10
8
  import { DistributedLockContext } from './distributed-lock.public-context';
11
9
  import { GraphqlContext } from './graphql.public-context';
12
- import { AiFunctionContext } from './ai-chatbot.public-context';
13
- import { StorageContext } from '../public-types/storage.types';
14
10
  import { NativeQueryContext } from './native-query.public-context';
15
11
  import { SecureMetricContext } from './metric.public-context';
16
- import { SecureAiAgentContext } from '../public-types/ai-agent.public-types';
12
+ import { DatabaseActionType, MetricActionType, StorageActionType, TopicActionType } from './bundle-data.public-types';
13
+ import { StorageContext } from './storage.types';
14
+ import { AiFunctionContext, SecureAiAgentContext } from './ai-agent.public-context';
17
15
  export type SecureDatabaseAction<T extends DatabaseActionType> = T extends 'all' ? () => boolean | Promise<boolean> : T extends 'read' ? ((context: QueryContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>) : ((context: MutationContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
18
16
  export type SecureStorageAction<T extends StorageActionType> = T extends 'all' ? () => boolean | Promise<boolean> : (context: StorageContext) => boolean | Promise<boolean>;
19
17
  export type SecureTopicAction<T extends TopicActionType> = T extends 'all' ? () => boolean | Promise<boolean> : T extends 'read' ? ((context: TopicReadContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>) : ((context: TopicWriteContext<T>) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
@@ -37,7 +35,7 @@ export interface TriggerRequest<T extends DocumentData = any> {
37
35
  docAfter?: T;
38
36
  }
39
37
  export type SchedulerAction = () => void | Promise<void>;
40
- export type LimitedAction = (...args: any[]) => any | Promise<any>;
38
+ export type LimitsAction = (...args: any[]) => any | Promise<any>;
41
39
  export type LimiterScope = 'ip' | 'user' | 'global';
42
40
  export type QuotaRenewPeriod = 'hourly' | 'daily' | 'weekly' | 'monthly' | 'quarterly' | 'annually';
43
41
  export interface RateLimitOptions {
@@ -1,4 +1,4 @@
1
- import { IntegrationType } from './integration.public-types';
1
+ import { IntegrationType } from '../public-types/integration.public-types';
2
2
  export type DatabaseActionType = 'read' | 'write' | 'update' | 'insert' | 'delete' | 'all';
3
3
  export type StorageActionType = 'read' | 'write' | 'update' | 'insert' | 'delete' | 'all';
4
4
  export type TopicActionType = 'read' | 'write' | 'all';
@@ -13,11 +13,3 @@ export interface AiFunctionParam {
13
13
  export interface AiFunctionAttributes {
14
14
  integrationType?: Array<IntegrationType>;
15
15
  }
16
- export type TopicName = string;
17
- export type FunctionName = string;
18
- export interface FunctionNameWithContext {
19
- name: FunctionName;
20
- context: Record<string, unknown>;
21
- }
22
- export type ServiceName = string;
23
- export type ServiceFunctionName = `${ServiceName}:${FunctionName}`;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle-data.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types-backend/bundle-data.public-types.ts"],"names":[],"mappings":""}
@@ -1,6 +1,52 @@
1
1
  import { Paths } from '../public-types/typescript.public-types';
2
- import { BeforeAndAfterDocs } from '../public-types/document.public-types';
3
- import { Mutation, MutationType } from '../public-types/mutation.public-types';
2
+ import { SquidDocIdObj, SquidDocument } from '../public-types/document.public-types';
3
+ export declare const MUTATION_TYPES: readonly ["insert", "update", "delete"];
4
+ export type MutationType = (typeof MUTATION_TYPES)[number];
5
+ interface BaseMutation {
6
+ type: MutationType;
7
+ squidDocIdObj: SquidDocIdObj;
8
+ }
9
+ export type Mutation<T = any> = UpdateMutation<T> | InsertMutation<T> | DeleteMutation;
10
+ export interface DeleteMutation extends BaseMutation {
11
+ type: 'delete';
12
+ }
13
+ export interface UpdateMutation<T = any> extends BaseMutation {
14
+ type: 'update';
15
+ properties: {
16
+ [key in keyof T & string]?: Array<PropertyMutation<T[key]>>;
17
+ };
18
+ }
19
+ export interface InsertMutation<T = any> extends BaseMutation {
20
+ type: 'insert';
21
+ properties: T;
22
+ }
23
+ export type PropertyMutation<Value = any> = ApplyNumericFnPropertyMutation | ApplyStringFnPropertyMutation | ValueUpdatePropertyMutation<Value> | RemovePropertyMutation;
24
+ export interface ValueUpdatePropertyMutation<Value = any> {
25
+ type: 'update';
26
+ value: Value;
27
+ }
28
+ export interface ApplyNumericFnPropertyMutation {
29
+ type: 'applyNumericFn';
30
+ fn: 'increment';
31
+ value: number;
32
+ }
33
+ export interface RemovePropertyMutation {
34
+ type: 'removeProperty';
35
+ }
36
+ interface ApplyExtendString {
37
+ type: 'applyStringFn';
38
+ fn: 'extendString';
39
+ value: string;
40
+ }
41
+ interface ApplyTrimString {
42
+ type: 'applyStringFn';
43
+ fn: 'trim';
44
+ }
45
+ export type ApplyStringFnPropertyMutation = ApplyExtendString | ApplyTrimString;
46
+ export interface BeforeAndAfterDocs<T = SquidDocument> {
47
+ before: T | undefined;
48
+ after: T | undefined;
49
+ }
4
50
  export declare class MutationContext<T = any> {
5
51
  readonly mutation: Mutation<T>;
6
52
  readonly beforeAndAfterDocs: BeforeAndAfterDocs<T>;
@@ -13,3 +59,4 @@ export declare class MutationContext<T = any> {
13
59
  affectedPaths(startingRoot?: Paths<T> | string): Array<Paths<T>>;
14
60
  private checkPath;
15
61
  }
62
+ export {};
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MutationContext = void 0;
3
+ exports.MutationContext = exports.MUTATION_TYPES = void 0;
4
4
  const object_1 = require("../utils/object");
5
5
  const assertic_1 = require("assertic");
6
+ exports.MUTATION_TYPES = ['insert', 'update', 'delete'];
6
7
  class MutationContext {
7
8
  constructor(mutation, beforeAndAfterDocs, serverTimeStamp) {
8
9
  this.mutation = mutation;
@@ -1 +1 @@
1
- {"version":3,"file":"mutation.public-context.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types-backend/mutation.public-context.ts"],"names":[],"mappings":";;;AAGA,4CAAqD;AACrD,uCAAwC;AAGxC,MAAa,eAAe;IAI1B,YACW,QAAqB,EACrB,kBAAyC,EACzC,eAAqB;QAFrB,aAAQ,GAAR,QAAQ,CAAa;QACrB,uBAAkB,GAAlB,kBAAkB,CAAuB;QACzC,oBAAe,GAAf,eAAe,CAAM;IAC7B,CAAC;IAEJ,eAAe;Q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,QAAQ;gBAC9B,UAAU,KAAK,IAAI,EACnB,CAAC;gBACD,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC5C,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAC1C,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,UAAU,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC;gBAGvD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;oBACpB,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;oBAC7D,IAAI,CAAC,SAAS,CAAC,QAAoB,EAAE,aAAa,CAAC,CAAC;gBACtD,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;CACF;AA3ED,0CA2EC"}
1
+ {"version":3,"file":"mutation.public-context.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types-backend/mutation.public-context.ts"],"names":[],"mappings":";;;AACA,4CAAqD;AACrD,uCAAwC;AAO3B,QAAA,cAAc,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAC;AA8GtE,MAAa,eAAe;IAI1B,YACW,QAAqB,EACrB,kBAAyC,EACzC,eAAqB;QAFrB,aAAQ,GAAR,QAAQ,CAAa;QACrB,uBAAkB,GAAlB,kBAAkB,CAAuB;QACzC,oBAAe,GAAf,eAAe,CAAM;IAC7B,CAAC;IAEJ,eAAe;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC5B,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC;IACxC,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC;IACvC,CAAC;IAGD,WAAW,CAAC,IAAc;QACxB,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