@squidcloud/local-backend 1.0.56 → 1.0.58
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/common/src/ai-assistant.context.d.ts +13 -13
- package/dist/common/src/ai-assistant.context.js +19 -19
- package/dist/common/src/ai-assistant.schemas.d.ts +243 -243
- package/dist/common/src/ai-assistant.schemas.js +210 -210
- package/dist/common/src/ai-assistant.types.d.ts +90 -90
- package/dist/common/src/ai-assistant.types.js +11 -11
- package/dist/common/src/api-call.context.d.ts +13 -13
- package/dist/common/src/api-call.context.js +16 -16
- package/dist/common/src/api.types.d.ts +23 -23
- package/dist/common/src/api.types.js +2 -2
- package/dist/common/src/application.schemas.d.ts +1168 -1168
- package/dist/common/src/application.schemas.js +741 -741
- package/dist/common/src/application.types.d.ts +228 -228
- package/dist/common/src/application.types.js +89 -89
- package/dist/common/src/backend-function.schemas.d.ts +3 -3
- package/dist/common/src/backend-function.schemas.js +12 -12
- package/dist/common/src/backend-function.types.d.ts +6 -6
- package/dist/common/src/backend-function.types.js +2 -2
- package/dist/common/src/backend-run.types.d.ts +54 -54
- package/dist/common/src/backend-run.types.js +96 -96
- package/dist/common/src/bundle-api.types.d.ts +63 -63
- package/dist/common/src/bundle-api.types.js +2 -2
- package/dist/common/src/bundle-data.types.d.ts +59 -59
- package/dist/common/src/bundle-data.types.js +2 -2
- package/dist/common/src/communication.types.d.ts +18 -18
- package/dist/common/src/communication.types.js +40 -40
- package/dist/common/src/context.types.d.ts +24 -24
- package/dist/common/src/context.types.js +2 -2
- package/dist/common/src/distributed-lock.context.d.ts +5 -5
- package/dist/common/src/distributed-lock.context.js +10 -10
- package/dist/common/src/document.types.d.ts +32 -32
- package/dist/common/src/document.types.js +50 -50
- package/dist/common/src/graphql.context.d.ts +14 -14
- package/dist/common/src/graphql.context.js +12 -12
- package/dist/common/src/graphql.types.d.ts +11 -11
- package/dist/common/src/graphql.types.js +34 -34
- package/dist/common/src/heartbeat.types.d.ts +4 -4
- package/dist/common/src/heartbeat.types.js +16 -16
- package/dist/common/src/http-status.enum.d.ts +50 -50
- package/dist/common/src/http-status.enum.js +54 -54
- package/dist/common/src/index.d.ts +53 -53
- package/dist/common/src/index.js +69 -69
- package/dist/common/src/integrations/ai_assistant.types.d.ts +30 -30
- package/dist/common/src/integrations/ai_assistant.types.js +2 -2
- package/dist/common/src/integrations/api.types.d.ts +80 -80
- package/dist/common/src/integrations/api.types.js +2 -2
- package/dist/common/src/integrations/auth.types.d.ts +39 -39
- package/dist/common/src/integrations/auth.types.js +2 -2
- package/dist/common/src/integrations/database.types.d.ts +236 -236
- package/dist/common/src/integrations/database.types.js +2 -2
- package/dist/common/src/integrations/index.d.ts +101 -101
- package/dist/common/src/integrations/index.js +105 -105
- package/dist/common/src/integrations/observability.types.d.ts +23 -23
- package/dist/common/src/integrations/observability.types.js +23 -23
- package/dist/common/src/logger.types.d.ts +21 -21
- package/dist/common/src/logger.types.js +11 -11
- package/dist/common/src/metrics.types.d.ts +73 -73
- package/dist/common/src/metrics.types.js +11 -11
- package/dist/common/src/mutation.context.d.ts +13 -13
- package/dist/common/src/mutation.context.js +26 -26
- package/dist/common/src/mutation.schemas.d.ts +5 -5
- package/dist/common/src/mutation.schemas.js +114 -114
- package/dist/common/src/mutation.types.d.ts +63 -63
- package/dist/common/src/mutation.types.js +142 -142
- package/dist/common/src/named-query.context.d.ts +4 -4
- package/dist/common/src/named-query.context.js +9 -9
- package/dist/common/src/named-query.schemas.d.ts +3 -3
- package/dist/common/src/named-query.schemas.js +13 -13
- package/dist/common/src/named-query.types.d.ts +8 -8
- package/dist/common/src/named-query.types.js +2 -2
- package/dist/common/src/query/base-query-builder.d.ts +66 -65
- package/dist/common/src/query/base-query-builder.js +294 -294
- package/dist/common/src/query/base-query-builder.js.map +1 -1
- package/dist/common/src/query/index.d.ts +3 -3
- package/dist/common/src/query/index.js +19 -19
- package/dist/common/src/query/query-context.d.ts +47 -47
- package/dist/common/src/query/query-context.js +159 -159
- package/dist/common/src/query/serialized-query.types.d.ts +24 -24
- package/dist/common/src/query/serialized-query.types.js +2 -2
- package/dist/common/src/query.types.d.ts +81 -81
- package/dist/common/src/query.types.js +153 -153
- package/dist/common/src/regions.d.ts +21 -21
- package/dist/common/src/regions.js +46 -46
- package/dist/common/src/schema/schema.types.d.ts +30 -30
- package/dist/common/src/schema/schema.types.js +172 -172
- package/dist/common/src/secret.schemas.d.ts +6 -6
- package/dist/common/src/secret.schemas.js +32 -32
- package/dist/common/src/secret.types.d.ts +49 -49
- package/dist/common/src/secret.types.js +5 -5
- package/dist/common/src/security.types.d.ts +3 -3
- package/dist/common/src/security.types.js +2 -2
- package/dist/common/src/socket.schemas.d.ts +3 -3
- package/dist/common/src/socket.schemas.js +58 -58
- package/dist/common/src/socket.types.d.ts +108 -108
- package/dist/common/src/socket.types.js +2 -2
- package/dist/common/src/time-units.d.ts +5 -5
- package/dist/common/src/time-units.js +8 -8
- package/dist/common/src/trigger.types.d.ts +15 -15
- package/dist/common/src/trigger.types.js +2 -2
- package/dist/common/src/types.d.ts +21 -21
- package/dist/common/src/types.js +2 -2
- package/dist/common/src/utils/array.d.ts +8 -8
- package/dist/common/src/utils/array.js +51 -51
- package/dist/common/src/utils/assert.d.ts +8 -8
- package/dist/common/src/utils/assert.js +49 -49
- package/dist/common/src/utils/error.d.ts +4 -4
- package/dist/common/src/utils/error.js +10 -10
- package/dist/common/src/utils/http.d.ts +2 -2
- package/dist/common/src/utils/http.js +40 -40
- package/dist/common/src/utils/id.d.ts +2 -2
- package/dist/common/src/utils/id.js +21 -21
- package/dist/common/src/utils/lock.manager.d.ts +9 -9
- package/dist/common/src/utils/lock.manager.js +39 -39
- package/dist/common/src/utils/nullish.d.ts +2 -2
- package/dist/common/src/utils/nullish.js +11 -11
- package/dist/common/src/utils/object.d.ts +5 -5
- package/dist/common/src/utils/object.js +75 -75
- package/dist/common/src/utils/serialization.d.ts +6 -6
- package/dist/common/src/utils/serialization.js +77 -77
- package/dist/common/src/utils/transforms.d.ts +18 -18
- package/dist/common/src/utils/transforms.js +92 -92
- package/dist/common/src/utils/url.d.ts +1 -1
- package/dist/common/src/utils/url.js +15 -15
- package/dist/common/src/utils/validation.d.ts +17 -17
- package/dist/common/src/utils/validation.js +209 -209
- package/dist/common/src/webhook-response.d.ts +6 -6
- package/dist/common/src/webhook-response.js +2 -2
- package/dist/internal-common/src/async-queue.d.ts +4 -4
- package/dist/internal-common/src/async-queue.js +17 -17
- package/dist/internal-common/src/code-executor.types.d.ts +13 -13
- package/dist/internal-common/src/code-executor.types.js +2 -2
- package/dist/internal-common/src/environment/environment.types.d.ts +74 -74
- package/dist/internal-common/src/environment/environment.types.js +2 -2
- package/dist/internal-common/src/environment/index.d.ts +6 -6
- package/dist/internal-common/src/environment/index.js +27 -27
- package/dist/internal-common/src/environment/local.environment.d.ts +2 -2
- package/dist/internal-common/src/environment/local.environment.js +62 -62
- package/dist/internal-common/src/filters/custom-exception.filter.d.ts +6 -6
- package/dist/internal-common/src/filters/custom-exception.filter.js +44 -44
- package/dist/internal-common/src/index.d.ts +14 -14
- package/dist/internal-common/src/index.js +32 -32
- package/dist/internal-common/src/interceptors/body.interceptor.d.ts +5 -5
- package/dist/internal-common/src/interceptors/body.interceptor.js +24 -24
- package/dist/internal-common/src/kafka/kafka.manager.d.ts +22 -22
- package/dist/internal-common/src/kafka/kafka.manager.js +129 -129
- package/dist/internal-common/src/kafka/kafka.types.d.ts +17 -17
- package/dist/internal-common/src/kafka/kafka.types.js +2 -2
- package/dist/internal-common/src/kafka-observability-publisher.d.ts +11 -11
- package/dist/internal-common/src/kafka-observability-publisher.js +20 -20
- package/dist/internal-common/src/local-dev.types.d.ts +31 -31
- package/dist/internal-common/src/local-dev.types.js +2 -2
- package/dist/internal-common/src/observability-publisher.d.ts +9 -9
- package/dist/internal-common/src/observability-publisher.js +58 -58
- package/dist/internal-common/src/observability.types.d.ts +17 -17
- package/dist/internal-common/src/observability.types.js +2 -2
- package/dist/internal-common/src/shutdown.manager.d.ts +20 -20
- package/dist/internal-common/src/shutdown.manager.js +75 -75
- package/dist/internal-common/src/utils.d.ts +5 -5
- package/dist/internal-common/src/utils.js +29 -29
- package/dist/local-backend/src/index.d.ts +4 -4
- package/dist/local-backend/src/index.js +20 -20
- package/dist/local-backend/src/local-backend-socket.service.d.ts +18 -18
- package/dist/local-backend/src/local-backend-socket.service.js +107 -107
- package/dist/local-backend/src/local-backend.app.d.ts +2 -2
- package/dist/local-backend/src/local-backend.app.js +19 -19
- package/dist/local-backend/src/local-backend.controller.d.ts +8 -8
- package/dist/local-backend/src/local-backend.controller.js +49 -49
- package/dist/local-backend/src/local-backend.module.d.ts +8 -8
- package/dist/local-backend/src/local-backend.module.js +53 -53
- package/dist/local-backend/src/local-backend.service.d.ts +15 -15
- package/dist/local-backend/src/local-backend.service.js +165 -165
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,211 +1,211 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AiAssistantMutateRequestSchema = exports.AiAssistantChatRequestSchema = void 0;
|
|
4
|
-
exports.AiAssistantChatRequestSchema = {
|
|
5
|
-
type: 'object',
|
|
6
|
-
properties: {
|
|
7
|
-
profileId: {
|
|
8
|
-
type: 'string',
|
|
9
|
-
},
|
|
10
|
-
integrationId: {
|
|
11
|
-
type: 'string',
|
|
12
|
-
},
|
|
13
|
-
clientRequestId: {
|
|
14
|
-
type: 'string',
|
|
15
|
-
},
|
|
16
|
-
prompt: {
|
|
17
|
-
type: 'string',
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
required: ['profileId', 'integrationId', 'clientRequestId', 'prompt'],
|
|
21
|
-
};
|
|
22
|
-
const AiAssistantContext = {
|
|
23
|
-
anyOf: [
|
|
24
|
-
{
|
|
25
|
-
type: 'object',
|
|
26
|
-
properties: {
|
|
27
|
-
type: { const: 'text' },
|
|
28
|
-
data: { type: 'string' },
|
|
29
|
-
},
|
|
30
|
-
required: ['type', 'data'],
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
type: 'object',
|
|
34
|
-
properties: {
|
|
35
|
-
type: { const: 'url' },
|
|
36
|
-
data: { type: 'string' },
|
|
37
|
-
},
|
|
38
|
-
required: ['type', 'data'],
|
|
39
|
-
},
|
|
40
|
-
],
|
|
41
|
-
};
|
|
42
|
-
exports.AiAssistantMutateRequestSchema = {
|
|
43
|
-
type: 'object',
|
|
44
|
-
properties: {
|
|
45
|
-
profileId: {
|
|
46
|
-
type: 'string',
|
|
47
|
-
},
|
|
48
|
-
integrationId: {
|
|
49
|
-
type: 'string',
|
|
50
|
-
},
|
|
51
|
-
type: {
|
|
52
|
-
type: 'string',
|
|
53
|
-
enum: ['insert', 'update', 'delete'],
|
|
54
|
-
},
|
|
55
|
-
resource: {
|
|
56
|
-
type: 'string',
|
|
57
|
-
enum: ['instruction', 'context', 'profile'],
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
required: ['profileId', 'integrationId', 'type', 'resource'],
|
|
61
|
-
oneOf: [
|
|
62
|
-
{
|
|
63
|
-
properties: {
|
|
64
|
-
type: { const: 'insert' },
|
|
65
|
-
resource: { const: 'profile' },
|
|
66
|
-
payload: {
|
|
67
|
-
type: 'object',
|
|
68
|
-
properties: {
|
|
69
|
-
modelName: {
|
|
70
|
-
type: 'string',
|
|
71
|
-
enum: ['gpt-3.5-turbo', 'gpt-4'],
|
|
72
|
-
},
|
|
73
|
-
strictContext: {
|
|
74
|
-
type: 'boolean',
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
required: ['modelName', 'strictContext'],
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
properties: {
|
|
83
|
-
type: { const: 'insert' },
|
|
84
|
-
resource: { const: 'instruction' },
|
|
85
|
-
payload: {
|
|
86
|
-
type: 'object',
|
|
87
|
-
properties: {
|
|
88
|
-
id: {
|
|
89
|
-
type: 'string',
|
|
90
|
-
},
|
|
91
|
-
instruction: {
|
|
92
|
-
type: 'string',
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
required: ['id', 'instruction'],
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
type: 'object',
|
|
101
|
-
properties: {
|
|
102
|
-
type: { const: 'insert' },
|
|
103
|
-
resource: { const: 'context' },
|
|
104
|
-
payload: {
|
|
105
|
-
type: 'object',
|
|
106
|
-
properties: {
|
|
107
|
-
id: { type: 'string' },
|
|
108
|
-
title: { type: 'string' },
|
|
109
|
-
context: AiAssistantContext,
|
|
110
|
-
},
|
|
111
|
-
required: ['id', 'title', 'context'],
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
required: ['type', 'resource', 'payload'],
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
properties: {
|
|
118
|
-
type: { const: 'update' },
|
|
119
|
-
resource: { const: 'profile' },
|
|
120
|
-
payload: {
|
|
121
|
-
type: 'object',
|
|
122
|
-
properties: {
|
|
123
|
-
modelName: {
|
|
124
|
-
type: 'string',
|
|
125
|
-
enum: ['gpt-3.5-turbo', 'gpt-4'],
|
|
126
|
-
},
|
|
127
|
-
strictContext: {
|
|
128
|
-
type: 'boolean',
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
properties: {
|
|
136
|
-
type: { const: 'update' },
|
|
137
|
-
resource: { const: 'instruction' },
|
|
138
|
-
payload: {
|
|
139
|
-
type: 'object',
|
|
140
|
-
properties: {
|
|
141
|
-
id: {
|
|
142
|
-
type: 'string',
|
|
143
|
-
},
|
|
144
|
-
instruction: {
|
|
145
|
-
type: 'string',
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
required: ['id', 'instruction'],
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
properties: {
|
|
154
|
-
type: { const: 'update' },
|
|
155
|
-
resource: { const: 'context' },
|
|
156
|
-
payload: {
|
|
157
|
-
type: 'object',
|
|
158
|
-
properties: {
|
|
159
|
-
id: {
|
|
160
|
-
type: 'string',
|
|
161
|
-
},
|
|
162
|
-
title: {
|
|
163
|
-
type: 'string',
|
|
164
|
-
},
|
|
165
|
-
context: AiAssistantContext,
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
properties: {
|
|
172
|
-
type: { const: 'delete' },
|
|
173
|
-
resource: { const: 'instruction' },
|
|
174
|
-
payload: {
|
|
175
|
-
type: 'object',
|
|
176
|
-
properties: {
|
|
177
|
-
id: {
|
|
178
|
-
type: 'string',
|
|
179
|
-
},
|
|
180
|
-
},
|
|
181
|
-
required: ['id'],
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
properties: {
|
|
187
|
-
type: { const: 'delete' },
|
|
188
|
-
resource: { const: 'context' },
|
|
189
|
-
payload: {
|
|
190
|
-
type: 'object',
|
|
191
|
-
properties: {
|
|
192
|
-
id: {
|
|
193
|
-
type: 'string',
|
|
194
|
-
},
|
|
195
|
-
},
|
|
196
|
-
required: ['id'],
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
properties: {
|
|
202
|
-
type: { const: 'delete' },
|
|
203
|
-
resource: { const: 'profile' },
|
|
204
|
-
payload: {
|
|
205
|
-
type: 'object',
|
|
206
|
-
},
|
|
207
|
-
},
|
|
208
|
-
},
|
|
209
|
-
],
|
|
210
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AiAssistantMutateRequestSchema = exports.AiAssistantChatRequestSchema = void 0;
|
|
4
|
+
exports.AiAssistantChatRequestSchema = {
|
|
5
|
+
type: 'object',
|
|
6
|
+
properties: {
|
|
7
|
+
profileId: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
},
|
|
10
|
+
integrationId: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
},
|
|
13
|
+
clientRequestId: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
},
|
|
16
|
+
prompt: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
required: ['profileId', 'integrationId', 'clientRequestId', 'prompt'],
|
|
21
|
+
};
|
|
22
|
+
const AiAssistantContext = {
|
|
23
|
+
anyOf: [
|
|
24
|
+
{
|
|
25
|
+
type: 'object',
|
|
26
|
+
properties: {
|
|
27
|
+
type: { const: 'text' },
|
|
28
|
+
data: { type: 'string' },
|
|
29
|
+
},
|
|
30
|
+
required: ['type', 'data'],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
type: 'object',
|
|
34
|
+
properties: {
|
|
35
|
+
type: { const: 'url' },
|
|
36
|
+
data: { type: 'string' },
|
|
37
|
+
},
|
|
38
|
+
required: ['type', 'data'],
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
};
|
|
42
|
+
exports.AiAssistantMutateRequestSchema = {
|
|
43
|
+
type: 'object',
|
|
44
|
+
properties: {
|
|
45
|
+
profileId: {
|
|
46
|
+
type: 'string',
|
|
47
|
+
},
|
|
48
|
+
integrationId: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
},
|
|
51
|
+
type: {
|
|
52
|
+
type: 'string',
|
|
53
|
+
enum: ['insert', 'update', 'delete'],
|
|
54
|
+
},
|
|
55
|
+
resource: {
|
|
56
|
+
type: 'string',
|
|
57
|
+
enum: ['instruction', 'context', 'profile'],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
required: ['profileId', 'integrationId', 'type', 'resource'],
|
|
61
|
+
oneOf: [
|
|
62
|
+
{
|
|
63
|
+
properties: {
|
|
64
|
+
type: { const: 'insert' },
|
|
65
|
+
resource: { const: 'profile' },
|
|
66
|
+
payload: {
|
|
67
|
+
type: 'object',
|
|
68
|
+
properties: {
|
|
69
|
+
modelName: {
|
|
70
|
+
type: 'string',
|
|
71
|
+
enum: ['gpt-3.5-turbo', 'gpt-4'],
|
|
72
|
+
},
|
|
73
|
+
strictContext: {
|
|
74
|
+
type: 'boolean',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
required: ['modelName', 'strictContext'],
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
properties: {
|
|
83
|
+
type: { const: 'insert' },
|
|
84
|
+
resource: { const: 'instruction' },
|
|
85
|
+
payload: {
|
|
86
|
+
type: 'object',
|
|
87
|
+
properties: {
|
|
88
|
+
id: {
|
|
89
|
+
type: 'string',
|
|
90
|
+
},
|
|
91
|
+
instruction: {
|
|
92
|
+
type: 'string',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
required: ['id', 'instruction'],
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
type: 'object',
|
|
101
|
+
properties: {
|
|
102
|
+
type: { const: 'insert' },
|
|
103
|
+
resource: { const: 'context' },
|
|
104
|
+
payload: {
|
|
105
|
+
type: 'object',
|
|
106
|
+
properties: {
|
|
107
|
+
id: { type: 'string' },
|
|
108
|
+
title: { type: 'string' },
|
|
109
|
+
context: AiAssistantContext,
|
|
110
|
+
},
|
|
111
|
+
required: ['id', 'title', 'context'],
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
required: ['type', 'resource', 'payload'],
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
properties: {
|
|
118
|
+
type: { const: 'update' },
|
|
119
|
+
resource: { const: 'profile' },
|
|
120
|
+
payload: {
|
|
121
|
+
type: 'object',
|
|
122
|
+
properties: {
|
|
123
|
+
modelName: {
|
|
124
|
+
type: 'string',
|
|
125
|
+
enum: ['gpt-3.5-turbo', 'gpt-4'],
|
|
126
|
+
},
|
|
127
|
+
strictContext: {
|
|
128
|
+
type: 'boolean',
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
properties: {
|
|
136
|
+
type: { const: 'update' },
|
|
137
|
+
resource: { const: 'instruction' },
|
|
138
|
+
payload: {
|
|
139
|
+
type: 'object',
|
|
140
|
+
properties: {
|
|
141
|
+
id: {
|
|
142
|
+
type: 'string',
|
|
143
|
+
},
|
|
144
|
+
instruction: {
|
|
145
|
+
type: 'string',
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
required: ['id', 'instruction'],
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
properties: {
|
|
154
|
+
type: { const: 'update' },
|
|
155
|
+
resource: { const: 'context' },
|
|
156
|
+
payload: {
|
|
157
|
+
type: 'object',
|
|
158
|
+
properties: {
|
|
159
|
+
id: {
|
|
160
|
+
type: 'string',
|
|
161
|
+
},
|
|
162
|
+
title: {
|
|
163
|
+
type: 'string',
|
|
164
|
+
},
|
|
165
|
+
context: AiAssistantContext,
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
properties: {
|
|
172
|
+
type: { const: 'delete' },
|
|
173
|
+
resource: { const: 'instruction' },
|
|
174
|
+
payload: {
|
|
175
|
+
type: 'object',
|
|
176
|
+
properties: {
|
|
177
|
+
id: {
|
|
178
|
+
type: 'string',
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
required: ['id'],
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
properties: {
|
|
187
|
+
type: { const: 'delete' },
|
|
188
|
+
resource: { const: 'context' },
|
|
189
|
+
payload: {
|
|
190
|
+
type: 'object',
|
|
191
|
+
properties: {
|
|
192
|
+
id: {
|
|
193
|
+
type: 'string',
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
required: ['id'],
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
properties: {
|
|
202
|
+
type: { const: 'delete' },
|
|
203
|
+
resource: { const: 'profile' },
|
|
204
|
+
payload: {
|
|
205
|
+
type: 'object',
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
],
|
|
210
|
+
};
|
|
211
211
|
//# sourceMappingURL=ai-assistant.schemas.js.map
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
import { ClientRequestId, IntegrationId } from './communication.types';
|
|
2
|
-
export type OpenAiModelName = 'gpt-3.5-turbo' | 'gpt-4';
|
|
3
|
-
type ModelDataType = {
|
|
4
|
-
tokens: number;
|
|
5
|
-
};
|
|
6
|
-
export declare const OpenAiModelData: Record<OpenAiModelName, ModelDataType>;
|
|
7
|
-
export interface BaseAiAssistantRequest {
|
|
8
|
-
profileId: string;
|
|
9
|
-
integrationId: IntegrationId;
|
|
10
|
-
}
|
|
11
|
-
export interface AiAssistantChatRequest extends BaseAiAssistantRequest {
|
|
12
|
-
clientRequestId: ClientRequestId;
|
|
13
|
-
prompt: string;
|
|
14
|
-
}
|
|
15
|
-
export interface BaseAiAssistantMutateRequest extends BaseAiAssistantRequest {
|
|
16
|
-
type: AiAssistantMutationType;
|
|
17
|
-
resource: AiAssistantResourceType;
|
|
18
|
-
}
|
|
19
|
-
export interface AiAssistantInsertProfileRequest extends BaseAiAssistantMutateRequest {
|
|
20
|
-
type: 'insert';
|
|
21
|
-
resource: 'profile';
|
|
22
|
-
payload: {
|
|
23
|
-
modelName: OpenAiModelName;
|
|
24
|
-
strictContext: boolean;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
export interface AiAssistantInsertInstructionRequest extends BaseAiAssistantMutateRequest {
|
|
28
|
-
type: 'insert';
|
|
29
|
-
resource: 'instruction';
|
|
30
|
-
payload: {
|
|
31
|
-
id: string;
|
|
32
|
-
instruction: string;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
export type AiAssistantContextType = 'text' | 'url';
|
|
36
|
-
export interface AiAssistantTextContext {
|
|
37
|
-
type: 'text';
|
|
38
|
-
data: string;
|
|
39
|
-
}
|
|
40
|
-
export interface AiAssistantUrlContext {
|
|
41
|
-
type: 'url';
|
|
42
|
-
data: string;
|
|
43
|
-
}
|
|
44
|
-
export type AiAssistantContext = AiAssistantTextContext | AiAssistantUrlContext;
|
|
45
|
-
export interface AiAssistantInsertContextRequest extends BaseAiAssistantMutateRequest {
|
|
46
|
-
type: 'insert';
|
|
47
|
-
resource: 'context';
|
|
48
|
-
payload: {
|
|
49
|
-
id: string;
|
|
50
|
-
title: string;
|
|
51
|
-
context: AiAssistantContext;
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
export interface AiAssistantUpdateProfileRequest extends BaseAiAssistantMutateRequest {
|
|
55
|
-
type: 'update';
|
|
56
|
-
resource: 'profile';
|
|
57
|
-
payload: {
|
|
58
|
-
modelName?: OpenAiModelName;
|
|
59
|
-
strictContext?: boolean;
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
export interface AiAssistantUpdateInstructionRequest extends BaseAiAssistantMutateRequest {
|
|
63
|
-
type: 'update';
|
|
64
|
-
resource: 'instruction';
|
|
65
|
-
payload: {
|
|
66
|
-
id: string;
|
|
67
|
-
instruction: string;
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
export interface AiAssistantUpdateContextRequest extends BaseAiAssistantMutateRequest {
|
|
71
|
-
type: 'update';
|
|
72
|
-
resource: 'context';
|
|
73
|
-
payload: {
|
|
74
|
-
id: string;
|
|
75
|
-
title?: string;
|
|
76
|
-
context?: AiAssistantContext;
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
export interface AiAssistantDeleteRequest extends BaseAiAssistantMutateRequest {
|
|
80
|
-
type: 'delete';
|
|
81
|
-
payload: {
|
|
82
|
-
id?: string;
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
export type AiAssistantInsertRequest = AiAssistantInsertProfileRequest | AiAssistantInsertInstructionRequest | AiAssistantInsertContextRequest;
|
|
86
|
-
export type AiAssistantUpdateRequest = AiAssistantUpdateProfileRequest | AiAssistantUpdateInstructionRequest | AiAssistantUpdateContextRequest;
|
|
87
|
-
export type AiAssistantMutateRequest = AiAssistantInsertRequest | AiAssistantUpdateRequest | AiAssistantDeleteRequest;
|
|
88
|
-
export type AiAssistantResourceType = 'instruction' | 'context' | 'profile';
|
|
89
|
-
export type AiAssistantMutationType = 'insert' | 'update' | 'delete';
|
|
90
|
-
export {};
|
|
1
|
+
import { ClientRequestId, IntegrationId } from './communication.types';
|
|
2
|
+
export type OpenAiModelName = 'gpt-3.5-turbo' | 'gpt-4';
|
|
3
|
+
type ModelDataType = {
|
|
4
|
+
tokens: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const OpenAiModelData: Record<OpenAiModelName, ModelDataType>;
|
|
7
|
+
export interface BaseAiAssistantRequest {
|
|
8
|
+
profileId: string;
|
|
9
|
+
integrationId: IntegrationId;
|
|
10
|
+
}
|
|
11
|
+
export interface AiAssistantChatRequest extends BaseAiAssistantRequest {
|
|
12
|
+
clientRequestId: ClientRequestId;
|
|
13
|
+
prompt: string;
|
|
14
|
+
}
|
|
15
|
+
export interface BaseAiAssistantMutateRequest extends BaseAiAssistantRequest {
|
|
16
|
+
type: AiAssistantMutationType;
|
|
17
|
+
resource: AiAssistantResourceType;
|
|
18
|
+
}
|
|
19
|
+
export interface AiAssistantInsertProfileRequest extends BaseAiAssistantMutateRequest {
|
|
20
|
+
type: 'insert';
|
|
21
|
+
resource: 'profile';
|
|
22
|
+
payload: {
|
|
23
|
+
modelName: OpenAiModelName;
|
|
24
|
+
strictContext: boolean;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface AiAssistantInsertInstructionRequest extends BaseAiAssistantMutateRequest {
|
|
28
|
+
type: 'insert';
|
|
29
|
+
resource: 'instruction';
|
|
30
|
+
payload: {
|
|
31
|
+
id: string;
|
|
32
|
+
instruction: string;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export type AiAssistantContextType = 'text' | 'url';
|
|
36
|
+
export interface AiAssistantTextContext {
|
|
37
|
+
type: 'text';
|
|
38
|
+
data: string;
|
|
39
|
+
}
|
|
40
|
+
export interface AiAssistantUrlContext {
|
|
41
|
+
type: 'url';
|
|
42
|
+
data: string;
|
|
43
|
+
}
|
|
44
|
+
export type AiAssistantContext = AiAssistantTextContext | AiAssistantUrlContext;
|
|
45
|
+
export interface AiAssistantInsertContextRequest extends BaseAiAssistantMutateRequest {
|
|
46
|
+
type: 'insert';
|
|
47
|
+
resource: 'context';
|
|
48
|
+
payload: {
|
|
49
|
+
id: string;
|
|
50
|
+
title: string;
|
|
51
|
+
context: AiAssistantContext;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export interface AiAssistantUpdateProfileRequest extends BaseAiAssistantMutateRequest {
|
|
55
|
+
type: 'update';
|
|
56
|
+
resource: 'profile';
|
|
57
|
+
payload: {
|
|
58
|
+
modelName?: OpenAiModelName;
|
|
59
|
+
strictContext?: boolean;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export interface AiAssistantUpdateInstructionRequest extends BaseAiAssistantMutateRequest {
|
|
63
|
+
type: 'update';
|
|
64
|
+
resource: 'instruction';
|
|
65
|
+
payload: {
|
|
66
|
+
id: string;
|
|
67
|
+
instruction: string;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
export interface AiAssistantUpdateContextRequest extends BaseAiAssistantMutateRequest {
|
|
71
|
+
type: 'update';
|
|
72
|
+
resource: 'context';
|
|
73
|
+
payload: {
|
|
74
|
+
id: string;
|
|
75
|
+
title?: string;
|
|
76
|
+
context?: AiAssistantContext;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
export interface AiAssistantDeleteRequest extends BaseAiAssistantMutateRequest {
|
|
80
|
+
type: 'delete';
|
|
81
|
+
payload: {
|
|
82
|
+
id?: string;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
export type AiAssistantInsertRequest = AiAssistantInsertProfileRequest | AiAssistantInsertInstructionRequest | AiAssistantInsertContextRequest;
|
|
86
|
+
export type AiAssistantUpdateRequest = AiAssistantUpdateProfileRequest | AiAssistantUpdateInstructionRequest | AiAssistantUpdateContextRequest;
|
|
87
|
+
export type AiAssistantMutateRequest = AiAssistantInsertRequest | AiAssistantUpdateRequest | AiAssistantDeleteRequest;
|
|
88
|
+
export type AiAssistantResourceType = 'instruction' | 'context' | 'profile';
|
|
89
|
+
export type AiAssistantMutationType = 'insert' | 'update' | 'delete';
|
|
90
|
+
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OpenAiModelData = void 0;
|
|
4
|
-
exports.OpenAiModelData = {
|
|
5
|
-
'gpt-4': {
|
|
6
|
-
tokens: 8192,
|
|
7
|
-
},
|
|
8
|
-
'gpt-3.5-turbo': {
|
|
9
|
-
tokens: 4096,
|
|
10
|
-
},
|
|
11
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OpenAiModelData = void 0;
|
|
4
|
+
exports.OpenAiModelData = {
|
|
5
|
+
'gpt-4': {
|
|
6
|
+
tokens: 8192,
|
|
7
|
+
},
|
|
8
|
+
'gpt-3.5-turbo': {
|
|
9
|
+
tokens: 4096,
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
12
|
//# sourceMappingURL=ai-assistant.types.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ApiHeaders, SecureApiRequest } from './api.types';
|
|
2
|
-
import { ApiEndpointId, HttpMethod } from './integrations';
|
|
3
|
-
export declare class ApiCallContext {
|
|
4
|
-
readonly endpointId: ApiEndpointId;
|
|
5
|
-
readonly url: string;
|
|
6
|
-
readonly method: HttpMethod;
|
|
7
|
-
readonly headers: ApiHeaders;
|
|
8
|
-
readonly body: Record<string, any>;
|
|
9
|
-
readonly queryParams: Record<string, string | number | boolean>;
|
|
10
|
-
readonly pathParams: Record<string, string>;
|
|
11
|
-
readonly serverUrlOverride: string | undefined;
|
|
12
|
-
constructor(apiRequest: SecureApiRequest);
|
|
13
|
-
}
|
|
1
|
+
import { ApiHeaders, SecureApiRequest } from './api.types';
|
|
2
|
+
import { ApiEndpointId, HttpMethod } from './integrations';
|
|
3
|
+
export declare class ApiCallContext {
|
|
4
|
+
readonly endpointId: ApiEndpointId;
|
|
5
|
+
readonly url: string;
|
|
6
|
+
readonly method: HttpMethod;
|
|
7
|
+
readonly headers: ApiHeaders;
|
|
8
|
+
readonly body: Record<string, any>;
|
|
9
|
+
readonly queryParams: Record<string, string | number | boolean>;
|
|
10
|
+
readonly pathParams: Record<string, string>;
|
|
11
|
+
readonly serverUrlOverride: string | undefined;
|
|
12
|
+
constructor(apiRequest: SecureApiRequest);
|
|
13
|
+
}
|