@squidcloud/client 1.0.59 → 1.0.60

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 (31) hide show
  1. package/dist/common/src/ai-assistant.schemas.d.ts +210 -0
  2. package/dist/common/src/ai-assistant.types.d.ts +76 -0
  3. package/dist/common/src/api-call.context.d.ts +1 -1
  4. package/dist/common/src/api.types.d.ts +1 -1
  5. package/dist/common/src/application.schemas.d.ts +32 -1
  6. package/dist/common/src/application.types.d.ts +16 -4
  7. package/dist/common/src/bundle-data.types.d.ts +1 -1
  8. package/dist/common/src/index.d.ts +3 -1
  9. package/dist/common/src/integrations/ai_assistant.types.d.ts +30 -0
  10. package/dist/common/src/integrations/api.types.d.ts +80 -0
  11. package/dist/common/src/integrations/auth.types.d.ts +22 -0
  12. package/dist/common/src/integrations/database.types.d.ts +236 -0
  13. package/dist/common/src/integrations/index.d.ts +97 -0
  14. package/dist/common/src/integrations/observability.types.d.ts +22 -0
  15. package/dist/common/src/secret.types.d.ts +0 -3
  16. package/dist/common/src/socket.types.d.ts +11 -3
  17. package/dist/common/src/utils/validation.d.ts +1 -1
  18. package/dist/index.js +6 -6
  19. package/dist/typescript-client/src/ai-assistant-client.d.ts +66 -0
  20. package/dist/typescript-client/src/ai-client.factory.d.ts +13 -0
  21. package/dist/typescript-client/src/api.manager.d.ts +4 -3
  22. package/dist/typescript-client/src/backend-function.manager.d.ts +3 -3
  23. package/dist/typescript-client/src/client-id.service.d.ts +24 -0
  24. package/dist/typescript-client/src/mutation/mutation-sender.d.ts +4 -3
  25. package/dist/typescript-client/src/named-query.manager.d.ts +4 -3
  26. package/dist/typescript-client/src/query/query-subscription.manager.d.ts +9 -4
  27. package/dist/typescript-client/src/rpc.manager.d.ts +4 -3
  28. package/dist/typescript-client/src/socket.manager.d.ts +11 -3
  29. package/dist/typescript-client/src/squid.d.ts +2 -1
  30. package/package.json +1 -1
  31. package/dist/common/src/integration.types.d.ts +0 -404
@@ -1,404 +0,0 @@
1
- import { Validations } from './auth.types';
2
- import { IntegrationId } from './communication.types';
3
- import { FieldName } from './document.types';
4
- import { IntrospectionQuery } from './graphql.types';
5
- import { CollectionSchema } from './schema/schema.types';
6
- export interface MongoConnectionSecretOptions {
7
- password?: string;
8
- }
9
- export interface MongoConnectionOptions {
10
- secrets: MongoConnectionSecretOptions;
11
- connectionString: string;
12
- user?: string;
13
- replicaSet?: string;
14
- ssl?: {
15
- certificateFile: string;
16
- validate: boolean;
17
- };
18
- maxPoolSize?: number;
19
- minPoolSize?: number;
20
- socketTimeoutMS?: number;
21
- serverSelectionTimeoutMS?: number;
22
- keepAlive?: boolean;
23
- directConnection?: boolean;
24
- }
25
- export interface MySqlConnectionSecretOptions {
26
- password: string;
27
- }
28
- export interface MssqlConnectionSecretOptions {
29
- password: string;
30
- }
31
- export interface PostgresConnectionSecretOptions {
32
- password: string;
33
- sslCertificate?: string;
34
- }
35
- export interface MySqlConnectionOptions {
36
- secrets: MySqlConnectionSecretOptions;
37
- host: string;
38
- user: string;
39
- database: string;
40
- connectionLimit?: number;
41
- sslEnabled?: boolean;
42
- }
43
- export interface MssqlConnectionOptions {
44
- secrets: MssqlConnectionSecretOptions;
45
- host: string;
46
- user: string;
47
- schema: string;
48
- database: string;
49
- connectionLimit?: number;
50
- sslEnabled?: boolean;
51
- }
52
- export interface PostgresConnectionOptions {
53
- host: string;
54
- user: string;
55
- database: string;
56
- schema?: string;
57
- sslEnabled?: boolean;
58
- secrets: PostgresConnectionSecretOptions;
59
- }
60
- export interface GraphQLConnectionOptions {
61
- baseUrl: string;
62
- injectionSchema?: ApiInjectionSchema;
63
- }
64
- export type ApiInjectionSchema = Record<FieldName, ApiInjectionField>;
65
- export interface OpenApiDiscoveryOptions {
66
- openApiSpecUrl: string;
67
- }
68
- export interface SnowflakeConnectionSecretOptions {
69
- password: string;
70
- }
71
- export interface SnowflakeConnectionOptions {
72
- secrets: SnowflakeConnectionSecretOptions;
73
- account: string;
74
- username: string;
75
- database: string;
76
- schema: string;
77
- warehouse: string;
78
- role: string;
79
- }
80
- export declare enum IntegrationCategory {
81
- 'database' = "database",
82
- 'api' = "api",
83
- 'observability' = "observability",
84
- 'crm' = "crm",
85
- 'auth' = "auth"
86
- }
87
- export declare enum IntegrationType {
88
- 'built_in_db' = "built_in_db",
89
- 'mongo' = "mongo",
90
- 'mysql' = "mysql",
91
- 'mssql' = "mssql",
92
- 'postgres' = "postgres",
93
- 'cockroach' = "cockroach",
94
- 'api' = "api",
95
- 'graphql' = "graphql",
96
- 'snowflake' = "snowflake",
97
- 'datadog' = "datadog",
98
- 'newrelic' = "newrelic",
99
- 'auth0' = "auth0",
100
- 'jwt_rsa' = "jwt_rsa",
101
- 'jwt_hmac' = "jwt_hmac",
102
- 'algolia' = "algolia",
103
- 'elastic_observability' = "elastic_observability",
104
- 'elastic_search' = "elastic_search",
105
- 'elastic_enterprise_search' = "elastic_enterprise_search",
106
- 'sentry' = "sentry",
107
- 'sap_hana' = "sap_hana",
108
- 'salesforce_crm' = "salesforce_crm",
109
- 'documentdb' = "documentdb",
110
- 'dynamodb' = "dynamodb",
111
- 'cassandra' = "cassandra",
112
- 'clickhouse' = "clickhouse",
113
- 'alloydb' = "alloydb",
114
- 'spanner' = "spanner",
115
- 'db2' = "db2",
116
- 'mariadb' = "mariadb",
117
- 'oracledb' = "oracledb",
118
- 'redis' = "redis",
119
- 'xata' = "xata",
120
- 'azure_sql' = "azure_sql"
121
- }
122
- export interface IntegrationConfigTypes {
123
- [IntegrationType.built_in_db]: InternalIntegrationConfig;
124
- [IntegrationType.mongo]: MongoIntegrationConfig;
125
- [IntegrationType.mysql]: MySqlIntegrationConfig;
126
- [IntegrationType.mssql]: MssqlIntegrationConfig;
127
- [IntegrationType.postgres]: PostgresIntegrationConfig;
128
- [IntegrationType.cockroach]: CockroachIntegrationConfig;
129
- [IntegrationType.snowflake]: SnowflakeIntegrationConfig;
130
- [IntegrationType.api]: HttpApiIntegrationConfig;
131
- [IntegrationType.graphql]: GraphQLIntegrationConfig;
132
- [IntegrationType.datadog]: DatadogIntegrationConfig;
133
- [IntegrationType.newrelic]: NewRelicIntegrationConfig;
134
- [IntegrationType.auth0]: Auth0IntegrationConfig;
135
- [IntegrationType.jwt_rsa]: JwtRsaIntegrationConfig;
136
- [IntegrationType.jwt_hmac]: JwtHmacIntegrationConfig;
137
- }
138
- export declare const DatabaseIntegrationTypes: readonly [IntegrationType.built_in_db, IntegrationType.mongo, IntegrationType.mysql, IntegrationType.mssql, IntegrationType.postgres, IntegrationType.cockroach, IntegrationType.snowflake];
139
- export declare const ApiIntegrationTypes: readonly [IntegrationType.api, IntegrationType.graphql];
140
- export declare const ObservabilityIntegrationTypes: readonly [IntegrationType.datadog, IntegrationType.newrelic];
141
- export declare const AuthIntegrationTypes: readonly [IntegrationType.auth0, IntegrationType.jwt_rsa, IntegrationType.jwt_hmac];
142
- export type DatabaseIntegrationType = (typeof DatabaseIntegrationTypes)[number];
143
- export type DatabaseIntegrationConfig = IntegrationConfigTypes[DatabaseIntegrationType];
144
- export declare function isDataIntegrationType(type: IntegrationType): type is DatabaseIntegrationType;
145
- export declare function isDataIntegration(integration: any): integration is BaseDatabaseIntegrationConfig;
146
- export type ApiIntegrationType = (typeof ApiIntegrationTypes)[number];
147
- export type ApiIntegrationConfig = IntegrationConfigTypes[ApiIntegrationType];
148
- export type ObservabilityIntegrationType = (typeof ObservabilityIntegrationTypes)[number];
149
- export type ObservabilityIntegrationConfig = IntegrationConfigTypes[ObservabilityIntegrationType];
150
- export type AuthIntegrationType = (typeof AuthIntegrationTypes)[number];
151
- export type AuthIntegrationConfig = IntegrationConfigTypes[AuthIntegrationType];
152
- export declare function isAuthIntegrationType(type: IntegrationType): type is AuthIntegrationType;
153
- export declare function isAuthIntegration(integration: any): integration is AuthIntegrationConfig;
154
- export type IntegrationConfig = DatabaseIntegrationConfig | ApiIntegrationConfig | ObservabilityIntegrationConfig | AuthIntegrationConfig;
155
- type TableName = string;
156
- export interface IntegrationDataSchema {
157
- collections: Record<TableName, CollectionSchema>;
158
- }
159
- export interface IntegrationGraphQLSchema {
160
- introspection: IntrospectionQuery;
161
- }
162
- export interface IntegrationApiSchema {
163
- baseUrl: string;
164
- endpoints: IntegrationApiEndpoints;
165
- injectionSchema?: ApiInjectionSchema;
166
- }
167
- export type IntegrationApiEndpoints = Record<ApiEndpointId, ApiEndpoint>;
168
- export type IntegrationSchema = IntegrationDataSchema | IntegrationGraphQLSchema;
169
- interface BaseIntegrationConfig {
170
- id: IntegrationId;
171
- type: IntegrationType;
172
- creationDate: Date;
173
- updateDate: Date;
174
- }
175
- export interface DatadogIntegrationConfig extends BaseIntegrationConfig {
176
- type: IntegrationType.datadog;
177
- configuration: DatadogIntegrationConfiguration;
178
- }
179
- export interface NewRelicIntegrationConfig extends BaseIntegrationConfig {
180
- type: IntegrationType.newrelic;
181
- configuration: NewRelicIntegrationConfiguration;
182
- }
183
- export type DatadogRegion = 'us1' | 'us3' | 'us5' | 'eu1' | 'us1-fed';
184
- export declare const datadogRegionMap: Record<DatadogRegion, string>;
185
- export interface DatadogIntegrationConfiguration {
186
- apiKey: string;
187
- appKey: string;
188
- datadogRegion: DatadogRegion;
189
- }
190
- export type NewRelicRegion = 'worldwide' | 'eu';
191
- export declare const newRelicRegionMap: Record<NewRelicRegion, string>;
192
- export interface NewRelicIntegrationConfiguration {
193
- apiKey: string;
194
- newRelicRegion: NewRelicRegion;
195
- }
196
- export interface BaseDatabaseIntegrationConfig extends BaseIntegrationConfig {
197
- type: DatabaseIntegrationType;
198
- schema?: IntegrationDataSchema;
199
- supportsExternalChanges: boolean;
200
- }
201
- export type HttpMethod = 'post' | 'get' | 'delete' | 'patch' | 'put';
202
- export type ApiEndpointId = string;
203
- export type ApiParameterLocation = 'query' | 'body' | 'header' | 'path';
204
- export type ApiResponseParameterLocation = 'header' | 'body';
205
- export type ApiInjectionParameterLocation = 'header' | 'query';
206
- export type FieldPath = string;
207
- export interface ApiRequestField {
208
- location: ApiParameterLocation;
209
- }
210
- export interface ApiResponseField {
211
- location: ApiResponseParameterLocation;
212
- path?: FieldPath;
213
- }
214
- export type ApiInjectionFieldType = 'secret' | 'regular';
215
- export interface ApiInjectionField {
216
- value: string;
217
- type: ApiInjectionFieldType;
218
- location: ApiInjectionParameterLocation;
219
- }
220
- export interface ApiEndpoint {
221
- relativePath: string;
222
- method: HttpMethod;
223
- requestSchema?: Record<FieldName, ApiRequestField>;
224
- responseSchema?: Record<FieldPath, ApiResponseField>;
225
- injectionSchema?: ApiInjectionSchema;
226
- }
227
- export interface HttpApiIntegrationConfig extends BaseIntegrationConfig {
228
- type: IntegrationType.api;
229
- configuration?: {
230
- discoveryOptions: OpenApiDiscoveryOptions;
231
- };
232
- schema: IntegrationApiSchema;
233
- }
234
- export interface GraphQLIntegrationConfig extends BaseIntegrationConfig {
235
- type: IntegrationType.graphql;
236
- schema?: IntegrationGraphQLSchema;
237
- configuration: {
238
- connectionOptions: GraphQLConnectionOptions;
239
- };
240
- }
241
- export interface MySqlIntegrationConfiguration {
242
- connectionOptions: MySqlConnectionOptions;
243
- }
244
- export interface MssqlIntegrationConfiguration {
245
- connectionOptions: MssqlConnectionOptions;
246
- }
247
- export interface PostgresIntegrationConfiguration {
248
- connectionOptions: PostgresConnectionOptions;
249
- }
250
- export interface MongoIntegrationConfiguration {
251
- connectionOptions: MongoConnectionOptions;
252
- }
253
- export interface SnowflakeIntegrationConfiguration {
254
- connectionOptions: SnowflakeConnectionOptions;
255
- }
256
- export interface MySqlIntegrationConfig extends BaseDatabaseIntegrationConfig {
257
- type: IntegrationType.mysql;
258
- configuration: MySqlIntegrationConfiguration;
259
- schema: IntegrationDataSchema;
260
- }
261
- export interface MssqlIntegrationConfig extends BaseDatabaseIntegrationConfig {
262
- type: IntegrationType.mssql;
263
- configuration: MssqlIntegrationConfiguration;
264
- schema: IntegrationDataSchema;
265
- }
266
- export interface BasePostgresIntegration extends BaseDatabaseIntegrationConfig {
267
- type: IntegrationType.postgres | IntegrationType.cockroach;
268
- configuration: PostgresIntegrationConfiguration;
269
- schema: IntegrationDataSchema;
270
- }
271
- export interface PostgresIntegrationConfig extends BasePostgresIntegration {
272
- type: IntegrationType.postgres;
273
- }
274
- export interface CockroachIntegrationConfig extends BasePostgresIntegration {
275
- type: IntegrationType.cockroach;
276
- supportsExternalChanges: false;
277
- }
278
- export interface InternalIntegrationConfig extends BaseDatabaseIntegrationConfig {
279
- type: IntegrationType.built_in_db;
280
- }
281
- export interface MongoIntegrationConfig extends BaseDatabaseIntegrationConfig {
282
- type: IntegrationType.mongo;
283
- configuration: MongoIntegrationConfiguration;
284
- }
285
- export interface SnowflakeIntegrationConfig extends BaseDatabaseIntegrationConfig {
286
- type: IntegrationType.snowflake;
287
- configuration: SnowflakeIntegrationConfiguration;
288
- schema: IntegrationDataSchema;
289
- supportsExternalChanges: false;
290
- }
291
- export interface Auth0IntegrationConfig extends BaseIntegrationConfig {
292
- type: IntegrationType.auth0;
293
- configuration: {
294
- clientId: string;
295
- domain: string;
296
- };
297
- }
298
- export interface JwtRsaIntegrationConfig extends BaseIntegrationConfig {
299
- type: IntegrationType.jwt_rsa;
300
- configuration: {
301
- jwksUri: string;
302
- validations?: Validations;
303
- };
304
- }
305
- export interface JwtHmacIntegrationConfig extends BaseIntegrationConfig {
306
- type: IntegrationType.jwt_hmac;
307
- configuration: {
308
- verifyUri?: string;
309
- };
310
- }
311
- export interface TestDataConnectionResponse {
312
- success: boolean;
313
- errorMessage?: string;
314
- }
315
- interface TestMongoDataConnectionRequest {
316
- type: IntegrationType.mongo;
317
- configuration: {
318
- connectionOptions: MongoConnectionOptions;
319
- };
320
- }
321
- interface TestMysqlDataConnectionRequest {
322
- type: IntegrationType.mysql;
323
- configuration: {
324
- connectionOptions: MySqlConnectionOptions;
325
- };
326
- }
327
- interface TestMssqlDataConnectionRequest {
328
- type: IntegrationType.mssql;
329
- configuration: {
330
- connectionOptions: MssqlConnectionOptions;
331
- };
332
- }
333
- interface TestPostgresDataConnectionRequest {
334
- type: IntegrationType.postgres;
335
- configuration: {
336
- connectionOptions: PostgresConnectionOptions;
337
- };
338
- }
339
- interface TestSnowflakeDataConnectionRequest {
340
- type: IntegrationType.snowflake;
341
- configuration: {
342
- connectionOptions: SnowflakeConnectionOptions;
343
- };
344
- }
345
- interface TestCockroachDataConnectionRequest {
346
- type: IntegrationType.cockroach;
347
- configuration: {
348
- connectionOptions: PostgresConnectionOptions;
349
- };
350
- }
351
- export interface TestGraphQLDataConnectionRequest {
352
- type: IntegrationType.graphql;
353
- configuration: {
354
- connectionOptions: GraphQLConnectionOptions;
355
- };
356
- }
357
- export type TestDataConnectionRequest = TestMongoDataConnectionRequest | TestMysqlDataConnectionRequest | TestMssqlDataConnectionRequest | TestCockroachDataConnectionRequest | TestPostgresDataConnectionRequest | TestSnowflakeDataConnectionRequest;
358
- export type TestConnectionRequest = TestDataConnectionRequest | TestGraphQLDataConnectionRequest;
359
- export interface DiscoverDataConnectionSchemaResponse {
360
- schema: IntegrationDataSchema;
361
- }
362
- export interface DiscoverGraphQLConnectionSchemaResponse {
363
- schema: IntegrationGraphQLSchema;
364
- }
365
- export interface DiscoverOpenApiSchemaResponse {
366
- schema: IntegrationApiSchema;
367
- }
368
- interface DiscoverMongoDataConnectionSchemaRequest {
369
- integrationType: IntegrationType.mongo;
370
- connectionOptions: MongoConnectionOptions;
371
- }
372
- interface DiscoverInternalDataConnectionSchemaRequest {
373
- integrationType: IntegrationType.built_in_db;
374
- }
375
- interface DiscoverMysqlDataConnectionSchemaRequest {
376
- integrationType: IntegrationType.mysql;
377
- connectionOptions: MySqlConnectionOptions;
378
- }
379
- interface DiscoverMssqlDataConnectionSchemaRequest {
380
- integrationType: IntegrationType.mssql;
381
- connectionOptions: MssqlConnectionOptions;
382
- }
383
- interface DiscoverPostgresDataConnectionSchemaRequest {
384
- integrationType: IntegrationType.postgres;
385
- connectionOptions: PostgresConnectionOptions;
386
- }
387
- interface DiscoverSnowflakeDataConnectionSchemaRequest {
388
- integrationType: IntegrationType.snowflake;
389
- connectionOptions: SnowflakeConnectionOptions;
390
- }
391
- interface DiscoverCockroachDataConnectionSchemaRequest {
392
- integrationType: IntegrationType.cockroach;
393
- connectionOptions: PostgresConnectionOptions;
394
- }
395
- export type DiscoverDataConnectionSchemaRequest = DiscoverMongoDataConnectionSchemaRequest | DiscoverInternalDataConnectionSchemaRequest | DiscoverMysqlDataConnectionSchemaRequest | DiscoverMssqlDataConnectionSchemaRequest | DiscoverCockroachDataConnectionSchemaRequest | DiscoverPostgresDataConnectionSchemaRequest | DiscoverSnowflakeDataConnectionSchemaRequest;
396
- export interface DiscoverGraphQLConnectionSchemaRequest {
397
- integrationType: IntegrationType.graphql;
398
- connectionOptions: GraphQLConnectionOptions;
399
- }
400
- export interface DiscoverOpenApiSchemaRequest {
401
- integrationType: IntegrationType.api;
402
- discoveryOptions: OpenApiDiscoveryOptions;
403
- }
404
- export {};