@squidcloud/local-backend 1.0.342 → 1.0.344
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/internal-common/src/public-types/ai-agent.public-types.js +5 -1
- package/dist/internal-common/src/public-types/ai-agent.public-types.js.map +1 -1
- package/dist/internal-common/src/public-types/code-executor.public-types.js.map +1 -1
- package/dist/internal-common/src/public-types/communication.public-types.js.map +1 -1
- package/dist/internal-common/src/public-types/integration.public-types.js.map +1 -1
- package/dist/internal-common/src/public-types/integrations/api.public-types.js.map +1 -1
- package/dist/internal-common/src/public-types/metric.public-types.js.map +1 -1
- package/dist/internal-common/src/public-types/query.public-types.js.map +1 -1
- package/dist/internal-common/src/public-types/socket.public-types.js.map +1 -1
- package/dist/internal-common/src/public-types-backend/mutation.public-context.js.map +1 -1
- package/dist/internal-common/src/types/ai-agent.types.js +6 -2
- package/dist/internal-common/src/types/ai-agent.types.js.map +1 -1
- package/dist/internal-common/src/types/file.types.js +3 -0
- package/dist/internal-common/src/types/file.types.js.map +1 -0
- package/dist/internal-common/src/utils/backend-transforms.js +25 -1
- package/dist/internal-common/src/utils/backend-transforms.js.map +1 -1
- package/dist/internal-common/src/utils/tsoa-utils.js +1 -1
- package/dist/internal-common/src/utils/tsoa-utils.js.map +1 -1
- package/dist/local-backend/src/index.js +0 -1
- package/dist/local-backend/src/index.js.map +1 -1
- package/dist/local-backend/src/local-backend.module.js +0 -2
- package/dist/local-backend/src/local-backend.module.js.map +1 -1
- package/dist/local-backend/src/local-backend.service.js +3 -10
- package/dist/local-backend/src/local-backend.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -3
- package/dist/internal-common/src/code-executor.types.d.ts +0 -24
- package/dist/internal-common/src/local-dev.types.d.ts +0 -57
- package/dist/internal-common/src/metric-name.d.ts +0 -3
- package/dist/internal-common/src/public-types/ai-agent.public-types.d.ts +0 -267
- package/dist/internal-common/src/public-types/api-client.public-types.d.ts +0 -5
- package/dist/internal-common/src/public-types/backend.public-types.d.ts +0 -8
- package/dist/internal-common/src/public-types/code-executor.public-types.d.ts +0 -15
- package/dist/internal-common/src/public-types/communication.public-types.d.ts +0 -11
- package/dist/internal-common/src/public-types/context.public-types.d.ts +0 -25
- package/dist/internal-common/src/public-types/document.public-types.d.ts +0 -22
- package/dist/internal-common/src/public-types/integration.public-types.d.ts +0 -20
- package/dist/internal-common/src/public-types/integrations/api.public-types.d.ts +0 -53
- package/dist/internal-common/src/public-types/metric.public-types.d.ts +0 -48
- package/dist/internal-common/src/public-types/openapi.public-types.d.ts +0 -6
- package/dist/internal-common/src/public-types/query.public-types.d.ts +0 -40
- package/dist/internal-common/src/public-types/scheduler.public-types.d.ts +0 -18
- package/dist/internal-common/src/public-types/schema.public-types.d.ts +0 -23
- package/dist/internal-common/src/public-types/secret.public-types.d.ts +0 -17
- package/dist/internal-common/src/public-types/socket.public-types.d.ts +0 -2
- package/dist/internal-common/src/public-types/typescript.public-types.d.ts +0 -12
- package/dist/internal-common/src/public-types-backend/ai-agent.public-context.d.ts +0 -11
- package/dist/internal-common/src/public-types-backend/api-call.public-context.d.ts +0 -20
- package/dist/internal-common/src/public-types-backend/application.public-types.d.ts +0 -89
- package/dist/internal-common/src/public-types-backend/bundle-api.public-types.d.ts +0 -81
- package/dist/internal-common/src/public-types-backend/bundle-data.public-types.d.ts +0 -15
- package/dist/internal-common/src/public-types-backend/distributed-lock.public-context.d.ts +0 -4
- package/dist/internal-common/src/public-types-backend/graphql.public-context.d.ts +0 -7
- package/dist/internal-common/src/public-types-backend/metric.public-context.d.ts +0 -5
- package/dist/internal-common/src/public-types-backend/mutation.public-context.d.ts +0 -62
- package/dist/internal-common/src/public-types-backend/native-query.public-context.d.ts +0 -18
- package/dist/internal-common/src/public-types-backend/query.public-context.d.ts +0 -46
- package/dist/internal-common/src/public-types-backend/storage.types.d.ts +0 -9
- package/dist/internal-common/src/public-types-backend/topic.public-context.d.ts +0 -10
- package/dist/internal-common/src/types/ai-agent.types.d.ts +0 -121
- package/dist/internal-common/src/types/api.types.d.ts +0 -34
- package/dist/internal-common/src/types/application.types.d.ts +0 -83
- package/dist/internal-common/src/types/backend-run.types.d.ts +0 -68
- package/dist/internal-common/src/types/bundle-data.types.d.ts +0 -92
- package/dist/internal-common/src/types/communication.types.d.ts +0 -13
- package/dist/internal-common/src/types/connector.types.d.ts +0 -11
- package/dist/internal-common/src/types/document.types.d.ts +0 -7
- package/dist/internal-common/src/types/integrations/api.types.d.ts +0 -106
- package/dist/internal-common/src/types/integrations/auth.types.d.ts +0 -44
- package/dist/internal-common/src/types/integrations/database.types.d.ts +0 -172
- package/dist/internal-common/src/types/integrations/observability.types.d.ts +0 -21
- package/dist/internal-common/src/types/integrations/queue-types.d.ts +0 -25
- package/dist/internal-common/src/types/integrations/schemas.d.ts +0 -108
- package/dist/internal-common/src/types/integrations/storage-types.d.ts +0 -42
- package/dist/internal-common/src/types/logger.types.d.ts +0 -21
- package/dist/internal-common/src/types/observability.types.d.ts +0 -64
- package/dist/internal-common/src/types/openapi.types.d.ts +0 -26
- package/dist/internal-common/src/types/query.types.d.ts +0 -41
- package/dist/internal-common/src/types/secret.types.d.ts +0 -60
- package/dist/internal-common/src/types/security.types.d.ts +0 -8
- package/dist/internal-common/src/types/service.types.d.ts +0 -18
- package/dist/internal-common/src/utils/backend-transforms.d.ts +0 -7
- package/dist/internal-common/src/utils/global.utils.d.ts +0 -8
- package/dist/internal-common/src/utils/http.d.ts +0 -1
- package/dist/internal-common/src/utils/metrics.types.d.ts +0 -2
- package/dist/internal-common/src/utils/node-utils.d.ts +0 -1
- package/dist/internal-common/src/utils/object.d.ts +0 -20
- package/dist/internal-common/src/utils/resolve.d.ts +0 -2
- package/dist/internal-common/src/utils/serialization.d.ts +0 -5
- package/dist/internal-common/src/utils/shell-runner.d.ts +0 -12
- package/dist/internal-common/src/utils/squid-code-bundle.utils.d.ts +0 -10
- package/dist/internal-common/src/utils/squid-service.utils.d.ts +0 -34
- package/dist/internal-common/src/utils/squid.constants.d.ts +0 -1
- package/dist/internal-common/src/utils/tsoa-utils.d.ts +0 -10
- package/dist/internal-common/src/utils.d.ts +0 -2
- package/dist/internal-common/src/websocket.impl.d.ts +0 -22
- package/dist/local-backend/src/index.d.ts +0 -7
- package/dist/local-backend/src/local-backend-connectors.service.d.ts +0 -6
- package/dist/local-backend/src/local-backend-socket.service.d.ts +0 -21
- package/dist/local-backend/src/local-backend.app.d.ts +0 -2
- package/dist/local-backend/src/local-backend.controller.d.ts +0 -9
- package/dist/local-backend/src/local-backend.controller.js +0 -50
- package/dist/local-backend/src/local-backend.controller.js.map +0 -1
- package/dist/local-backend/src/local-backend.module.d.ts +0 -9
- package/dist/local-backend/src/local-backend.service.d.ts +0 -21
- package/dist/local-backend/src/local-backend.types.d.ts +0 -1
- package/dist/local-backend/src/main.d.ts +0 -1
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { Auth0IntegrationConfig, CognitoIntegrationConfig, DescopeIntegrationConfig, FirebaseAuthIntegrationConfig, JwtHmacIntegrationConfig, JwtRsaIntegrationConfig, OktaIntegrationConfig } from './auth.types';
|
|
2
|
-
import { BigQueryIntegrationConfig, ClickHouseIntegrationConfig, CockroachIntegrationConfig, IntegrationDataSchema, InternalIntegrationConfig, MongoIntegrationConfig, MssqlIntegrationConfig, MySqlIntegrationConfig, OracleIntegrationConfig, PostgresIntegrationConfig, SapHanaIntegrationConfig, SnowflakeIntegrationConfig } from './database.types';
|
|
3
|
-
import { DatadogIntegrationConfig, NewRelicIntegrationConfig } from './observability.types';
|
|
4
|
-
import { AUTH_INTEGRATION_TYPES, DATA_INTEGRATION_TYPES, GRAPHQL_INTEGRATION_TYPES, HTTP_INTEGRATION_TYPES, IntegrationSchemaType, IntegrationType } from '../../public-types/integration.public-types';
|
|
5
|
-
import { BuiltInQueueIntegrationConfig, ConfluentIntegrationConfig, KafkaIntegrationConfig } from './queue-types';
|
|
6
|
-
import { IntegrationId } from '../../public-types/communication.public-types';
|
|
7
|
-
import { ConfluenceIntegrationConfig, DefaultGraphQLIntegrationConfig, DefaultHttpApiIntegrationConfig, IntegrationApiSchema, IntegrationGraphQLSchema, JiraIntegrationConfig, LinearIntegrationConfig, MailIntegrationConfig, SalesforceCrmIntegrationConfig, ServiceNowIntegrationConfig, SlackIntegrationConfig, ZendeskIntegrationConfig } from './api.types';
|
|
8
|
-
import { BuiltInGcsIntegrationConfig, BuiltInS3IntegrationConfig, GcsIntegrationConfig, GoogleDriveIntegrationConfig, S3IntegrationConfig } from './storage-types';
|
|
9
|
-
export interface IntegrationConfigTypes {
|
|
10
|
-
api: DefaultHttpApiIntegrationConfig;
|
|
11
|
-
auth0: Auth0IntegrationConfig;
|
|
12
|
-
bigquery: BigQueryIntegrationConfig;
|
|
13
|
-
built_in_db: InternalIntegrationConfig;
|
|
14
|
-
built_in_gcs: BuiltInGcsIntegrationConfig;
|
|
15
|
-
built_in_queue: BuiltInQueueIntegrationConfig;
|
|
16
|
-
built_in_s3: BuiltInS3IntegrationConfig;
|
|
17
|
-
clickhouse: ClickHouseIntegrationConfig;
|
|
18
|
-
cockroach: CockroachIntegrationConfig;
|
|
19
|
-
cognito: CognitoIntegrationConfig;
|
|
20
|
-
confluence: ConfluenceIntegrationConfig;
|
|
21
|
-
confluent: ConfluentIntegrationConfig;
|
|
22
|
-
datadog: DatadogIntegrationConfig;
|
|
23
|
-
descope: DescopeIntegrationConfig;
|
|
24
|
-
firebase_auth: FirebaseAuthIntegrationConfig;
|
|
25
|
-
gcs: GcsIntegrationConfig;
|
|
26
|
-
google_drive: GoogleDriveIntegrationConfig;
|
|
27
|
-
graphql: DefaultGraphQLIntegrationConfig;
|
|
28
|
-
jira: JiraIntegrationConfig;
|
|
29
|
-
jwt_hmac: JwtHmacIntegrationConfig;
|
|
30
|
-
jwt_rsa: JwtRsaIntegrationConfig;
|
|
31
|
-
kafka: KafkaIntegrationConfig;
|
|
32
|
-
linear: LinearIntegrationConfig;
|
|
33
|
-
mongo: MongoIntegrationConfig;
|
|
34
|
-
mssql: MssqlIntegrationConfig;
|
|
35
|
-
mysql: MySqlIntegrationConfig;
|
|
36
|
-
newrelic: NewRelicIntegrationConfig;
|
|
37
|
-
okta: OktaIntegrationConfig;
|
|
38
|
-
oracledb: OracleIntegrationConfig;
|
|
39
|
-
postgres: PostgresIntegrationConfig;
|
|
40
|
-
s3: S3IntegrationConfig;
|
|
41
|
-
salesforce_crm: SalesforceCrmIntegrationConfig;
|
|
42
|
-
sap_hana: SapHanaIntegrationConfig;
|
|
43
|
-
servicenow: ServiceNowIntegrationConfig;
|
|
44
|
-
snowflake: SnowflakeIntegrationConfig;
|
|
45
|
-
zendesk: ZendeskIntegrationConfig;
|
|
46
|
-
mail: MailIntegrationConfig;
|
|
47
|
-
slack: SlackIntegrationConfig;
|
|
48
|
-
}
|
|
49
|
-
export interface IntegrationSchemaTypes {
|
|
50
|
-
api: IntegrationApiSchema;
|
|
51
|
-
bigquery: IntegrationDataSchema;
|
|
52
|
-
built_in_db: IntegrationDataSchema;
|
|
53
|
-
clickhouse: IntegrationDataSchema;
|
|
54
|
-
cockroach: IntegrationDataSchema;
|
|
55
|
-
graphql: IntegrationGraphQLSchema;
|
|
56
|
-
mongo: IntegrationDataSchema;
|
|
57
|
-
mssql: IntegrationDataSchema;
|
|
58
|
-
mysql: IntegrationDataSchema;
|
|
59
|
-
oracledb: IntegrationDataSchema;
|
|
60
|
-
postgres: IntegrationDataSchema;
|
|
61
|
-
sap_hana: IntegrationDataSchema;
|
|
62
|
-
snowflake: IntegrationDataSchema;
|
|
63
|
-
}
|
|
64
|
-
export type IntegrationTypeWithConfig = keyof IntegrationConfigTypes;
|
|
65
|
-
export type IntegrationSchemaKeys = keyof IntegrationSchemaTypes;
|
|
66
|
-
export type IntegrationConfig = IntegrationConfigTypes[IntegrationTypeWithConfig];
|
|
67
|
-
export type IntegrationSchema = IntegrationSchemaTypes[IntegrationSchemaKeys];
|
|
68
|
-
export type DatabaseIntegrationType = (typeof DATA_INTEGRATION_TYPES)[number];
|
|
69
|
-
export type DatabaseIntegrationConfig = IntegrationConfigTypes[DatabaseIntegrationType];
|
|
70
|
-
export type AuthIntegrationType = (typeof AUTH_INTEGRATION_TYPES)[number];
|
|
71
|
-
export type AuthIntegrationConfig = IntegrationConfigTypes[AuthIntegrationType];
|
|
72
|
-
export type HttpApiIntegrationType = (typeof HTTP_INTEGRATION_TYPES)[number];
|
|
73
|
-
export type HttpApiIntegrationConfig = IntegrationConfigTypes[HttpApiIntegrationType];
|
|
74
|
-
export type GraphQLIntegrationType = (typeof GRAPHQL_INTEGRATION_TYPES)[number];
|
|
75
|
-
export type GraphQLIntegrationConfig = IntegrationConfigTypes[GraphQLIntegrationType];
|
|
76
|
-
export declare function isDataIntegrationType(type: unknown): type is DatabaseIntegrationType;
|
|
77
|
-
export declare function isAuthIntegrationType(type: unknown): type is AuthIntegrationType;
|
|
78
|
-
export declare function isApiIntegrationType(type: unknown): type is HttpApiIntegrationType;
|
|
79
|
-
export declare function isGraphQLIntegrationType(type: unknown): type is GraphQLIntegrationType;
|
|
80
|
-
export declare function isAuthIntegration(integration: unknown): integration is AuthIntegrationConfig;
|
|
81
|
-
export interface BaseIntegrationConfig {
|
|
82
|
-
id: IntegrationId;
|
|
83
|
-
type: IntegrationType;
|
|
84
|
-
creationDate?: Date;
|
|
85
|
-
updateDate?: Date;
|
|
86
|
-
}
|
|
87
|
-
export interface BaseIntegrationConfigWithConfiguration<ConfigurationType extends object> extends BaseIntegrationConfig {
|
|
88
|
-
configuration: ConfigurationType;
|
|
89
|
-
}
|
|
90
|
-
export declare function isBaseIntegrationConfigWithConfiguration(obj: unknown): obj is BaseIntegrationConfigWithConfiguration<object>;
|
|
91
|
-
export interface IntegrationConfigurationWithConnectionOptions<ConnectionOptionsType extends object> {
|
|
92
|
-
connectionOptions: ConnectionOptionsType;
|
|
93
|
-
}
|
|
94
|
-
export declare function isIntegrationConfigurationWithConnectionOptions(obj: unknown): obj is IntegrationConfigurationWithConnectionOptions<object>;
|
|
95
|
-
export interface ConnectionOptionsPasswordAsSecrets {
|
|
96
|
-
password: string;
|
|
97
|
-
}
|
|
98
|
-
export interface CommonConnectionPrivateKeyAsSecrets {
|
|
99
|
-
privateKey: string;
|
|
100
|
-
}
|
|
101
|
-
export interface ConnectionOptionsWithSecrets<SecretsType> {
|
|
102
|
-
secrets: SecretsType;
|
|
103
|
-
}
|
|
104
|
-
export declare function isConnectionOptionsWithSecrets(obj: unknown): obj is ConnectionOptionsWithSecrets<unknown>;
|
|
105
|
-
export interface BaseIntegrationSchema {
|
|
106
|
-
type: IntegrationSchemaType;
|
|
107
|
-
}
|
|
108
|
-
export declare function isNoSqlDatabase(type: IntegrationType): boolean;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { BaseIntegrationConfig } from './schemas';
|
|
2
|
-
export interface BaseStorageIntegrationConfig extends BaseIntegrationConfig {
|
|
3
|
-
}
|
|
4
|
-
export interface S3Configuration {
|
|
5
|
-
bucket: string;
|
|
6
|
-
region: string;
|
|
7
|
-
accessKey: string;
|
|
8
|
-
secrets: S3ConfigurationSecrets;
|
|
9
|
-
}
|
|
10
|
-
export interface S3ConfigurationSecrets {
|
|
11
|
-
secretKey: string;
|
|
12
|
-
}
|
|
13
|
-
export interface S3IntegrationConfig extends BaseStorageIntegrationConfig {
|
|
14
|
-
configuration: S3Configuration;
|
|
15
|
-
}
|
|
16
|
-
export interface BuiltInS3IntegrationConfig extends BaseStorageIntegrationConfig {
|
|
17
|
-
}
|
|
18
|
-
export interface GcsConfiguration {
|
|
19
|
-
bucket: string;
|
|
20
|
-
region: string;
|
|
21
|
-
accessKey: string;
|
|
22
|
-
secrets: GcsConfigurationSecrets;
|
|
23
|
-
}
|
|
24
|
-
export interface GcsConfigurationSecrets {
|
|
25
|
-
credentialsJson: string;
|
|
26
|
-
}
|
|
27
|
-
export interface GcsIntegrationConfig extends BaseStorageIntegrationConfig {
|
|
28
|
-
configuration: GcsConfiguration;
|
|
29
|
-
}
|
|
30
|
-
export interface BuiltInGcsIntegrationConfig extends BaseStorageIntegrationConfig {
|
|
31
|
-
}
|
|
32
|
-
export interface GoogleDriveIntegrationConfig extends BaseStorageIntegrationConfig {
|
|
33
|
-
configuration: GoogleDriveConfiguration;
|
|
34
|
-
}
|
|
35
|
-
export interface GoogleDriveConfiguration {
|
|
36
|
-
clientId: string;
|
|
37
|
-
redirectUri: string;
|
|
38
|
-
secrets: GoogleDriveConfigurationSecrets;
|
|
39
|
-
}
|
|
40
|
-
export interface GoogleDriveConfigurationSecrets {
|
|
41
|
-
clientSecret: string;
|
|
42
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export type LoggerContext = Record<string, any>;
|
|
2
|
-
export interface Logger {
|
|
3
|
-
trace(message: string, context?: LoggerContext): void;
|
|
4
|
-
debug(message: string, context?: LoggerContext): void;
|
|
5
|
-
info(message: string, context?: LoggerContext): void;
|
|
6
|
-
warn(message: string, context?: LoggerContext): void;
|
|
7
|
-
error(message: string, context?: LoggerContext): void;
|
|
8
|
-
log(record: LogRecord): void;
|
|
9
|
-
}
|
|
10
|
-
export declare enum LogLevel {
|
|
11
|
-
TRACE = "trace",
|
|
12
|
-
DEBUG = "debug",
|
|
13
|
-
INFO = "info",
|
|
14
|
-
WARN = "warn",
|
|
15
|
-
ERROR = "error"
|
|
16
|
-
}
|
|
17
|
-
export interface LogRecord {
|
|
18
|
-
level?: LogLevel;
|
|
19
|
-
message?: string;
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
}
|
|
@@ -1,64 +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
|
-
export declare const O11Y_TAG_IS_ERROR = "isError";
|
|
54
|
-
export declare const O11Y_TAG_APP_ID = "appId";
|
|
55
|
-
export declare const O11Y_TAG_INTEGRATION_ID = "integrationId";
|
|
56
|
-
export declare const O11Y_TAG_AI_MODEL = "aiModel";
|
|
57
|
-
export declare const O11Y_TAG_AI_PROFILE = "aiProfile";
|
|
58
|
-
export declare const O11Y_TAG_API_KEY_SOURCE = "apiKeySource";
|
|
59
|
-
export declare const O11Y_TAG_IS_TENANT_ORIGINATED = "isTenantOriginated";
|
|
60
|
-
export declare const O11Y_TAG_FUNCTION_NAME = "functionName";
|
|
61
|
-
export declare const O11Y_TAG_FUNCTION_TYPE = "functionType";
|
|
62
|
-
export declare function getBooleanMetricTagValue(value: boolean): string;
|
|
63
|
-
export declare const COUNT_METRIC_SUFFIXES: string[];
|
|
64
|
-
export declare const GAUGE_METRIC_SUFFIXES: string[];
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export interface OpenApiController {
|
|
2
|
-
actions: OpenApiAction[];
|
|
3
|
-
modulePath: string;
|
|
4
|
-
name: string;
|
|
5
|
-
path: string;
|
|
6
|
-
}
|
|
7
|
-
export interface OpenApiAction {
|
|
8
|
-
fullPath: string;
|
|
9
|
-
method: OpenApiHttpMethod;
|
|
10
|
-
name: string;
|
|
11
|
-
parameters: Record<string, OpenApiParameter>;
|
|
12
|
-
path: string;
|
|
13
|
-
uploadFile: boolean;
|
|
14
|
-
uploadFiles: boolean;
|
|
15
|
-
security: any[];
|
|
16
|
-
successStatus: string | null;
|
|
17
|
-
}
|
|
18
|
-
export interface OpenApiParameter {
|
|
19
|
-
in: OpenApiParameterLocation;
|
|
20
|
-
name: string;
|
|
21
|
-
required?: boolean;
|
|
22
|
-
dataType?: string;
|
|
23
|
-
ref?: string;
|
|
24
|
-
}
|
|
25
|
-
export type OpenApiHttpMethod = 'get' | 'post' | 'put' | 'delete';
|
|
26
|
-
export type OpenApiParameterLocation = 'path' | 'query' | 'header' | 'body';
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { AppId, ClientId, ClientRequestId } from '../public-types/communication.public-types';
|
|
2
|
-
import { Condition, Operator, Query, SimpleCondition } from '../public-types/query.public-types';
|
|
3
|
-
import { FieldType } from '../public-types/document.public-types';
|
|
4
|
-
export type QuerySubscriptionId = `${ClientId}_${ClientRequestId}`;
|
|
5
|
-
export interface QueryRequest {
|
|
6
|
-
clientRequestId: ClientRequestId;
|
|
7
|
-
query: Query;
|
|
8
|
-
subscribe: boolean;
|
|
9
|
-
}
|
|
10
|
-
export interface QueryUnsubscribeRequest {
|
|
11
|
-
clientRequestId: ClientRequestId;
|
|
12
|
-
}
|
|
13
|
-
interface QueryMetadata {
|
|
14
|
-
condCount: number;
|
|
15
|
-
}
|
|
16
|
-
export declare function encodeCondition(condition: Condition<any>): EncodedCondition;
|
|
17
|
-
export type EncodedCondition = string;
|
|
18
|
-
export type QueryMapping<QueryReferenceType extends string> = {
|
|
19
|
-
unconditional: Array<QueryReferenceType>;
|
|
20
|
-
conditional: Record<EncodedCondition, Array<QueryReferenceType>>;
|
|
21
|
-
queriesMetadata: Record<QueryReferenceType, QueryMetadata>;
|
|
22
|
-
};
|
|
23
|
-
export declare abstract class QueryMappingManager<T> {
|
|
24
|
-
abstract addQuery(appId: AppId, query: Query, key: T): Promise<void>;
|
|
25
|
-
abstract removeQuery(appId: AppId, key: T): Promise<Query | undefined>;
|
|
26
|
-
abstract removeLocalDevAppData(appId: AppId): Promise<void>;
|
|
27
|
-
}
|
|
28
|
-
export declare function compareOperator(conditionValue: FieldType, valueInDocument: FieldType, operator: Operator): boolean;
|
|
29
|
-
export declare function replaceSpecialCharacters(input: string): string;
|
|
30
|
-
export declare function getQuerySubscriptionId(clientId: string, clientRequestId: string): QuerySubscriptionId;
|
|
31
|
-
export declare function parseQuerySubscriptionId(querySubscriptionId: QuerySubscriptionId): {
|
|
32
|
-
clientId: string;
|
|
33
|
-
clientRequestId: string;
|
|
34
|
-
};
|
|
35
|
-
export interface QueryRegisterRequest {
|
|
36
|
-
clientRequestId: ClientRequestId;
|
|
37
|
-
query: Query;
|
|
38
|
-
parentClientRequestId: ClientRequestId;
|
|
39
|
-
}
|
|
40
|
-
export declare function isSimpleCondition(condition: Condition): condition is SimpleCondition;
|
|
41
|
-
export {};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { ApiKeyEntry, SecretEntry, SecretKey, SecretMetadata, SetSecretRequestEntry } from '../public-types/secret.public-types';
|
|
2
|
-
export type ApiKeyName = string;
|
|
3
|
-
export declare const BACKEND_API_KEY = "_BACKEND_API_KEY";
|
|
4
|
-
export declare const APP_API_KEY = "APP_API_KEY";
|
|
5
|
-
export interface ApplicationSecrets {
|
|
6
|
-
custom: Record<SecretKey, SecretEntry>;
|
|
7
|
-
apiKeys: Record<SecretKey, ApiKeyEntry>;
|
|
8
|
-
}
|
|
9
|
-
export interface SystemSecrets {
|
|
10
|
-
sharedMongo: {
|
|
11
|
-
password: string;
|
|
12
|
-
};
|
|
13
|
-
datadog: {
|
|
14
|
-
appKey: string;
|
|
15
|
-
apiKey: string;
|
|
16
|
-
};
|
|
17
|
-
openai: {
|
|
18
|
-
apiKey: string;
|
|
19
|
-
};
|
|
20
|
-
anthropic: {
|
|
21
|
-
apiKey: string;
|
|
22
|
-
};
|
|
23
|
-
gemini: {
|
|
24
|
-
apiKey: string;
|
|
25
|
-
};
|
|
26
|
-
stability: {
|
|
27
|
-
apiKey: string;
|
|
28
|
-
};
|
|
29
|
-
flux: {
|
|
30
|
-
apiKey: string;
|
|
31
|
-
};
|
|
32
|
-
pinecone: {
|
|
33
|
-
apiKey: string;
|
|
34
|
-
};
|
|
35
|
-
cohere: {
|
|
36
|
-
apiKey: string;
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
export interface SetSecretRequest {
|
|
40
|
-
entries: Array<SetSecretRequestEntry>;
|
|
41
|
-
}
|
|
42
|
-
export interface DeleteSecretRequest {
|
|
43
|
-
keys: Array<SecretKey>;
|
|
44
|
-
force: boolean;
|
|
45
|
-
}
|
|
46
|
-
export interface GetCustomSecretRequest {
|
|
47
|
-
key: SecretKey;
|
|
48
|
-
}
|
|
49
|
-
export interface GetApiKeyRequest {
|
|
50
|
-
key: SecretKey;
|
|
51
|
-
}
|
|
52
|
-
export type DeleteApiKeyRequest = Pick<SecretMetadata, 'key'>;
|
|
53
|
-
export interface ListApplicationSecretMetadataResponse {
|
|
54
|
-
custom: SecretMetadata[];
|
|
55
|
-
apiKeys: SecretMetadata[];
|
|
56
|
-
}
|
|
57
|
-
export type GenerateNewApiKeyRequest = Pick<SecretMetadata, 'key'>;
|
|
58
|
-
export interface GenerateNewApiKeyResponse {
|
|
59
|
-
apiKey: string;
|
|
60
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { AsyncLocalStorage } from 'async_hooks';
|
|
2
|
-
import { AppId, EnvironmentId, SquidDeveloperId } from '../public-types/communication.public-types';
|
|
3
|
-
import { Auth, RunContext } from '../public-types/context.public-types';
|
|
4
|
-
import { SecretKey } from '../public-types/secret.public-types';
|
|
5
|
-
export interface ServiceGlobalConfig {
|
|
6
|
-
environmentId?: EnvironmentId;
|
|
7
|
-
appId: AppId;
|
|
8
|
-
squidDeveloperId?: SquidDeveloperId;
|
|
9
|
-
backendApiKey: string;
|
|
10
|
-
secrets: Record<SecretKey, any>;
|
|
11
|
-
apiKeys: Record<SecretKey, string>;
|
|
12
|
-
requestLocalStorage: AsyncLocalStorage<ServiceRequestConfig>;
|
|
13
|
-
codeDirByServiceClassName: Map<string, string>;
|
|
14
|
-
}
|
|
15
|
-
export interface ServiceRequestConfig {
|
|
16
|
-
auth: Auth | undefined;
|
|
17
|
-
context: RunContext;
|
|
18
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ExecuteFunctionAnnotationType } from '../types/backend-run.types';
|
|
2
|
-
import { SquidFile, WebhookResponse } from '../public-types-backend/bundle-api.public-types';
|
|
3
|
-
import { OpenApiResponse } from '../public-types/openapi.public-types';
|
|
4
|
-
export declare function transformParams(params: Array<any>, executeFunctionAnnotationType: ExecuteFunctionAnnotationType, files: Array<SquidFile>): unknown[];
|
|
5
|
-
export declare function transformResponse(functionResponse: unknown, executeFunctionAnnotationType: ExecuteFunctionAnnotationType): any;
|
|
6
|
-
export declare function isWebhookResponse(response: any): response is WebhookResponse;
|
|
7
|
-
export declare function isOpenApiResponse(response: any): response is OpenApiResponse;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare function getGlobal(): any;
|
|
2
|
-
export declare function isDebugEnabled(): boolean;
|
|
3
|
-
export declare function enableDebugLogs(mode?: boolean): void;
|
|
4
|
-
export declare function disableTimestampsInLog(): void;
|
|
5
|
-
export declare function isTimestampEnabled(): boolean;
|
|
6
|
-
export declare class DebugLogger {
|
|
7
|
-
static debug(...args: any[]): void;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getApplicationUrl(regionPrefix: string, appId: string, path: string): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isNodeError(error: unknown): error is NodeJS.ErrnoException;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare function getInPath(obj: unknown, path: string): any;
|
|
2
|
-
export declare function isDateObject(value: unknown): value is Date;
|
|
3
|
-
export declare function setInPath(obj: object, path: string, value: unknown, delimiter?: string): void;
|
|
4
|
-
export declare function deleteInPath(obj: object, path: string, delimiter?: string): void;
|
|
5
|
-
export declare function replaceKeyInMap<K, T>(map: Map<K, T | undefined>, a: K, b: K): void;
|
|
6
|
-
export declare function replaceKeyInRecord<K extends keyof any, T>(record: Record<K, T>, a: K, b: K): void;
|
|
7
|
-
export declare function isNil(obj: unknown): obj is null | undefined;
|
|
8
|
-
export declare function isEqual(a: unknown, b: unknown): boolean;
|
|
9
|
-
export declare function isEmpty(a: unknown): boolean;
|
|
10
|
-
export declare function omit<T extends object, K extends PropertyKey[]>(object: T | null | undefined, ...fieldsToRemove: K): Pick<T, Exclude<keyof T, K[number]>>;
|
|
11
|
-
export type CloneCustomizer = (value: unknown) => unknown | undefined;
|
|
12
|
-
export declare function cloneDeep<R = unknown>(value: R, customizer?: CloneCustomizer): R;
|
|
13
|
-
export declare function cloneShallow<T>(value: T): T;
|
|
14
|
-
export declare function deepMerge<T extends object, U extends object>(target: T, source: U): T & U;
|
|
15
|
-
export declare function compareValues(v1: unknown, v2: unknown): number;
|
|
16
|
-
export declare function mapValues<ResultType extends object = Record<string, unknown>, InputType extends Record<string, unknown> = Record<string, unknown>>(obj: InputType, valueMapperFn: (value: any, key: keyof InputType, obj: InputType) => unknown): ResultType;
|
|
17
|
-
export declare function groupBy<T, K extends PropertyKey>(array: T[], getKey: (item: T) => K): Record<K, T[]>;
|
|
18
|
-
export declare function pick<T extends object, K extends keyof T>(obj: T, keys: ReadonlyArray<K>): Pick<T, K>;
|
|
19
|
-
export declare function invert<K extends string | number, V extends string | number>(record: Record<K, V>): Record<V, K>;
|
|
20
|
-
export declare function range(start: number, end: number, step: number, maximumNumberOfItems?: number): number[];
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function normalizeJsonAsString(json: unknown): string;
|
|
2
|
-
export declare function serializeObj(obj: unknown): string;
|
|
3
|
-
export declare function deserializeObj<T = any>(str: string): T;
|
|
4
|
-
export declare function encodeValueForMapping(value: unknown): string;
|
|
5
|
-
export declare function decodeValueForMapping(encodedString: string): any;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface ErrorLine {
|
|
2
|
-
level: 'error' | 'info';
|
|
3
|
-
message: string;
|
|
4
|
-
}
|
|
5
|
-
export interface ProcessError {
|
|
6
|
-
errorMessage: string;
|
|
7
|
-
combinedOutput: Array<ErrorLine>;
|
|
8
|
-
}
|
|
9
|
-
export declare function runInShell(command: string, printMessages?: boolean, cwd?: string, envVars?: Record<string, string>): Promise<{
|
|
10
|
-
combinedOutput: Array<ErrorLine>;
|
|
11
|
-
}>;
|
|
12
|
-
export declare function printCombinedOutput(combinedOutput: Array<ErrorLine>): void;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ConnectorRunConfiguration } from '../types/backend-run.types';
|
|
2
|
-
import { ConnectorId } from '../types/connector.types';
|
|
3
|
-
export declare function fetchAndUnpackSquidCodeBundle(codeUrl: string, codeDir: string): Promise<void>;
|
|
4
|
-
export interface ConnectorInstallInfo {
|
|
5
|
-
id: ConnectorId;
|
|
6
|
-
path: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function installConnectors(connectors: Array<ConnectorRunConfiguration>): Promise<Array<ConnectorInstallInfo>>;
|
|
9
|
-
export declare function checkConnectorIsInstalled(dir: string): Promise<boolean>;
|
|
10
|
-
export declare function installConnector(config: ConnectorRunConfiguration): Promise<ConnectorInstallInfo>;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
|
-
import { ServiceGlobalConfig, ServiceRequestConfig } from '../types/service.types';
|
|
3
|
-
import { CodeType, ExecuteFunctionPayload } from '../types/backend-run.types';
|
|
4
|
-
import { ApplicationBundleData } from '../types/bundle-data.types';
|
|
5
|
-
import { FunctionName, ServiceFunctionName } from '../public-types/backend.public-types';
|
|
6
|
-
export declare const CIRCULAR_DEPENDENCY_ERROR = "CIRCULAR_DEPENDENCY";
|
|
7
|
-
export interface SquidServiceLike<SquidType = any> extends Record<string, Function | object | SquidType> {
|
|
8
|
-
new <T extends SquidServiceLike<SquidType>>(config: ServiceGlobalConfig): T;
|
|
9
|
-
squid: SquidType;
|
|
10
|
-
config: ServiceGlobalConfig;
|
|
11
|
-
}
|
|
12
|
-
export declare function getOrCreateSquidService<T extends SquidServiceLike>(serviceClass: T, globalConfig: ServiceGlobalConfig, requestConfig: ServiceRequestConfig): T;
|
|
13
|
-
export declare function getSquidServiceRequestConfig(requestLocalStorage: AsyncLocalStorage<ServiceRequestConfig>): ServiceRequestConfig;
|
|
14
|
-
export interface SquidServiceMetadata {
|
|
15
|
-
version: number;
|
|
16
|
-
}
|
|
17
|
-
export declare function getSquidServiceMetadata(service: SquidServiceLike): SquidServiceMetadata;
|
|
18
|
-
export declare function setSquidServiceMetadata(service: SquidServiceLike): void;
|
|
19
|
-
export declare function getSquidServiceConfig(): ServiceGlobalConfig;
|
|
20
|
-
export type SquidWebpackModule = any;
|
|
21
|
-
export interface TenantModuleInfo {
|
|
22
|
-
webpackModule: SquidWebpackModule;
|
|
23
|
-
indexJsPath: string;
|
|
24
|
-
codeDir: string;
|
|
25
|
-
codeType: CodeType;
|
|
26
|
-
}
|
|
27
|
-
export declare function selectDefaultServiceFunctions(functionName: FunctionName, tenantModules: Array<TenantModuleInfo>): Array<Function>;
|
|
28
|
-
export interface SquidServiceMethodLookupResult<SquidType> {
|
|
29
|
-
service: SquidServiceLike<SquidType>;
|
|
30
|
-
squidServicedMethod: Function;
|
|
31
|
-
serviceRequestConfig: ServiceRequestConfig;
|
|
32
|
-
}
|
|
33
|
-
export declare function lookupSquidServiceMethod<SquidType>(payload: ExecuteFunctionPayload, requestLocalStorage: AsyncLocalStorage<ServiceRequestConfig>, tenantModules: Array<TenantModuleInfo>): SquidServiceMethodLookupResult<SquidType>;
|
|
34
|
-
export declare function mergeMetadataResponses(serviceFunctionName: ServiceFunctionName, responses: Array<unknown>): ApplicationBundleData;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SQUID_SUPPORT_EMAIL = "support@getsquid.ai";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface OpenApiSpecAndControllers {
|
|
2
|
-
openApiControllersMap: Record<string, string>;
|
|
3
|
-
openApiSpecsMap: Record<string, string>;
|
|
4
|
-
}
|
|
5
|
-
export declare class TsoaUtils {
|
|
6
|
-
constructor();
|
|
7
|
-
static generateAllSpecs(verbose?: boolean, supportsDefault?: boolean): Promise<OpenApiSpecAndControllers>;
|
|
8
|
-
private static extractTsoaName;
|
|
9
|
-
private static attachCodeSamples;
|
|
10
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
interface Options {
|
|
2
|
-
maxAttempts?: number;
|
|
3
|
-
protocols?: string[];
|
|
4
|
-
onmessage?: (event: any) => void;
|
|
5
|
-
onopen?: (event: any) => void;
|
|
6
|
-
onclose?: (event: any) => void;
|
|
7
|
-
onerror?: (event: any) => void;
|
|
8
|
-
onreconnect?: (event: any) => void;
|
|
9
|
-
onmaximum?: (event: any) => void;
|
|
10
|
-
timeoutMillis?: number;
|
|
11
|
-
}
|
|
12
|
-
export interface WebSocketWrapper {
|
|
13
|
-
open: () => void;
|
|
14
|
-
reconnect: (e: any) => void;
|
|
15
|
-
json: (x: any) => void;
|
|
16
|
-
send: (x: string) => void;
|
|
17
|
-
close: (x?: number, y?: string) => void;
|
|
18
|
-
connected: boolean;
|
|
19
|
-
closeCalled: boolean;
|
|
20
|
-
}
|
|
21
|
-
export declare function createWebSocketWrapper(url: string, opts?: Options): WebSocketWrapper;
|
|
22
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './local-backend-connectors.service';
|
|
2
|
-
export * from './local-backend-socket.service';
|
|
3
|
-
export * from './local-backend.app';
|
|
4
|
-
export * from './local-backend.controller';
|
|
5
|
-
export * from './local-backend.module';
|
|
6
|
-
export * from './local-backend.service';
|
|
7
|
-
export * from './local-backend.types';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ConnectorRunConfiguration } from '../../internal-common/src/types/backend-run.types';
|
|
2
|
-
import { TenantModuleInfo } from '../../internal-common/src/utils/squid-service.utils';
|
|
3
|
-
export declare class LocalBackendConnectorsService {
|
|
4
|
-
private readonly connectorModules;
|
|
5
|
-
installAndLoadConnectorModules(connectors: Array<ConnectorRunConfiguration>): Promise<Array<TenantModuleInfo>>;
|
|
6
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { LocalBackendService } from './local-backend.service';
|
|
2
|
-
export declare class LocalBackendSocketService {
|
|
3
|
-
private readonly localBackendService;
|
|
4
|
-
private readonly socketEndpoint;
|
|
5
|
-
private socket;
|
|
6
|
-
private readonly appId;
|
|
7
|
-
private readonly region;
|
|
8
|
-
private readonly apiKey;
|
|
9
|
-
private readonly logTypes;
|
|
10
|
-
private readonly environmentId;
|
|
11
|
-
private readonly squidDeveloperId;
|
|
12
|
-
private readonly connectionReady;
|
|
13
|
-
private readonly fullAppId;
|
|
14
|
-
constructor(localBackendService: LocalBackendService);
|
|
15
|
-
private onMessage;
|
|
16
|
-
private handleExecuteFunctionMessage;
|
|
17
|
-
private handleLogMessage;
|
|
18
|
-
private sendMessageThroughSocket;
|
|
19
|
-
private printInfoAboutBundleData;
|
|
20
|
-
private readLogTypes;
|
|
21
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { LocalBackendService } from './local-backend.service';
|
|
2
|
-
import { Response } from 'express';
|
|
3
|
-
import { BatchRunConfigurationRequest } from '../../internal-common/src/code-executor.types';
|
|
4
|
-
export declare class LocalBackendController {
|
|
5
|
-
private readonly localBackendService;
|
|
6
|
-
constructor(localBackendService: LocalBackendService);
|
|
7
|
-
runCode(request: BatchRunConfigurationRequest, res: Response): Promise<void>;
|
|
8
|
-
healthCheck(res: Response): Promise<void>;
|
|
9
|
-
}
|