@squidcloud/local-backend 1.0.34 → 1.0.36

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