@squidcloud/backend 1.0.316 → 1.0.317
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AiMutationType, AiResourceType } from '@squidcloud/client';
|
|
2
2
|
import { AiAgentId } from '@squidcloud/client';
|
|
3
3
|
/** A context provided to the security rules of an AI Chatbot mutation. */
|
|
4
4
|
export declare class AiChatbotMutationContext {
|
|
5
|
-
readonly type:
|
|
6
|
-
readonly resource:
|
|
5
|
+
readonly type: AiMutationType;
|
|
6
|
+
readonly resource: AiResourceType;
|
|
7
7
|
readonly profileId: AiAgentId;
|
|
8
8
|
readonly payload: any;
|
|
9
9
|
}
|
|
@@ -12,7 +12,7 @@ import { GraphqlContext } from './graphql.public-context';
|
|
|
12
12
|
import { AiChatbotMutationContext, AiFunctionContext } from './ai-chatbot.public-context';
|
|
13
13
|
import { StorageContext } from '@squidcloud/client';
|
|
14
14
|
import { NativeQueryContext } from './native-query.public-context';
|
|
15
|
-
import {
|
|
15
|
+
import { AiAgentChatContext } from '@squidcloud/client';
|
|
16
16
|
import { SecureMetricContext } from './metric.public-context';
|
|
17
17
|
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
18
|
export type SecureStorageAction<T extends StorageActionType> = T extends 'all' ? () => boolean | Promise<boolean> : (context: StorageContext) => boolean | Promise<boolean>;
|
|
@@ -22,7 +22,7 @@ export type SecureApiAction = ((context: ApiCallContext) => boolean | Promise<bo
|
|
|
22
22
|
export type SecureNativeQueryAction = ((context: NativeQueryContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
23
23
|
export type SecureDistributedLockAction = ((context: DistributedLockContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
24
24
|
export type SecureGraphQLAction = ((context: GraphqlContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
25
|
-
export type SecureAiChatbotAction<T extends AiChatbotActionType> = T extends 'all' ? () => boolean | Promise<boolean> : T extends 'chat' ? ((context:
|
|
25
|
+
export type SecureAiChatbotAction<T extends AiChatbotActionType> = T extends 'all' ? () => boolean | Promise<boolean> : T extends 'chat' ? ((context: AiAgentChatContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>) : ((context: AiChatbotMutationContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
26
26
|
export type ClientConnectionStateChangeAction = (clientId: ClientId, clientConnectionState: ClientConnectionState) => Promise<void> | void;
|
|
27
27
|
export type ExecutableAction = (...args: any[]) => any;
|
|
28
28
|
export type AiFunctionAction<T extends Record<string, any> = any> = (params: T, context: AiFunctionContext<any, any>) => any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squidcloud/backend",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.317",
|
|
4
4
|
"description": "Squid Cloud's backend SDK",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/backend/src/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"graphql": "^16.9.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@squidcloud/client": "^1.0.
|
|
29
|
+
"@squidcloud/client": "^1.0.317"
|
|
30
30
|
},
|
|
31
31
|
"engines": {
|
|
32
32
|
"node": ">=20.0.0"
|