@squidcloud/backend 1.0.352 → 1.0.354

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.
@@ -10,7 +10,7 @@ import { GraphqlContext } from './graphql.public-context';
10
10
  import { NativeQueryContext } from './native-query.public-context';
11
11
  import { SecureMetricContext } from './metric.public-context';
12
12
  import { DatabaseActionType, MetricActionType, StorageActionType, TopicActionType } from './bundle-data.public-types';
13
- import { StorageContext } from './storage.types';
13
+ import { StorageContext } from './storage.public-types';
14
14
  import { AiFunctionContext, SecureAiAgentContext } from './ai-agent.public-context';
15
15
  /**
16
16
  * @category Database
@@ -34,9 +34,27 @@ export interface MongoNativeQueryContext extends BaseNativeQueryContext {
34
34
  /** Array of aggregation pipeline stages. */
35
35
  aggregationPipeline: Array<any | undefined>;
36
36
  }
37
+ /**
38
+ * Context for executing an Elasticsearch query.
39
+ * @category Database
40
+ */
41
+ export interface ElasticsearchNativeQueryContext {
42
+ /** Specifies that the query is for an Elasticsearch database. */
43
+ type: 'elasticsearch';
44
+ /** Elasticsearch index to query. */
45
+ index: string;
46
+ /** Elasticsearch query string. */
47
+ endpoint?: string;
48
+ /** HTTP method to use for the request. */
49
+ method?: 'GET' | 'POST';
50
+ /** Body of the request. */
51
+ body: Record<string, any>;
52
+ /** Headers to include in the request. */
53
+ integrationId: IntegrationId;
54
+ }
37
55
  /**
38
56
  * Union type representing either a relational or MongoDB native query context.
39
57
  * @category Database
40
58
  */
41
- export type NativeQueryContext = RelationalNativeQueryContext | MongoNativeQueryContext;
59
+ export type NativeQueryContext = RelationalNativeQueryContext | MongoNativeQueryContext | ElasticsearchNativeQueryContext;
42
60
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/backend",
3
- "version": "1.0.352",
3
+ "version": "1.0.354",
4
4
  "description": "Squid Cloud's backend SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/backend/src/index.d.ts",
@@ -33,7 +33,7 @@
33
33
  "typedoc-plugin-markdown": "^4.5.2"
34
34
  },
35
35
  "peerDependencies": {
36
- "@squidcloud/client": "^1.0.352"
36
+ "@squidcloud/client": "^1.0.354"
37
37
  },
38
38
  "engines": {
39
39
  "node": ">=20.0.0"