@narrative.io/data-collaboration-sdk-ts 0.0.80 → 0.0.82

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,5 +1,5 @@
1
1
  import { BaseApi } from '../base-api';
2
- import { type LoginRequest, type LoginResponse, type RegisterRequest, type RegisterResponse, type LoggedInUser, type StytchToken, type ApiToken, type UserRole, type RegistrationStatus, type RegistrationStatusRequest } from './types';
2
+ import { type LoginRequest, type LoginResponse, type RegisterRequest, type RegisterResponse, type LoggedInUser, type StytchToken, type ApiToken, type UserRole, type RegistrationStatus, type RegistrationStatusRequest, type RegistrationStatusResponse } from './types';
3
3
  /**
4
4
  * A class for accessing the Authentication API
5
5
  * @extends BaseApi
@@ -23,8 +23,8 @@ declare class AuthenticationApi extends BaseApi {
23
23
  * Checks the resgistration status of a user.
24
24
  *
25
25
  * @param {RegistrationStatusRequest} statusRewquest - request payload of user login for whom to check status.
26
- * @returns {Promise<RegistrationStatus>} - A promise that resolves to the response.
26
+ * @returns {Promise<RegistrationStatusResponse>} - A promise that resolves to the response.
27
27
  */
28
- checkRegistrationStatus(statusRequest: RegistrationStatusRequest): Promise<RegistrationStatus>;
28
+ checkRegistrationStatus(statusRequest: RegistrationStatusRequest): Promise<RegistrationStatusResponse>;
29
29
  }
30
- export { type LoginRequest, type LoginResponse, type RegisterRequest, type RegisterResponse, type LoggedInUser, type StytchToken, type ApiToken, type UserRole, type RegistrationStatus, type RegistrationStatusRequest, AuthenticationApi };
30
+ export { type LoginRequest, type LoginResponse, type RegisterRequest, type RegisterResponse, type LoggedInUser, type StytchToken, type ApiToken, type UserRole, type RegistrationStatus, type RegistrationStatusRequest, type RegistrationStatusResponse, AuthenticationApi };
@@ -33,7 +33,7 @@ class AuthenticationApi extends BaseApi {
33
33
  * Checks the resgistration status of a user.
34
34
  *
35
35
  * @param {RegistrationStatusRequest} statusRewquest - request payload of user login for whom to check status.
36
- * @returns {Promise<RegistrationStatus>} - A promise that resolves to the response.
36
+ * @returns {Promise<RegistrationStatusResponse>} - A promise that resolves to the response.
37
37
  */
38
38
  async checkRegistrationStatus(statusRequest) {
39
39
  return await this.post(`${resourceName}/registration-status`, statusRequest);
@@ -1,6 +1,5 @@
1
1
  export interface LoginRequest {
2
- stytch_token: StytchToken;
3
- session_duration_minutes?: number;
2
+ stytch_session_token: string;
4
3
  }
5
4
  export interface LoginResponse {
6
5
  user: {
@@ -13,8 +12,6 @@ export interface LoginResponse {
13
12
  };
14
13
  api_token: ApiToken;
15
14
  legacy_token: string;
16
- stytch_session_token: string;
17
- stytch_session_jwt: string;
18
15
  }
19
16
  export interface ApiToken {
20
17
  access_token: string;
@@ -23,7 +20,7 @@ export interface ApiToken {
23
20
  refresh_token_expires_in: number;
24
21
  }
25
22
  export interface RegisterRequest {
26
- stytch_token: StytchToken;
23
+ stytch_session_token: string;
27
24
  name?: string;
28
25
  company_name: string;
29
26
  }
@@ -45,5 +42,11 @@ export interface StytchToken {
45
42
  export type UserRole = 'global_admin' | 'partner_admin' | 'partner_user';
46
43
  export interface RegistrationStatusRequest {
47
44
  stytch_token: StytchToken;
45
+ session_duration_minutes?: number;
46
+ }
47
+ export interface RegistrationStatusResponse {
48
+ status: RegistrationStatus;
49
+ stytch_session_token: string;
50
+ stytch_session_jwt: string;
48
51
  }
49
52
  export type RegistrationStatus = 'complete' | 'pending';
package/build/index.d.ts CHANGED
@@ -22,11 +22,12 @@ import { ForecastApi, type ForecastRequest, type ForecastResponse, type CostFore
22
22
  import { ContractsApi, type ContractDetails, type CustomerContract, type PaymentMethod, type ContractRateView } from './contracts';
23
23
  import { getNqlObject, buildNql } from './nql/NQLParser';
24
24
  import { convertNqlObjectToForecastBody } from './nql/DataRulesConverter';
25
- import { AuthenticationApi, type LoginRequest, type LoginResponse, type RegisterRequest, type RegisterResponse, type LoggedInUser, type StytchToken, type ApiToken, type UserRole, type RegistrationStatus, type RegistrationStatusRequest } from './authentication';
25
+ import { AuthenticationApi, type LoginRequest, type LoginResponse, type RegisterRequest, type RegisterResponse, type LoggedInUser, type StytchToken, type ApiToken, type UserRole, type RegistrationStatus, type RegistrationStatusRequest, type RegistrationStatusResponse } from './authentication';
26
26
  import { AppsApi, type App } from './apps';
27
27
  import type { ForecastBody } from './nql/types';
28
+ import { type ConversationMessageRole, isConversationMessageRole, type ConversationMessageName, isConversationMessageName, type ConversationUserMessage, isConversationUserMessage, type ConversationAssistantMessage, isConversationAssistantMessage, type ConversationSystemMessage, isConversationSystemMessage, type ConversationFunctionMessage, isConversationFunctionMessage, type ConversationMessage, isConversationMessage, type ConversationIOtMessage, isConversationInputMessage, type ConversationMessages, isConversationMessages, isType, type RosettaMessageEvent, type RosettaResponseMessageEvent, type ConversationMessageFunctionCall, isConversationMessageFunctionCall } from './rosetta/types';
28
29
  declare class NarrativeApi extends BaseApi {
29
30
  }
30
31
  interface NarrativeApi extends BaseApi, HealthCheckApi, DatasetApi, RosettaStoneApi, AttributeApi, PingApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi, AuthenticationApi {
31
32
  }
32
- export { NarrativeApi, AttributeApi, HealthCheckApi, DatasetApi, PingApi, ProductsApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi, AuthenticationApi, AppsApi, type App, type Resource, type UploadsResponse, type PingStatus, type Attribute, type RefAttribute, type SubAttribute, type Environment, type Config, type ApiRecords, type Dataset, type HealthCheckResult, type SampleRecords, type DatasetTableSummary, type DatasetTableSummaryAPIResponse, type Product, type MonetaryAmount, type CompanyInfo, type Installation, type FilePerSnapshotResponse, type BucketCreationRequest, type UpdateAccessTypeRequest, type Nql, type NqlField, type NqlResult, type NqlQueryInput, type NqlCompileResult, type NqlExpression, type NqlWhere, type NqlFilterExpression, type NqlBooleanExpression, type NqlFilterBinaryExpression, type NqlFilterUnaryExpression, type DataStream, type ForecastRequest, type ForecastResponse, type CostForecastRequest, type CostForecastResponse, type JobState, type ContractDetails, type CustomerContract, type PaymentMethod, type ContractRateView, type LoginRequest, type LoginResponse, type RegisterRequest, type RegisterResponse, type LoggedInUser, type StytchToken, type ApiToken, type UserRole, type RegistrationStatus, type RegistrationStatusRequest, getNqlObject, buildNql, convertNqlObjectToForecastBody, type ForecastBody };
33
+ export { NarrativeApi, AttributeApi, HealthCheckApi, DatasetApi, PingApi, ProductsApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi, AuthenticationApi, AppsApi, getNqlObject, buildNql, convertNqlObjectToForecastBody, isConversationAssistantMessage, isConversationFunctionMessage, isConversationInputMessage, isConversationMessage, isConversationMessageName, isConversationMessageRole, isConversationMessages, isConversationSystemMessage, isConversationUserMessage, isType, isConversationMessageFunctionCall, type App, type Resource, type UploadsResponse, type PingStatus, type Attribute, type RefAttribute, type SubAttribute, type Environment, type Config, type ApiRecords, type Dataset, type HealthCheckResult, type SampleRecords, type DatasetTableSummary, type DatasetTableSummaryAPIResponse, type Product, type MonetaryAmount, type CompanyInfo, type Installation, type FilePerSnapshotResponse, type BucketCreationRequest, type UpdateAccessTypeRequest, type Nql, type NqlField, type NqlResult, type NqlQueryInput, type NqlCompileResult, type NqlExpression, type NqlWhere, type NqlFilterExpression, type NqlBooleanExpression, type NqlFilterBinaryExpression, type NqlFilterUnaryExpression, type DataStream, type ForecastRequest, type ForecastResponse, type CostForecastRequest, type CostForecastResponse, type JobState, type ContractDetails, type CustomerContract, type PaymentMethod, type ContractRateView, type LoginRequest, type LoginResponse, type RegisterRequest, type RegisterResponse, type LoggedInUser, type StytchToken, type ApiToken, type UserRole, type RegistrationStatus, type RegistrationStatusRequest, type RegistrationStatusResponse, type ForecastBody, type ConversationAssistantMessage, type ConversationFunctionMessage, type ConversationIOtMessage, type ConversationMessage, type ConversationMessageName, type ConversationMessageRole, type ConversationMessages, type ConversationSystemMessage, type ConversationUserMessage, type RosettaMessageEvent, type RosettaResponseMessageEvent, type ConversationMessageFunctionCall };
package/build/index.js CHANGED
@@ -18,7 +18,8 @@ import { getNqlObject, buildNql } from './nql/NQLParser';
18
18
  import { convertNqlObjectToForecastBody } from './nql/DataRulesConverter';
19
19
  import { AuthenticationApi } from './authentication';
20
20
  import { AppsApi } from './apps';
21
+ import { isConversationMessageRole, isConversationMessageName, isConversationUserMessage, isConversationAssistantMessage, isConversationSystemMessage, isConversationFunctionMessage, isConversationMessage, isConversationInputMessage, isConversationMessages, isType, isConversationMessageFunctionCall } from './rosetta/types';
21
22
  class NarrativeApi extends BaseApi {
22
23
  }
23
24
  applyMixins(NarrativeApi, [BaseApi, HealthCheckApi, DatasetApi, RosettaStoneApi, AttributeApi, PingApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi, AuthenticationApi]);
24
- export { NarrativeApi, AttributeApi, HealthCheckApi, DatasetApi, PingApi, ProductsApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi, AuthenticationApi, AppsApi, getNqlObject, buildNql, convertNqlObjectToForecastBody };
25
+ export { NarrativeApi, AttributeApi, HealthCheckApi, DatasetApi, PingApi, ProductsApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi, AuthenticationApi, AppsApi, getNqlObject, buildNql, convertNqlObjectToForecastBody, isConversationAssistantMessage, isConversationFunctionMessage, isConversationInputMessage, isConversationMessage, isConversationMessageName, isConversationMessageRole, isConversationMessages, isConversationSystemMessage, isConversationUserMessage, isType, isConversationMessageFunctionCall };
@@ -0,0 +1,668 @@
1
+ import z from 'zod';
2
+ declare const ChatCompletionRequestMessageRoleEnum: z.ZodEnum<["system", "user", "assistant", "function"]>;
3
+ type ConversationMessageRole = z.infer<typeof ChatCompletionRequestMessageRoleEnum>;
4
+ declare const isConversationMessageRole: (input: unknown) => input is "function" | "system" | "user" | "assistant";
5
+ declare const ChatCompletionRequestMessageName: z.ZodEffects<z.ZodString, string, string>;
6
+ type ConversationMessageName = z.infer<typeof ChatCompletionRequestMessageName>;
7
+ declare const isConversationMessageName: (input: unknown) => input is string;
8
+ declare const ChatCompletionRequestUserMessageSchema: z.ZodObject<{
9
+ role: z.ZodEffects<z.ZodEnum<["system", "user", "assistant", "function"]>, "function" | "system" | "user" | "assistant", "function" | "system" | "user" | "assistant">;
10
+ content: z.ZodString;
11
+ name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
12
+ timestamp: z.ZodOptional<z.ZodNumber>;
13
+ }, "strip", z.ZodTypeAny, {
14
+ role: "function" | "system" | "user" | "assistant";
15
+ content: string;
16
+ name?: string | undefined;
17
+ timestamp?: number | undefined;
18
+ }, {
19
+ role: "function" | "system" | "user" | "assistant";
20
+ content: string;
21
+ name?: string | undefined;
22
+ timestamp?: number | undefined;
23
+ }>;
24
+ type ConversationUserMessage = z.infer<typeof ChatCompletionRequestUserMessageSchema>;
25
+ declare const isConversationUserMessage: (input: unknown) => input is {
26
+ role: "function" | "system" | "user" | "assistant";
27
+ content: string;
28
+ name?: string | undefined;
29
+ timestamp?: number | undefined;
30
+ };
31
+ declare const ChatCompletionRequestMessageFunctionCall: z.ZodObject<{
32
+ name: z.ZodString;
33
+ arguments: z.ZodString;
34
+ }, "strip", z.ZodTypeAny, {
35
+ name: string;
36
+ arguments: string;
37
+ }, {
38
+ name: string;
39
+ arguments: string;
40
+ }>;
41
+ type ConversationMessageFunctionCall = z.infer<typeof ChatCompletionRequestMessageFunctionCall>;
42
+ declare const isConversationMessageFunctionCall: (input: unknown) => input is {
43
+ name: string;
44
+ arguments: string;
45
+ };
46
+ declare const ChatCompletionAssistantMessage: z.ZodUnion<[z.ZodObject<{
47
+ role: z.ZodEffects<z.ZodEnum<["system", "user", "assistant", "function"]>, "function" | "system" | "user" | "assistant", "function" | "system" | "user" | "assistant">;
48
+ content: z.ZodString;
49
+ timestamp: z.ZodOptional<z.ZodNumber>;
50
+ }, "strict", z.ZodTypeAny, {
51
+ role: "function" | "system" | "user" | "assistant";
52
+ content: string;
53
+ timestamp?: number | undefined;
54
+ }, {
55
+ role: "function" | "system" | "user" | "assistant";
56
+ content: string;
57
+ timestamp?: number | undefined;
58
+ }>, z.ZodObject<{
59
+ role: z.ZodEffects<z.ZodEnum<["system", "user", "assistant", "function"]>, "function" | "system" | "user" | "assistant", "function" | "system" | "user" | "assistant">;
60
+ content: z.ZodUnion<[z.ZodNull, z.ZodString]>;
61
+ function_call: z.ZodObject<{
62
+ name: z.ZodString;
63
+ arguments: z.ZodString;
64
+ }, "strip", z.ZodTypeAny, {
65
+ name: string;
66
+ arguments: string;
67
+ }, {
68
+ name: string;
69
+ arguments: string;
70
+ }>;
71
+ timestamp: z.ZodOptional<z.ZodNumber>;
72
+ }, "strict", z.ZodTypeAny, {
73
+ role: "function" | "system" | "user" | "assistant";
74
+ content: string | null;
75
+ function_call: {
76
+ name: string;
77
+ arguments: string;
78
+ };
79
+ timestamp?: number | undefined;
80
+ }, {
81
+ role: "function" | "system" | "user" | "assistant";
82
+ content: string | null;
83
+ function_call: {
84
+ name: string;
85
+ arguments: string;
86
+ };
87
+ timestamp?: number | undefined;
88
+ }>]>;
89
+ type ConversationAssistantMessage = z.infer<typeof ChatCompletionAssistantMessage>;
90
+ declare const isConversationAssistantMessage: (input: unknown) => input is {
91
+ role: "function" | "system" | "user" | "assistant";
92
+ content: string | null;
93
+ function_call: {
94
+ name: string;
95
+ arguments: string;
96
+ };
97
+ timestamp?: number | undefined;
98
+ } | {
99
+ role: "function" | "system" | "user" | "assistant";
100
+ content: string;
101
+ timestamp?: number | undefined;
102
+ };
103
+ declare const ChatCompletionSystemMessageSchema: z.ZodObject<{
104
+ role: z.ZodEffects<z.ZodEnum<["system", "user", "assistant", "function"]>, "function" | "system" | "user" | "assistant", "function" | "system" | "user" | "assistant">;
105
+ content: z.ZodString;
106
+ }, "strip", z.ZodTypeAny, {
107
+ role: "function" | "system" | "user" | "assistant";
108
+ content: string;
109
+ }, {
110
+ role: "function" | "system" | "user" | "assistant";
111
+ content: string;
112
+ }>;
113
+ type ConversationSystemMessage = z.infer<typeof ChatCompletionSystemMessageSchema>;
114
+ declare const isConversationSystemMessage: (input: unknown) => input is {
115
+ role: "function" | "system" | "user" | "assistant";
116
+ content: string;
117
+ };
118
+ declare const ChatCompletionFunctionMessageSchema: z.ZodObject<{
119
+ role: z.ZodEffects<z.ZodEnum<["system", "user", "assistant", "function"]>, "function" | "system" | "user" | "assistant", "function" | "system" | "user" | "assistant">;
120
+ content: z.ZodString;
121
+ name: z.ZodString;
122
+ }, "strip", z.ZodTypeAny, {
123
+ name: string;
124
+ role: "function" | "system" | "user" | "assistant";
125
+ content: string;
126
+ }, {
127
+ name: string;
128
+ role: "function" | "system" | "user" | "assistant";
129
+ content: string;
130
+ }>;
131
+ type ConversationFunctionMessage = z.infer<typeof ChatCompletionFunctionMessageSchema>;
132
+ declare const isConversationFunctionMessage: (input: unknown) => input is {
133
+ name: string;
134
+ role: "function" | "system" | "user" | "assistant";
135
+ content: string;
136
+ };
137
+ declare const ChatCompletionRequestMessageSchema: z.ZodUnion<[z.ZodObject<{
138
+ role: z.ZodEffects<z.ZodEnum<["system", "user", "assistant", "function"]>, "function" | "system" | "user" | "assistant", "function" | "system" | "user" | "assistant">;
139
+ content: z.ZodString;
140
+ name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
141
+ timestamp: z.ZodOptional<z.ZodNumber>;
142
+ }, "strip", z.ZodTypeAny, {
143
+ role: "function" | "system" | "user" | "assistant";
144
+ content: string;
145
+ name?: string | undefined;
146
+ timestamp?: number | undefined;
147
+ }, {
148
+ role: "function" | "system" | "user" | "assistant";
149
+ content: string;
150
+ name?: string | undefined;
151
+ timestamp?: number | undefined;
152
+ }>, z.ZodUnion<[z.ZodObject<{
153
+ role: z.ZodEffects<z.ZodEnum<["system", "user", "assistant", "function"]>, "function" | "system" | "user" | "assistant", "function" | "system" | "user" | "assistant">;
154
+ content: z.ZodString;
155
+ timestamp: z.ZodOptional<z.ZodNumber>;
156
+ }, "strict", z.ZodTypeAny, {
157
+ role: "function" | "system" | "user" | "assistant";
158
+ content: string;
159
+ timestamp?: number | undefined;
160
+ }, {
161
+ role: "function" | "system" | "user" | "assistant";
162
+ content: string;
163
+ timestamp?: number | undefined;
164
+ }>, z.ZodObject<{
165
+ role: z.ZodEffects<z.ZodEnum<["system", "user", "assistant", "function"]>, "function" | "system" | "user" | "assistant", "function" | "system" | "user" | "assistant">;
166
+ content: z.ZodUnion<[z.ZodNull, z.ZodString]>;
167
+ function_call: z.ZodObject<{
168
+ name: z.ZodString;
169
+ arguments: z.ZodString;
170
+ }, "strip", z.ZodTypeAny, {
171
+ name: string;
172
+ arguments: string;
173
+ }, {
174
+ name: string;
175
+ arguments: string;
176
+ }>;
177
+ timestamp: z.ZodOptional<z.ZodNumber>;
178
+ }, "strict", z.ZodTypeAny, {
179
+ role: "function" | "system" | "user" | "assistant";
180
+ content: string | null;
181
+ function_call: {
182
+ name: string;
183
+ arguments: string;
184
+ };
185
+ timestamp?: number | undefined;
186
+ }, {
187
+ role: "function" | "system" | "user" | "assistant";
188
+ content: string | null;
189
+ function_call: {
190
+ name: string;
191
+ arguments: string;
192
+ };
193
+ timestamp?: number | undefined;
194
+ }>]>, z.ZodObject<{
195
+ role: z.ZodEffects<z.ZodEnum<["system", "user", "assistant", "function"]>, "function" | "system" | "user" | "assistant", "function" | "system" | "user" | "assistant">;
196
+ content: z.ZodString;
197
+ }, "strip", z.ZodTypeAny, {
198
+ role: "function" | "system" | "user" | "assistant";
199
+ content: string;
200
+ }, {
201
+ role: "function" | "system" | "user" | "assistant";
202
+ content: string;
203
+ }>, z.ZodObject<{
204
+ role: z.ZodEffects<z.ZodEnum<["system", "user", "assistant", "function"]>, "function" | "system" | "user" | "assistant", "function" | "system" | "user" | "assistant">;
205
+ content: z.ZodString;
206
+ name: z.ZodString;
207
+ }, "strip", z.ZodTypeAny, {
208
+ name: string;
209
+ role: "function" | "system" | "user" | "assistant";
210
+ content: string;
211
+ }, {
212
+ name: string;
213
+ role: "function" | "system" | "user" | "assistant";
214
+ content: string;
215
+ }>]>;
216
+ type ConversationMessage = z.infer<typeof ChatCompletionRequestMessageSchema>;
217
+ declare const isConversationMessage: (input: unknown) => input is {
218
+ role: "function" | "system" | "user" | "assistant";
219
+ content: string;
220
+ name?: string | undefined;
221
+ timestamp?: number | undefined;
222
+ } | {
223
+ role: "function" | "system" | "user" | "assistant";
224
+ content: string | null;
225
+ function_call: {
226
+ name: string;
227
+ arguments: string;
228
+ };
229
+ timestamp?: number | undefined;
230
+ } | {
231
+ role: "function" | "system" | "user" | "assistant";
232
+ content: string;
233
+ timestamp?: number | undefined;
234
+ } | {
235
+ role: "function" | "system" | "user" | "assistant";
236
+ content: string;
237
+ } | {
238
+ name: string;
239
+ role: "function" | "system" | "user" | "assistant";
240
+ content: string;
241
+ };
242
+ declare const ChatCompletionRequestMessagesSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodObject<{
243
+ role: z.ZodEffects<z.ZodEnum<["system", "user", "assistant", "function"]>, "function" | "system" | "user" | "assistant", "function" | "system" | "user" | "assistant">;
244
+ content: z.ZodString;
245
+ name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
246
+ timestamp: z.ZodOptional<z.ZodNumber>;
247
+ }, "strip", z.ZodTypeAny, {
248
+ role: "function" | "system" | "user" | "assistant";
249
+ content: string;
250
+ name?: string | undefined;
251
+ timestamp?: number | undefined;
252
+ }, {
253
+ role: "function" | "system" | "user" | "assistant";
254
+ content: string;
255
+ name?: string | undefined;
256
+ timestamp?: number | undefined;
257
+ }>, z.ZodUnion<[z.ZodObject<{
258
+ role: z.ZodEffects<z.ZodEnum<["system", "user", "assistant", "function"]>, "function" | "system" | "user" | "assistant", "function" | "system" | "user" | "assistant">;
259
+ content: z.ZodString;
260
+ timestamp: z.ZodOptional<z.ZodNumber>;
261
+ }, "strict", z.ZodTypeAny, {
262
+ role: "function" | "system" | "user" | "assistant";
263
+ content: string;
264
+ timestamp?: number | undefined;
265
+ }, {
266
+ role: "function" | "system" | "user" | "assistant";
267
+ content: string;
268
+ timestamp?: number | undefined;
269
+ }>, z.ZodObject<{
270
+ role: z.ZodEffects<z.ZodEnum<["system", "user", "assistant", "function"]>, "function" | "system" | "user" | "assistant", "function" | "system" | "user" | "assistant">;
271
+ content: z.ZodUnion<[z.ZodNull, z.ZodString]>;
272
+ function_call: z.ZodObject<{
273
+ name: z.ZodString;
274
+ arguments: z.ZodString;
275
+ }, "strip", z.ZodTypeAny, {
276
+ name: string;
277
+ arguments: string;
278
+ }, {
279
+ name: string;
280
+ arguments: string;
281
+ }>;
282
+ timestamp: z.ZodOptional<z.ZodNumber>;
283
+ }, "strict", z.ZodTypeAny, {
284
+ role: "function" | "system" | "user" | "assistant";
285
+ content: string | null;
286
+ function_call: {
287
+ name: string;
288
+ arguments: string;
289
+ };
290
+ timestamp?: number | undefined;
291
+ }, {
292
+ role: "function" | "system" | "user" | "assistant";
293
+ content: string | null;
294
+ function_call: {
295
+ name: string;
296
+ arguments: string;
297
+ };
298
+ timestamp?: number | undefined;
299
+ }>]>, z.ZodObject<{
300
+ role: z.ZodEffects<z.ZodEnum<["system", "user", "assistant", "function"]>, "function" | "system" | "user" | "assistant", "function" | "system" | "user" | "assistant">;
301
+ content: z.ZodString;
302
+ }, "strip", z.ZodTypeAny, {
303
+ role: "function" | "system" | "user" | "assistant";
304
+ content: string;
305
+ }, {
306
+ role: "function" | "system" | "user" | "assistant";
307
+ content: string;
308
+ }>, z.ZodObject<{
309
+ role: z.ZodEffects<z.ZodEnum<["system", "user", "assistant", "function"]>, "function" | "system" | "user" | "assistant", "function" | "system" | "user" | "assistant">;
310
+ content: z.ZodString;
311
+ name: z.ZodString;
312
+ }, "strip", z.ZodTypeAny, {
313
+ name: string;
314
+ role: "function" | "system" | "user" | "assistant";
315
+ content: string;
316
+ }, {
317
+ name: string;
318
+ role: "function" | "system" | "user" | "assistant";
319
+ content: string;
320
+ }>]>, "many">, ({
321
+ role: "function" | "system" | "user" | "assistant";
322
+ content: string;
323
+ name?: string | undefined;
324
+ timestamp?: number | undefined;
325
+ } | {
326
+ role: "function" | "system" | "user" | "assistant";
327
+ content: string | null;
328
+ function_call: {
329
+ name: string;
330
+ arguments: string;
331
+ };
332
+ timestamp?: number | undefined;
333
+ } | {
334
+ role: "function" | "system" | "user" | "assistant";
335
+ content: string;
336
+ timestamp?: number | undefined;
337
+ } | {
338
+ role: "function" | "system" | "user" | "assistant";
339
+ content: string;
340
+ } | {
341
+ name: string;
342
+ role: "function" | "system" | "user" | "assistant";
343
+ content: string;
344
+ })[], ({
345
+ role: "function" | "system" | "user" | "assistant";
346
+ content: string;
347
+ name?: string | undefined;
348
+ timestamp?: number | undefined;
349
+ } | {
350
+ role: "function" | "system" | "user" | "assistant";
351
+ content: string | null;
352
+ function_call: {
353
+ name: string;
354
+ arguments: string;
355
+ };
356
+ timestamp?: number | undefined;
357
+ } | {
358
+ role: "function" | "system" | "user" | "assistant";
359
+ content: string;
360
+ timestamp?: number | undefined;
361
+ } | {
362
+ role: "function" | "system" | "user" | "assistant";
363
+ content: string;
364
+ } | {
365
+ name: string;
366
+ role: "function" | "system" | "user" | "assistant";
367
+ content: string;
368
+ })[]>, ({
369
+ role: "function" | "system" | "user" | "assistant";
370
+ content: string;
371
+ name?: string | undefined;
372
+ timestamp?: number | undefined;
373
+ } | {
374
+ role: "function" | "system" | "user" | "assistant";
375
+ content: string | null;
376
+ function_call: {
377
+ name: string;
378
+ arguments: string;
379
+ };
380
+ timestamp?: number | undefined;
381
+ } | {
382
+ role: "function" | "system" | "user" | "assistant";
383
+ content: string;
384
+ timestamp?: number | undefined;
385
+ } | {
386
+ role: "function" | "system" | "user" | "assistant";
387
+ content: string;
388
+ } | {
389
+ name: string;
390
+ role: "function" | "system" | "user" | "assistant";
391
+ content: string;
392
+ })[], ({
393
+ role: "function" | "system" | "user" | "assistant";
394
+ content: string;
395
+ name?: string | undefined;
396
+ timestamp?: number | undefined;
397
+ } | {
398
+ role: "function" | "system" | "user" | "assistant";
399
+ content: string | null;
400
+ function_call: {
401
+ name: string;
402
+ arguments: string;
403
+ };
404
+ timestamp?: number | undefined;
405
+ } | {
406
+ role: "function" | "system" | "user" | "assistant";
407
+ content: string;
408
+ timestamp?: number | undefined;
409
+ } | {
410
+ role: "function" | "system" | "user" | "assistant";
411
+ content: string;
412
+ } | {
413
+ name: string;
414
+ role: "function" | "system" | "user" | "assistant";
415
+ content: string;
416
+ })[]>, ({
417
+ role: "function" | "system" | "user" | "assistant";
418
+ content: string;
419
+ name?: string | undefined;
420
+ timestamp?: number | undefined;
421
+ } | {
422
+ role: "function" | "system" | "user" | "assistant";
423
+ content: string | null;
424
+ function_call: {
425
+ name: string;
426
+ arguments: string;
427
+ };
428
+ timestamp?: number | undefined;
429
+ } | {
430
+ role: "function" | "system" | "user" | "assistant";
431
+ content: string;
432
+ timestamp?: number | undefined;
433
+ } | {
434
+ role: "function" | "system" | "user" | "assistant";
435
+ content: string;
436
+ } | {
437
+ name: string;
438
+ role: "function" | "system" | "user" | "assistant";
439
+ content: string;
440
+ })[], ({
441
+ role: "function" | "system" | "user" | "assistant";
442
+ content: string;
443
+ name?: string | undefined;
444
+ timestamp?: number | undefined;
445
+ } | {
446
+ role: "function" | "system" | "user" | "assistant";
447
+ content: string | null;
448
+ function_call: {
449
+ name: string;
450
+ arguments: string;
451
+ };
452
+ timestamp?: number | undefined;
453
+ } | {
454
+ role: "function" | "system" | "user" | "assistant";
455
+ content: string;
456
+ timestamp?: number | undefined;
457
+ } | {
458
+ role: "function" | "system" | "user" | "assistant";
459
+ content: string;
460
+ } | {
461
+ name: string;
462
+ role: "function" | "system" | "user" | "assistant";
463
+ content: string;
464
+ })[]>, ({
465
+ role: "function" | "system" | "user" | "assistant";
466
+ content: string;
467
+ name?: string | undefined;
468
+ timestamp?: number | undefined;
469
+ } | {
470
+ role: "function" | "system" | "user" | "assistant";
471
+ content: string | null;
472
+ function_call: {
473
+ name: string;
474
+ arguments: string;
475
+ };
476
+ timestamp?: number | undefined;
477
+ } | {
478
+ role: "function" | "system" | "user" | "assistant";
479
+ content: string;
480
+ timestamp?: number | undefined;
481
+ } | {
482
+ role: "function" | "system" | "user" | "assistant";
483
+ content: string;
484
+ } | {
485
+ name: string;
486
+ role: "function" | "system" | "user" | "assistant";
487
+ content: string;
488
+ })[], ({
489
+ role: "function" | "system" | "user" | "assistant";
490
+ content: string;
491
+ name?: string | undefined;
492
+ timestamp?: number | undefined;
493
+ } | {
494
+ role: "function" | "system" | "user" | "assistant";
495
+ content: string | null;
496
+ function_call: {
497
+ name: string;
498
+ arguments: string;
499
+ };
500
+ timestamp?: number | undefined;
501
+ } | {
502
+ role: "function" | "system" | "user" | "assistant";
503
+ content: string;
504
+ timestamp?: number | undefined;
505
+ } | {
506
+ role: "function" | "system" | "user" | "assistant";
507
+ content: string;
508
+ } | {
509
+ name: string;
510
+ role: "function" | "system" | "user" | "assistant";
511
+ content: string;
512
+ })[]>;
513
+ type ConversationMessages = z.infer<typeof ChatCompletionRequestMessagesSchema>;
514
+ declare const isConversationMessages: (input: unknown) => input is ({
515
+ role: "function" | "system" | "user" | "assistant";
516
+ content: string;
517
+ name?: string | undefined;
518
+ timestamp?: number | undefined;
519
+ } | {
520
+ role: "function" | "system" | "user" | "assistant";
521
+ content: string | null;
522
+ function_call: {
523
+ name: string;
524
+ arguments: string;
525
+ };
526
+ timestamp?: number | undefined;
527
+ } | {
528
+ role: "function" | "system" | "user" | "assistant";
529
+ content: string;
530
+ timestamp?: number | undefined;
531
+ } | {
532
+ role: "function" | "system" | "user" | "assistant";
533
+ content: string;
534
+ } | {
535
+ name: string;
536
+ role: "function" | "system" | "user" | "assistant";
537
+ content: string;
538
+ })[];
539
+ declare const ChatCompletionRequestInputMessageSchema: z.ZodUnion<[z.ZodObject<{
540
+ role: z.ZodEffects<z.ZodEnum<["system", "user", "assistant", "function"]>, "function" | "system" | "user" | "assistant", "function" | "system" | "user" | "assistant">;
541
+ content: z.ZodString;
542
+ name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
543
+ timestamp: z.ZodOptional<z.ZodNumber>;
544
+ }, "strip", z.ZodTypeAny, {
545
+ role: "function" | "system" | "user" | "assistant";
546
+ content: string;
547
+ name?: string | undefined;
548
+ timestamp?: number | undefined;
549
+ }, {
550
+ role: "function" | "system" | "user" | "assistant";
551
+ content: string;
552
+ name?: string | undefined;
553
+ timestamp?: number | undefined;
554
+ }>, z.ZodUnion<[z.ZodObject<{
555
+ role: z.ZodEffects<z.ZodEnum<["system", "user", "assistant", "function"]>, "function" | "system" | "user" | "assistant", "function" | "system" | "user" | "assistant">;
556
+ content: z.ZodString;
557
+ timestamp: z.ZodOptional<z.ZodNumber>;
558
+ }, "strict", z.ZodTypeAny, {
559
+ role: "function" | "system" | "user" | "assistant";
560
+ content: string;
561
+ timestamp?: number | undefined;
562
+ }, {
563
+ role: "function" | "system" | "user" | "assistant";
564
+ content: string;
565
+ timestamp?: number | undefined;
566
+ }>, z.ZodObject<{
567
+ role: z.ZodEffects<z.ZodEnum<["system", "user", "assistant", "function"]>, "function" | "system" | "user" | "assistant", "function" | "system" | "user" | "assistant">;
568
+ content: z.ZodUnion<[z.ZodNull, z.ZodString]>;
569
+ function_call: z.ZodObject<{
570
+ name: z.ZodString;
571
+ arguments: z.ZodString;
572
+ }, "strip", z.ZodTypeAny, {
573
+ name: string;
574
+ arguments: string;
575
+ }, {
576
+ name: string;
577
+ arguments: string;
578
+ }>;
579
+ timestamp: z.ZodOptional<z.ZodNumber>;
580
+ }, "strict", z.ZodTypeAny, {
581
+ role: "function" | "system" | "user" | "assistant";
582
+ content: string | null;
583
+ function_call: {
584
+ name: string;
585
+ arguments: string;
586
+ };
587
+ timestamp?: number | undefined;
588
+ }, {
589
+ role: "function" | "system" | "user" | "assistant";
590
+ content: string | null;
591
+ function_call: {
592
+ name: string;
593
+ arguments: string;
594
+ };
595
+ timestamp?: number | undefined;
596
+ }>]>, z.ZodObject<{
597
+ role: z.ZodEffects<z.ZodEnum<["system", "user", "assistant", "function"]>, "function" | "system" | "user" | "assistant", "function" | "system" | "user" | "assistant">;
598
+ content: z.ZodString;
599
+ name: z.ZodString;
600
+ }, "strip", z.ZodTypeAny, {
601
+ name: string;
602
+ role: "function" | "system" | "user" | "assistant";
603
+ content: string;
604
+ }, {
605
+ name: string;
606
+ role: "function" | "system" | "user" | "assistant";
607
+ content: string;
608
+ }>]>;
609
+ type ConversationIOtMessage = z.infer<typeof ChatCompletionRequestInputMessageSchema>;
610
+ declare const isConversationInputMessage: (input: unknown) => input is {
611
+ role: "function" | "system" | "user" | "assistant";
612
+ content: string;
613
+ name?: string | undefined;
614
+ timestamp?: number | undefined;
615
+ } | {
616
+ role: "function" | "system" | "user" | "assistant";
617
+ content: string | null;
618
+ function_call: {
619
+ name: string;
620
+ arguments: string;
621
+ };
622
+ timestamp?: number | undefined;
623
+ } | {
624
+ role: "function" | "system" | "user" | "assistant";
625
+ content: string;
626
+ timestamp?: number | undefined;
627
+ } | {
628
+ name: string;
629
+ role: "function" | "system" | "user" | "assistant";
630
+ content: string;
631
+ };
632
+ interface AddMessageEvent {
633
+ type: 'addMessage';
634
+ data: ConversationIOtMessage;
635
+ }
636
+ interface PingEvent {
637
+ type: 'ping';
638
+ }
639
+ interface ClearHistoryEvent {
640
+ type: 'clearHistory';
641
+ }
642
+ interface HistoryEvent {
643
+ type: 'history';
644
+ }
645
+ type RosettaRequestMessage = AddMessageEvent | PingEvent | ClearHistoryEvent | HistoryEvent;
646
+ interface RosettaMessageEvent extends MessageEvent {
647
+ data: RosettaRequestMessage;
648
+ }
649
+ interface AddMessageResponse {
650
+ type: 'newMessage';
651
+ data: ConversationIOtMessage;
652
+ }
653
+ interface HistoryResponse {
654
+ type: 'history';
655
+ data: ConversationIOtMessage[];
656
+ }
657
+ interface ClearHistoryResponse {
658
+ type: 'historyCleared';
659
+ }
660
+ interface PingResponse {
661
+ type: 'pong';
662
+ }
663
+ type RosettaResponseMessage = AddMessageResponse | HistoryResponse | ClearHistoryResponse | PingResponse;
664
+ interface RosettaResponseMessageEvent extends MessageEvent {
665
+ data: RosettaResponseMessage;
666
+ }
667
+ declare function isType<T>(input: unknown, schema: z.ZodType<T>): input is T;
668
+ export { type ConversationMessageRole, isConversationMessageRole, type ConversationMessageName, isConversationMessageName, type ConversationUserMessage, isConversationUserMessage, type ConversationAssistantMessage, isConversationAssistantMessage, type ConversationSystemMessage, isConversationSystemMessage, type ConversationFunctionMessage, isConversationFunctionMessage, type ConversationMessage, isConversationMessage, type ConversationIOtMessage, isConversationInputMessage, type ConversationMessages, isConversationMessages, isType, type RosettaMessageEvent, type RosettaResponseMessageEvent, type ConversationMessageFunctionCall, isConversationMessageFunctionCall };
@@ -0,0 +1,170 @@
1
+ import z from 'zod';
2
+ /// ///////////////////
3
+ // Role Enum
4
+ /// ///////////////////
5
+ const ChatCompletionRequestMessageRoleEnum = z.enum(['system', 'user', 'assistant', 'function']);
6
+ const isConversationMessageRole = (input) => {
7
+ return ChatCompletionRequestMessageRoleEnum.safeParse(input).success;
8
+ };
9
+ /// ///////////////////
10
+ // Name Type
11
+ /// ///////////////////
12
+ const ChatCompletionRequestMessageName = z.string().max(64).refine((value) => /^[\w]*$/.test(value), {
13
+ message: 'String may only contain a-z, A-Z, 0-9, and underscores'
14
+ });
15
+ const isConversationMessageName = (input) => {
16
+ return ChatCompletionRequestMessageName.safeParse(input).success;
17
+ };
18
+ // Valid timestampes for Rosetta AI Messages
19
+ const ChatCompletionRequestMessageTimestamp = z.number().int().min(1670112000000).max(Date.now() + (1000 * 60 * 60 * 24));
20
+ /// ///////////////////
21
+ // User Message
22
+ /// ///////////////////
23
+ const ChatCompletionRequestUserMessageSchema = z.object({
24
+ role: ChatCompletionRequestMessageRoleEnum.refine((value) => value === 'user', {
25
+ message: 'Role must be user'
26
+ }),
27
+ content: z.string().min(1),
28
+ name: ChatCompletionRequestMessageName.optional(),
29
+ timestamp: ChatCompletionRequestMessageTimestamp.optional()
30
+ });
31
+ const isConversationUserMessage = (input) => {
32
+ return ChatCompletionRequestUserMessageSchema.safeParse(input).success;
33
+ };
34
+ /// ///////////////////
35
+ // Function Call
36
+ /// ///////////////////
37
+ const ChatCompletionRequestMessageFunctionCall = z.object({
38
+ name: z.string(),
39
+ arguments: z.string()
40
+ });
41
+ const isConversationMessageFunctionCall = (input) => {
42
+ return ChatCompletionRequestMessageFunctionCall.safeParse(input).success;
43
+ };
44
+ /// ///////////////////
45
+ // Assistant Message
46
+ /// ///////////////////
47
+ const ChatCompletionRequestAssistantMessageWithFunctionCall = z.object({
48
+ role: ChatCompletionRequestMessageRoleEnum.refine((value) => value === 'assistant', {
49
+ message: 'Role must be assistant'
50
+ }),
51
+ content: z.null().or(z.string()),
52
+ function_call: ChatCompletionRequestMessageFunctionCall,
53
+ timestamp: ChatCompletionRequestMessageTimestamp.optional()
54
+ }).strict();
55
+ const ChatCompletionRequestAssistantMessage = z.object({
56
+ role: ChatCompletionRequestMessageRoleEnum.refine((value) => value === 'assistant', {
57
+ message: 'Role must be assistant'
58
+ }),
59
+ content: z.string(),
60
+ timestamp: ChatCompletionRequestMessageTimestamp.optional()
61
+ }).strict();
62
+ const ChatCompletionAssistantMessage = ChatCompletionRequestAssistantMessage.or(ChatCompletionRequestAssistantMessageWithFunctionCall);
63
+ const isConversationAssistantMessage = (input) => {
64
+ return ChatCompletionAssistantMessage.safeParse(input).success;
65
+ };
66
+ /// ///////////////////
67
+ // System Message
68
+ /// ///////////////////
69
+ const ChatCompletionSystemMessageSchema = z.object({
70
+ role: ChatCompletionRequestMessageRoleEnum.refine((value) => value === 'system', {
71
+ message: 'Role must be system'
72
+ }),
73
+ content: z.string()
74
+ });
75
+ const isConversationSystemMessage = (input) => {
76
+ return ChatCompletionSystemMessageSchema.safeParse(input).success;
77
+ };
78
+ /// ///////////////////
79
+ // Function Message
80
+ /// ///////////////////
81
+ const ChatCompletionFunctionMessageSchema = z.object({
82
+ role: ChatCompletionRequestMessageRoleEnum.refine((value) => value === 'function', {
83
+ message: 'Role must be function'
84
+ }),
85
+ content: z.string(),
86
+ name: z.string()
87
+ });
88
+ const isConversationFunctionMessage = (input) => {
89
+ return ChatCompletionFunctionMessageSchema.safeParse(input).success;
90
+ };
91
+ /// ///////////////////
92
+ // Conversation Message
93
+ /// ///////////////////
94
+ const ChatCompletionRequestMessageSchema = z.union([
95
+ ChatCompletionRequestUserMessageSchema,
96
+ ChatCompletionAssistantMessage,
97
+ ChatCompletionSystemMessageSchema,
98
+ ChatCompletionFunctionMessageSchema
99
+ ]);
100
+ const isConversationMessage = (input) => {
101
+ return ChatCompletionRequestMessageSchema.safeParse(input).success;
102
+ };
103
+ /// ///////////////////
104
+ // Conversation Messages
105
+ /// ///////////////////
106
+ function validateFunctionOrder(messages) {
107
+ for (let i = 1; i < messages.length; i++) {
108
+ // Start from the second element
109
+ if (messages[i].role === 'function') {
110
+ const previousMessage = messages[i - 1];
111
+ if (!(previousMessage.role === 'assistant' && 'function_call' in previousMessage)) {
112
+ console.error('A message with role `function` must directly follow a message with role `assistant` and function_call not undefined', JSON.stringify(messages[i], null, 2), JSON.stringify(previousMessage, null, 2));
113
+ return { valid: false, error: 'A message with role `function` must directly follow a message with role `assistant` and function_call not undefined', index: i };
114
+ }
115
+ }
116
+ }
117
+ return { valid: true };
118
+ }
119
+ const ChatCompletionRequestMessagesSchema = z.array(ChatCompletionRequestMessageSchema).min(1)
120
+ .refine(
121
+ // We should have at most one system message
122
+ (data) => {
123
+ const systemMessageCount = data.filter((message) => message.role === 'system').length;
124
+ return systemMessageCount <= 1;
125
+ }, {
126
+ message: 'The message array can have at most one system message'
127
+ })
128
+ .refine(
129
+ // If there is a system message it should be the first message
130
+ (data) => {
131
+ const systemMessageIndex = data.findIndex((message) => message.role === 'system');
132
+ return systemMessageIndex === 0 || systemMessageIndex === -1;
133
+ }, {
134
+ message: 'The system message needs to be the first message in the array'
135
+ })
136
+ .refine(
137
+ // We should have at most one system message
138
+ (data) => {
139
+ const userMessageCount = data.find((message) => message.role === 'user');
140
+ return userMessageCount !== undefined;
141
+ }, {
142
+ message: 'The message array must have at least one user message'
143
+ })
144
+ .refine((data) => {
145
+ return validateFunctionOrder(data).valid;
146
+ });
147
+ const isConversationMessages = (input) => {
148
+ return ChatCompletionRequestMessagesSchema.safeParse(input).success;
149
+ };
150
+ /// ///////////////////
151
+ // Input Conversation Message
152
+ /// ///////////////////
153
+ const ChatCompletionRequestInputMessageSchema = z.union([
154
+ ChatCompletionRequestUserMessageSchema,
155
+ ChatCompletionAssistantMessage,
156
+ ChatCompletionFunctionMessageSchema
157
+ ]);
158
+ const isConversationInputMessage = (input) => {
159
+ return ChatCompletionRequestInputMessageSchema.safeParse(input).success;
160
+ };
161
+ /// ///////////////////
162
+ // Utilities
163
+ /// ///////////////////
164
+ function isType(input, schema) {
165
+ return schema.safeParse(input).success;
166
+ }
167
+ /// ///////////////////
168
+ // Exports
169
+ /// ///////////////////
170
+ export { isConversationMessageRole, isConversationMessageName, isConversationUserMessage, isConversationAssistantMessage, isConversationSystemMessage, isConversationFunctionMessage, isConversationMessage, isConversationInputMessage, isConversationMessages, isType, isConversationMessageFunctionCall };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narrative.io/data-collaboration-sdk-ts",
3
- "version": "0.0.80",
3
+ "version": "0.0.82",
4
4
  "main": "build/index.js",
5
5
  "repository": "github:narrative-io/data-collaboration-sdk-ts",
6
6
  "source": "src/index.ts",
@@ -20,28 +20,25 @@
20
20
  "author": "",
21
21
  "license": "ISC",
22
22
  "devDependencies": {
23
- "@babel/core": "^7.20.12",
24
- "@babel/preset-env": "^7.20.2",
23
+ "@babel/core": "^7.22.5",
24
+ "@babel/preset-env": "^7.22.5",
25
25
  "@babel/preset-typescript": "^7.18.6",
26
26
  "@commitlint/cli": "^17.4.2",
27
27
  "@commitlint/config-conventional": "^17.4.2",
28
28
  "@types/jest": "^29.5.0",
29
- "@typescript-eslint/eslint-plugin": "^5.51.0",
30
29
  "babel-jest": "^29.4.3",
31
- "eslint": "^8.33.0",
32
- "eslint-config-standard-with-typescript": "^35.0.0",
33
- "eslint-plugin-import": "^2.27.5",
34
- "eslint-plugin-n": "^15.7.0",
35
- "eslint-plugin-promise": "^6.1.1",
30
+ "eslint-config-standard-with-typescript": "^36.0.0",
36
31
  "husky": "^8.0.0",
37
32
  "jest": "^29.4.3",
38
- "ts-jest": "^29.0.5",
39
- "typescript": "^5.0.2"
33
+ "ts-jest": "^29.0.5"
40
34
  },
41
35
  "dependencies": {
42
36
  "mande": "^2.0.3",
43
37
  "zod": "^3.21.4"
44
38
  },
39
+ "overrides": {
40
+ "semver@<7.5.2": "7.5.2"
41
+ },
45
42
  "files": [
46
43
  "build"
47
44
  ]