@logto/cloud 0.2.5-71b7fea → 0.2.5-73a3bfd

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 (2) hide show
  1. package/lib/routes/index.d.ts +715 -114
  2. package/package.json +15 -19
@@ -1,54 +1,147 @@
1
- // Generated by dts-bundle-generator v8.0.1
1
+ // Generated by dts-bundle-generator v9.3.1
2
2
 
3
- import { RequestContext } from '@withtyped/server';
3
+ import { Json, JsonObject, RequestContext } from '@withtyped/server';
4
4
  import { InferModelType } from '@withtyped/server/model';
5
5
 
6
6
  export type WithAuthContext<Context = RequestContext> = Context & {
7
7
  auth: {
8
+ /** The ID of the authenticated subject (`sub`). */
8
9
  id: string;
10
+ /** The scopes that the subject has (`scope`). */
9
11
  scopes: string[];
10
12
  };
11
13
  };
12
- declare enum TenantTag {
13
- Development = "development",
14
- Staging = "staging",
15
- Production = "production"
16
- }
17
14
  declare enum VerificationCodeType {
18
15
  SignIn = "SignIn",
19
16
  Register = "Register",
20
17
  ForgotPassword = "ForgotPassword",
21
- /** @deprecated */
22
- Continue = "Continue",
23
18
  Generic = "Generic",
24
19
  /** @deprecated Use `Generic` type template for sending test sms/email use case */
25
20
  Test = "Test"
26
21
  }
27
- declare const AffiliateProperties: import("@withtyped/server/model").default<"affiliate_properties", {
22
+ declare enum TemplateType {
23
+ /** The template for sending verification code when user is signing in. */
24
+ SignIn = "SignIn",
25
+ /** The template for sending verification code when user is registering. */
26
+ Register = "Register",
27
+ /** The template for sending verification code when user is resetting password. */
28
+ ForgotPassword = "ForgotPassword",
29
+ /** The template for sending organization invitation. */
30
+ OrganizationInvitation = "OrganizationInvitation",
31
+ /** The template for generic usage. */
32
+ Generic = "Generic"
33
+ }
34
+ declare enum OrganizationInvitationStatus {
35
+ Pending = "Pending",
36
+ Accepted = "Accepted",
37
+ Expired = "Expired",
38
+ Revoked = "Revoked"
39
+ }
40
+ /** The scopes (permissions) defined by the organization template. */
41
+ export type OrganizationScope = {
42
+ tenantId: string;
43
+ /** The globally unique identifier of the organization scope. */
44
+ id: string;
45
+ /** The organization scope's name, unique within the organization template. */
46
+ name: string;
47
+ /** A brief description of the organization scope. */
48
+ description: string | null;
49
+ };
50
+ declare enum LogtoJwtTokenKeyType {
51
+ AccessToken = "access-token",
52
+ ClientCredentials = "client-credentials"
53
+ }
54
+ /**
55
+ * The simplified organization role entity that is returned in the `roles` field
56
+ * of the organization.
57
+ */
58
+ export type OrganizationRoleEntity = {
59
+ id: string;
60
+ name: string;
61
+ };
62
+ declare enum TenantTag {
63
+ Development = "development",
64
+ Production = "production"
65
+ }
66
+ declare enum TenantRole {
67
+ /** Admin of the tenant, who has all permissions. */
68
+ Admin = "admin",
69
+ /** Collaborator of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
70
+ Collaborator = "collaborator"
71
+ }
72
+ declare const availableReportableUsageKeys: readonly [
73
+ "tokenLimit",
74
+ "machineToMachineLimit",
75
+ "resourcesLimit",
76
+ "enterpriseSsoLimit",
77
+ "hooksLimit",
78
+ "tenantMembersLimit",
79
+ "mfaEnabled",
80
+ "organizationsEnabled",
81
+ "organizationsLimit"
82
+ ];
83
+ export type ReportableUsageKey = (typeof availableReportableUsageKeys)[number];
84
+ export type RealtimeReportableUsageKey = Exclude<ReportableUsageKey, "tokenLimit">;
85
+ declare enum LogtoSkuType {
86
+ Basic = "Basic",
87
+ AddOn = "AddOn"
88
+ }
89
+ declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
28
90
  createdAt: Date;
29
91
  affiliateId: string;
30
92
  type: "hostname" | "query";
31
93
  value: string;
32
94
  }, "createdAt", "createdAt">;
33
95
  export type AffiliateProperty = InferModelType<typeof AffiliateProperties>;
34
- declare const Affiliates: import("@withtyped/server/model").default<"affiliates", {
35
- id: string;
36
- createdAt: Date;
96
+ declare const Affiliates: import("@withtyped/server/lib/model/index.js").default<"affiliates", {
37
97
  name: string;
38
- }, "createdAt" | "id", "createdAt" | "id">;
98
+ createdAt: Date;
99
+ id: string;
100
+ }, "id" | "createdAt", "id" | "createdAt">;
39
101
  export type Affiliate = InferModelType<typeof Affiliates>;
102
+ declare enum RegionName {
103
+ EU = "EU",
104
+ US = "US",
105
+ AU = "AU"
106
+ }
40
107
  export type AffiliateData = Affiliate & {
41
108
  properties: Array<Pick<AffiliateProperty, "type" | "value">>;
42
109
  };
43
- declare const router: import("@withtyped/server").Router<WithAuthContext, import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
44
- options: {};
110
+ declare const router: import("@withtyped/server").Router<RequestContext, WithAuthContext<Omit<import("@withtyped/server").BaseContext & {
111
+ request: {
112
+ id?: string | undefined;
113
+ method?: import("@withtyped/server").RequestMethod | undefined;
114
+ headers: import("http").IncomingHttpHeaders;
115
+ url: URL;
116
+ body?: unknown;
117
+ };
118
+ }, "request"> & {
119
+ request: Record<string, unknown> & {
120
+ id?: string | undefined;
121
+ method?: import("@withtyped/server").RequestMethod | undefined;
122
+ headers: import("http").IncomingHttpHeaders;
123
+ url: URL;
124
+ body?: unknown;
125
+ } & {
126
+ body?: Json | undefined;
127
+ bodyRaw?: Buffer | undefined;
128
+ };
129
+ }>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
45
130
  patch: {
46
131
  "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
47
132
  name?: string | undefined;
48
- tag?: TenantTag | undefined;
49
133
  }, {
50
134
  id: string;
51
135
  name: string;
136
+ quota: {
137
+ mauLimit: number | null;
138
+ tokenLimit: number | null;
139
+ };
140
+ createdAt: Date;
141
+ usage: {
142
+ activeUsers: number;
143
+ tokenUsage: number;
144
+ };
52
145
  indicator: string;
53
146
  isSuspended: boolean;
54
147
  planId: string;
@@ -57,16 +150,22 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
57
150
  planId: string;
58
151
  currentPeriodStart: Date;
59
152
  currentPeriodEnd: Date;
153
+ isEnterprisePlan: boolean;
154
+ id?: string | undefined;
155
+ upcomingInvoice?: {
156
+ subtotal: number;
157
+ subtotalExcludingTax: number | null;
158
+ total: number;
159
+ totalExcludingTax: number | null;
160
+ } | null | undefined;
161
+ isAddOnAvailable?: boolean | undefined;
60
162
  };
163
+ regionName: RegionName;
61
164
  tag: TenantTag;
62
- usage: {
63
- activeUsers: number;
64
- cost: number;
65
- };
66
165
  openInvoices: {
67
166
  status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
68
- createdAt: Date;
69
167
  id: string;
168
+ createdAt: Date;
70
169
  updatedAt: Date;
71
170
  customerId: string | null;
72
171
  billingReason: string | null;
@@ -80,10 +179,20 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
80
179
  }[];
81
180
  }>;
82
181
  };
182
+ options: {};
83
183
  get: {
84
184
  "/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
85
185
  id: string;
86
186
  name: string;
187
+ quota: {
188
+ mauLimit: number | null;
189
+ tokenLimit: number | null;
190
+ };
191
+ createdAt: Date;
192
+ usage: {
193
+ activeUsers: number;
194
+ tokenUsage: number;
195
+ };
87
196
  indicator: string;
88
197
  isSuspended: boolean;
89
198
  planId: string;
@@ -92,16 +201,22 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
92
201
  planId: string;
93
202
  currentPeriodStart: Date;
94
203
  currentPeriodEnd: Date;
204
+ isEnterprisePlan: boolean;
205
+ id?: string | undefined;
206
+ upcomingInvoice?: {
207
+ subtotal: number;
208
+ subtotalExcludingTax: number | null;
209
+ total: number;
210
+ totalExcludingTax: number | null;
211
+ } | null | undefined;
212
+ isAddOnAvailable?: boolean | undefined;
95
213
  };
214
+ regionName: RegionName;
96
215
  tag: TenantTag;
97
- usage: {
98
- activeUsers: number;
99
- cost: number;
100
- };
101
216
  openInvoices: {
102
217
  status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
103
- createdAt: Date;
104
218
  id: string;
219
+ createdAt: Date;
105
220
  updatedAt: Date;
106
221
  customerId: string | null;
107
222
  billingReason: string | null;
@@ -119,9 +234,19 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
119
234
  "/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
120
235
  name?: string | undefined;
121
236
  tag?: TenantTag | undefined;
237
+ regionName?: RegionName | undefined;
122
238
  }, {
123
239
  id: string;
124
240
  name: string;
241
+ quota: {
242
+ mauLimit: number | null;
243
+ tokenLimit: number | null;
244
+ };
245
+ createdAt: Date;
246
+ usage: {
247
+ activeUsers: number;
248
+ tokenUsage: number;
249
+ };
125
250
  indicator: string;
126
251
  isSuspended: boolean;
127
252
  planId: string;
@@ -130,16 +255,22 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
130
255
  planId: string;
131
256
  currentPeriodStart: Date;
132
257
  currentPeriodEnd: Date;
258
+ isEnterprisePlan: boolean;
259
+ id?: string | undefined;
260
+ upcomingInvoice?: {
261
+ subtotal: number;
262
+ subtotalExcludingTax: number | null;
263
+ total: number;
264
+ totalExcludingTax: number | null;
265
+ } | null | undefined;
266
+ isAddOnAvailable?: boolean | undefined;
133
267
  };
268
+ regionName: RegionName;
134
269
  tag: TenantTag;
135
- usage: {
136
- activeUsers: number;
137
- cost: number;
138
- };
139
270
  openInvoices: {
140
271
  status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
141
- createdAt: Date;
142
272
  id: string;
273
+ createdAt: Date;
143
274
  updatedAt: Date;
144
275
  customerId: string | null;
145
276
  billingReason: string | null;
@@ -154,20 +285,100 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
154
285
  }>;
155
286
  };
156
287
  put: {};
157
- head: {};
158
288
  delete: {
159
289
  "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, unknown, unknown>;
160
290
  };
161
291
  copy: {};
292
+ head: {};
162
293
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
163
- options: {};
164
294
  patch: {};
295
+ options: {};
165
296
  get: {
166
297
  "/tenants/my/subscription": import("@withtyped/server").PathGuard<"/my/subscription", unknown, unknown, {
167
298
  status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
168
299
  planId: string;
169
300
  currentPeriodStart: Date;
170
301
  currentPeriodEnd: Date;
302
+ isEnterprisePlan: boolean;
303
+ id?: string | undefined;
304
+ upcomingInvoice?: {
305
+ subtotal: number;
306
+ subtotalExcludingTax: number | null;
307
+ total: number;
308
+ totalExcludingTax: number | null;
309
+ } | null | undefined;
310
+ isAddOnAvailable?: boolean | undefined;
311
+ }>;
312
+ } & {
313
+ "/tenants/my/subscription-usage": import("@withtyped/server").PathGuard<"/my/subscription-usage", unknown, unknown, {
314
+ usage: {
315
+ applicationsLimit: number;
316
+ machineToMachineLimit: number;
317
+ resourcesLimit: number;
318
+ scopesPerResourceLimit: number;
319
+ socialConnectorsLimit: number;
320
+ machineToMachineRolesLimit: number;
321
+ scopesPerRoleLimit: number;
322
+ hooksLimit: number;
323
+ mfaEnabled: boolean;
324
+ organizationsEnabled: boolean;
325
+ thirdPartyApplicationsLimit: number;
326
+ tenantMembersLimit: number;
327
+ customJwtEnabled: boolean;
328
+ subjectTokenEnabled: boolean;
329
+ bringYourUiEnabled: boolean;
330
+ userRolesLimit: number;
331
+ enterpriseSsoLimit: number;
332
+ organizationsLimit: number;
333
+ };
334
+ resources: Record<string, number>;
335
+ roles: Record<string, number>;
336
+ quota: {
337
+ mauLimit: number | null;
338
+ tokenLimit: number | null;
339
+ applicationsLimit: number | null;
340
+ machineToMachineLimit: number | null;
341
+ resourcesLimit: number | null;
342
+ scopesPerResourceLimit: number | null;
343
+ socialConnectorsLimit: number | null;
344
+ machineToMachineRolesLimit: number | null;
345
+ scopesPerRoleLimit: number | null;
346
+ hooksLimit: number | null;
347
+ auditLogsRetentionDays: number | null;
348
+ mfaEnabled: boolean;
349
+ organizationsEnabled: boolean;
350
+ thirdPartyApplicationsLimit: number | null;
351
+ tenantMembersLimit: number | null;
352
+ customJwtEnabled: boolean;
353
+ subjectTokenEnabled: boolean;
354
+ bringYourUiEnabled: boolean;
355
+ userRolesLimit: number | null;
356
+ enterpriseSsoLimit: number | null;
357
+ organizationsLimit: number | null;
358
+ };
359
+ basicQuota: {
360
+ mauLimit: number | null;
361
+ tokenLimit: number | null;
362
+ applicationsLimit: number | null;
363
+ machineToMachineLimit: number | null;
364
+ resourcesLimit: number | null;
365
+ scopesPerResourceLimit: number | null;
366
+ socialConnectorsLimit: number | null;
367
+ machineToMachineRolesLimit: number | null;
368
+ scopesPerRoleLimit: number | null;
369
+ hooksLimit: number | null;
370
+ auditLogsRetentionDays: number | null;
371
+ mfaEnabled: boolean;
372
+ organizationsEnabled: boolean;
373
+ thirdPartyApplicationsLimit: number | null;
374
+ tenantMembersLimit: number | null;
375
+ customJwtEnabled: boolean;
376
+ subjectTokenEnabled: boolean;
377
+ bringYourUiEnabled: boolean;
378
+ userRolesLimit: number | null;
379
+ enterpriseSsoLimit: number | null;
380
+ organizationsLimit: number | null;
381
+ };
171
382
  }>;
172
383
  } & {
173
384
  "/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
@@ -175,13 +386,98 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
175
386
  planId: string;
176
387
  currentPeriodStart: Date;
177
388
  currentPeriodEnd: Date;
389
+ isEnterprisePlan: boolean;
390
+ id?: string | undefined;
391
+ upcomingInvoice?: {
392
+ subtotal: number;
393
+ subtotalExcludingTax: number | null;
394
+ total: number;
395
+ totalExcludingTax: number | null;
396
+ } | null | undefined;
397
+ isAddOnAvailable?: boolean | undefined;
398
+ }>;
399
+ } & {
400
+ "/tenants/:tenantId/subscription-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription-usage", unknown, unknown, {
401
+ usage: {
402
+ applicationsLimit: number;
403
+ machineToMachineLimit: number;
404
+ resourcesLimit: number;
405
+ scopesPerResourceLimit: number;
406
+ socialConnectorsLimit: number;
407
+ machineToMachineRolesLimit: number;
408
+ scopesPerRoleLimit: number;
409
+ hooksLimit: number;
410
+ mfaEnabled: boolean;
411
+ organizationsEnabled: boolean;
412
+ thirdPartyApplicationsLimit: number;
413
+ tenantMembersLimit: number;
414
+ customJwtEnabled: boolean;
415
+ subjectTokenEnabled: boolean;
416
+ bringYourUiEnabled: boolean;
417
+ userRolesLimit: number;
418
+ enterpriseSsoLimit: number;
419
+ organizationsLimit: number;
420
+ };
421
+ resources: Record<string, number>;
422
+ roles: Record<string, number>;
423
+ quota: {
424
+ mauLimit: number | null;
425
+ tokenLimit: number | null;
426
+ applicationsLimit: number | null;
427
+ machineToMachineLimit: number | null;
428
+ resourcesLimit: number | null;
429
+ scopesPerResourceLimit: number | null;
430
+ socialConnectorsLimit: number | null;
431
+ machineToMachineRolesLimit: number | null;
432
+ scopesPerRoleLimit: number | null;
433
+ hooksLimit: number | null;
434
+ auditLogsRetentionDays: number | null;
435
+ mfaEnabled: boolean;
436
+ organizationsEnabled: boolean;
437
+ thirdPartyApplicationsLimit: number | null;
438
+ tenantMembersLimit: number | null;
439
+ customJwtEnabled: boolean;
440
+ subjectTokenEnabled: boolean;
441
+ bringYourUiEnabled: boolean;
442
+ userRolesLimit: number | null;
443
+ enterpriseSsoLimit: number | null;
444
+ organizationsLimit: number | null;
445
+ };
446
+ basicQuota: {
447
+ mauLimit: number | null;
448
+ tokenLimit: number | null;
449
+ applicationsLimit: number | null;
450
+ machineToMachineLimit: number | null;
451
+ resourcesLimit: number | null;
452
+ scopesPerResourceLimit: number | null;
453
+ socialConnectorsLimit: number | null;
454
+ machineToMachineRolesLimit: number | null;
455
+ scopesPerRoleLimit: number | null;
456
+ hooksLimit: number | null;
457
+ auditLogsRetentionDays: number | null;
458
+ mfaEnabled: boolean;
459
+ organizationsEnabled: boolean;
460
+ thirdPartyApplicationsLimit: number | null;
461
+ tenantMembersLimit: number | null;
462
+ customJwtEnabled: boolean;
463
+ subjectTokenEnabled: boolean;
464
+ bringYourUiEnabled: boolean;
465
+ userRolesLimit: number | null;
466
+ enterpriseSsoLimit: number | null;
467
+ organizationsLimit: number | null;
468
+ };
469
+ }>;
470
+ } & {
471
+ "/tenants/:tenantId/subscription/periodic-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription/periodic-usage", unknown, unknown, {
472
+ mauLimit: number;
473
+ tokenLimit: number;
178
474
  }>;
179
475
  } & {
180
476
  "/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
181
477
  invoices: {
182
478
  status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
183
- createdAt: Date;
184
479
  id: string;
480
+ createdAt: Date;
185
481
  updatedAt: Date;
186
482
  customerId: string | null;
187
483
  billingReason: string | null;
@@ -193,15 +489,57 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
193
489
  hostedInvoiceUrl: string | null;
194
490
  invoicePdf: string | null;
195
491
  planName: string | null;
492
+ skuId?: string | null | undefined;
196
493
  }[];
197
494
  }>;
198
495
  } & {
199
- "/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
200
- activeUsers: number;
201
- cost: number;
496
+ "/tenants/:tenantId/available-skus": import("@withtyped/server").PathGuard<"/:tenantId/available-skus", {
497
+ type?: LogtoSkuType | undefined;
498
+ }, unknown, {
499
+ type: LogtoSkuType;
500
+ id: string;
501
+ name: string | null;
502
+ quota: {
503
+ mauLimit?: number | null | undefined;
504
+ tokenLimit?: number | null | undefined;
505
+ applicationsLimit?: number | null | undefined;
506
+ machineToMachineLimit?: number | null | undefined;
507
+ resourcesLimit?: number | null | undefined;
508
+ scopesPerResourceLimit?: number | null | undefined;
509
+ socialConnectorsLimit?: number | null | undefined;
510
+ machineToMachineRolesLimit?: number | null | undefined;
511
+ scopesPerRoleLimit?: number | null | undefined;
512
+ hooksLimit?: number | null | undefined;
513
+ auditLogsRetentionDays?: number | null | undefined;
514
+ mfaEnabled?: boolean | undefined;
515
+ organizationsEnabled?: boolean | undefined;
516
+ thirdPartyApplicationsLimit?: number | null | undefined;
517
+ tenantMembersLimit?: number | null | undefined;
518
+ customJwtEnabled?: boolean | undefined;
519
+ subjectTokenEnabled?: boolean | undefined;
520
+ bringYourUiEnabled?: boolean | undefined;
521
+ userRolesLimit?: number | null | undefined;
522
+ enterpriseSsoLimit?: number | null | undefined;
523
+ organizationsLimit?: number | null | undefined;
524
+ };
525
+ createdAt: Date;
526
+ updatedAt: Date;
527
+ defaultPriceId: string | null;
528
+ unitPrice: number | null;
529
+ productId: string | null;
530
+ }[]>;
531
+ } & {
532
+ "/tenants/:tenantId/invoices/:invoiceId/hosted-invoice-url": import("@withtyped/server").PathGuard<"/:tenantId/invoices/:invoiceId/hosted-invoice-url", unknown, unknown, {
533
+ hostedInvoiceUrl: string;
202
534
  }>;
203
535
  };
204
536
  post: {
537
+ "/tenants/my/subscription/item-updates": import("@withtyped/server").PathGuard<"/my/subscription/item-updates", unknown, {
538
+ usageKey: RealtimeReportableUsageKey;
539
+ }, {
540
+ message: string;
541
+ }>;
542
+ } & {
205
543
  "/tenants/:tenantId/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:tenantId/stripe-customer-portal", unknown, {
206
544
  callbackUrl?: string | undefined;
207
545
  }, {
@@ -209,14 +547,14 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
209
547
  }>;
210
548
  };
211
549
  put: {};
212
- head: {};
213
550
  delete: {
214
551
  "/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, unknown>;
215
552
  };
216
553
  copy: {};
554
+ head: {};
217
555
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
218
- options: {};
219
556
  patch: {};
557
+ options: {};
220
558
  get: {
221
559
  "/services/mails/usage": import("@withtyped/server").PathGuard<"/mails/usage", {
222
560
  from?: string | undefined;
@@ -227,129 +565,235 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
227
565
  post: {
228
566
  "/services/mails": import("@withtyped/server").PathGuard<"/mails", unknown, {
229
567
  data: {
230
- type: VerificationCodeType;
231
- to: string;
568
+ type: TemplateType | VerificationCodeType;
232
569
  payload: {
570
+ code?: string | undefined;
571
+ link?: string | undefined;
572
+ } & Record<string, string> & {
233
573
  senderName?: string | undefined;
234
574
  companyInformation?: string | undefined;
235
575
  appLogo?: string | undefined;
236
- code: string;
237
576
  };
577
+ to: string;
238
578
  };
239
579
  }, unknown>;
240
580
  } & {
241
581
  "/services/send-sms": import("@withtyped/server").PathGuard<"/send-sms", unknown, {
242
582
  data: {
243
- type: VerificationCodeType;
583
+ type: TemplateType | VerificationCodeType;
244
584
  to: string;
245
585
  payload: {
246
- senderName?: string | undefined;
247
- companyInformation?: string | undefined;
248
- appLogo?: string | undefined;
249
- code: string;
250
- };
586
+ code?: string | undefined;
587
+ link?: string | undefined;
588
+ } & Record<string, string>;
251
589
  };
252
590
  }, unknown>;
591
+ } & {
592
+ "/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", {
593
+ isTest?: string | undefined;
594
+ }, {
595
+ context: Record<string, Json>;
596
+ script: string;
597
+ tokenType: LogtoJwtTokenKeyType.AccessToken;
598
+ token: Record<string, Json>;
599
+ environmentVariables?: Record<string, string> | undefined;
600
+ } | {
601
+ script: string;
602
+ tokenType: LogtoJwtTokenKeyType.ClientCredentials;
603
+ token: Record<string, Json>;
604
+ environmentVariables?: Record<string, string> | undefined;
605
+ }, Record<string, unknown>>;
606
+ };
607
+ put: {
608
+ "/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, {
609
+ "jwt.accessToken"?: {
610
+ production?: string | undefined;
611
+ test?: string | undefined;
612
+ } | undefined;
613
+ "jwt.clientCredentials"?: {
614
+ production?: string | undefined;
615
+ test?: string | undefined;
616
+ } | undefined;
617
+ }, unknown>;
618
+ };
619
+ delete: {
620
+ "/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, unknown, unknown>;
253
621
  };
254
- put: {};
255
- head: {};
256
- delete: {};
257
622
  copy: {};
623
+ head: {};
258
624
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
259
- options: {};
260
625
  patch: {};
626
+ options: {};
261
627
  get: {
262
- "/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
263
- createdAt: Date;
628
+ "/skus": import("@withtyped/server").PathGuard<"/", {
629
+ type?: LogtoSkuType | undefined;
630
+ }, unknown, {
631
+ type: LogtoSkuType;
264
632
  id: string;
265
- name: string;
633
+ name: string | null;
634
+ quota: {
635
+ mauLimit?: number | null | undefined;
636
+ tokenLimit?: number | null | undefined;
637
+ applicationsLimit?: number | null | undefined;
638
+ machineToMachineLimit?: number | null | undefined;
639
+ resourcesLimit?: number | null | undefined;
640
+ scopesPerResourceLimit?: number | null | undefined;
641
+ socialConnectorsLimit?: number | null | undefined;
642
+ machineToMachineRolesLimit?: number | null | undefined;
643
+ scopesPerRoleLimit?: number | null | undefined;
644
+ hooksLimit?: number | null | undefined;
645
+ auditLogsRetentionDays?: number | null | undefined;
646
+ mfaEnabled?: boolean | undefined;
647
+ organizationsEnabled?: boolean | undefined;
648
+ thirdPartyApplicationsLimit?: number | null | undefined;
649
+ tenantMembersLimit?: number | null | undefined;
650
+ customJwtEnabled?: boolean | undefined;
651
+ subjectTokenEnabled?: boolean | undefined;
652
+ bringYourUiEnabled?: boolean | undefined;
653
+ userRolesLimit?: number | null | undefined;
654
+ enterpriseSsoLimit?: number | null | undefined;
655
+ organizationsLimit?: number | null | undefined;
656
+ };
657
+ createdAt: Date;
658
+ updatedAt: Date;
659
+ defaultPriceId: string | null;
660
+ unitPrice: number | null;
661
+ productId: string | null;
662
+ }[]>;
663
+ };
664
+ post: {
665
+ "/skus": import("@withtyped/server").PathGuard<"/", unknown, {
666
+ type: LogtoSkuType.AddOn;
667
+ quota: {
668
+ tokenLimit?: number | null | undefined;
669
+ machineToMachineLimit?: number | null | undefined;
670
+ resourcesLimit?: number | null | undefined;
671
+ enterpriseSsoLimit?: number | null | undefined;
672
+ hooksLimit?: number | null | undefined;
673
+ tenantMembersLimit?: number | null | undefined;
674
+ mfaEnabled?: boolean | undefined;
675
+ organizationsEnabled?: boolean | undefined;
676
+ organizationsLimit?: number | null | undefined;
677
+ mauLimit?: number | null | undefined;
678
+ applicationsLimit?: number | null | undefined;
679
+ scopesPerResourceLimit?: number | null | undefined;
680
+ socialConnectorsLimit?: number | null | undefined;
681
+ machineToMachineRolesLimit?: number | null | undefined;
682
+ scopesPerRoleLimit?: number | null | undefined;
683
+ auditLogsRetentionDays?: number | null | undefined;
684
+ thirdPartyApplicationsLimit?: number | null | undefined;
685
+ customJwtEnabled?: boolean | undefined;
686
+ subjectTokenEnabled?: boolean | undefined;
687
+ bringYourUiEnabled?: boolean | undefined;
688
+ userRolesLimit?: number | null | undefined;
689
+ };
690
+ } | {
691
+ type: LogtoSkuType.Basic;
266
692
  quota: {
267
693
  mauLimit: number | null;
694
+ tokenLimit: number | null;
268
695
  applicationsLimit: number | null;
269
696
  machineToMachineLimit: number | null;
270
697
  resourcesLimit: number | null;
271
698
  scopesPerResourceLimit: number | null;
272
- customDomainEnabled: boolean;
273
- omniSignInEnabled: boolean;
274
- builtInEmailConnectorEnabled: boolean;
275
699
  socialConnectorsLimit: number | null;
276
- standardConnectorsLimit: number | null;
277
- rolesLimit: number | null;
700
+ machineToMachineRolesLimit: number | null;
278
701
  scopesPerRoleLimit: number | null;
279
702
  hooksLimit: number | null;
280
703
  auditLogsRetentionDays: number | null;
704
+ mfaEnabled: boolean;
705
+ organizationsEnabled: boolean;
706
+ thirdPartyApplicationsLimit: number | null;
707
+ tenantMembersLimit: number | null;
708
+ customJwtEnabled: boolean;
709
+ subjectTokenEnabled: boolean;
710
+ bringYourUiEnabled: boolean;
711
+ userRolesLimit: number | null;
712
+ enterpriseSsoLimit: number | null;
713
+ organizationsLimit: number | null;
281
714
  };
282
- stripeProducts: {
283
- description?: string | undefined;
284
- type: "flat" | "tier1" | "tier2" | "tier3";
285
- id: string;
286
- name: string;
287
- price: {
288
- quantity?: 1 | undefined;
289
- unitAmount?: number | null | undefined;
290
- id: string;
291
- unitAmountDecimal: string;
292
- };
293
- }[];
715
+ }, {
716
+ id: string;
717
+ createdAt: Date;
718
+ type: LogtoSkuType;
294
719
  updatedAt: Date;
295
- }[]>;
296
- };
297
- post: {};
298
- put: {};
299
- head: {};
300
- delete: {};
301
- copy: {};
302
- }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
303
- options: {};
304
- patch: {};
305
- get: {
306
- "/my/tenant": import("@withtyped/server").PathGuard<"/tenant", unknown, unknown, {
720
+ quota: {
721
+ mauLimit?: number | null | undefined;
722
+ tokenLimit?: number | null | undefined;
723
+ applicationsLimit?: number | null | undefined;
724
+ machineToMachineLimit?: number | null | undefined;
725
+ resourcesLimit?: number | null | undefined;
726
+ scopesPerResourceLimit?: number | null | undefined;
727
+ socialConnectorsLimit?: number | null | undefined;
728
+ machineToMachineRolesLimit?: number | null | undefined;
729
+ scopesPerRoleLimit?: number | null | undefined;
730
+ hooksLimit?: number | null | undefined;
731
+ auditLogsRetentionDays?: number | null | undefined;
732
+ mfaEnabled?: boolean | undefined;
733
+ organizationsEnabled?: boolean | undefined;
734
+ thirdPartyApplicationsLimit?: number | null | undefined;
735
+ tenantMembersLimit?: number | null | undefined;
736
+ customJwtEnabled?: boolean | undefined;
737
+ subjectTokenEnabled?: boolean | undefined;
738
+ bringYourUiEnabled?: boolean | undefined;
739
+ userRolesLimit?: number | null | undefined;
740
+ enterpriseSsoLimit?: number | null | undefined;
741
+ organizationsLimit?: number | null | undefined;
742
+ };
743
+ }>;
744
+ } & {
745
+ "/skus/:skuId/products": import("@withtyped/server").PathGuard<"/:skuId/products", {
746
+ isOneTime?: string | undefined;
747
+ }, {
307
748
  name: string;
308
- id: string;
309
- indicator: string;
310
- isSuspended: boolean;
311
- tag: TenantTag;
749
+ unitPrice: number;
750
+ }, {
751
+ productId: string;
312
752
  }>;
313
753
  };
314
- post: {};
315
754
  put: {};
316
- head: {};
317
- delete: {};
755
+ delete: {
756
+ "/skus/:skuId": import("@withtyped/server").PathGuard<"/:skuId", unknown, unknown, unknown>;
757
+ };
318
758
  copy: {};
759
+ head: {};
319
760
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
320
- options: {};
321
761
  patch: {};
762
+ options: {};
322
763
  get: {
323
764
  "/checkout-session/:id": import("@withtyped/server").PathGuard<"/:id", unknown, unknown, {
324
- status: "open" | "complete" | "expired";
325
- createdAt: Date;
326
765
  id: string;
766
+ createdAt: Date;
327
767
  userId: string;
328
- updatedAt: Date;
768
+ status: "open" | "complete" | "expired";
329
769
  tenantId: string | null;
330
- planId: string;
770
+ updatedAt: Date;
771
+ planId: string | null;
772
+ skuId: string | null;
331
773
  }>;
332
774
  };
333
775
  post: {
334
776
  "/checkout-session": import("@withtyped/server").PathGuard<"/", unknown, {
777
+ successCallbackUrl: string;
335
778
  tenantId?: string | undefined;
336
- tenantTag?: TenantTag | undefined;
779
+ planId?: string | undefined;
780
+ skuId?: string | undefined;
337
781
  tenantName?: string | undefined;
782
+ tenantTag?: TenantTag | undefined;
783
+ tenantRegionName?: RegionName | undefined;
338
784
  cancelCallbackUrl?: string | undefined;
339
- planId: string;
340
- successCallbackUrl: string;
341
785
  }, {
342
- redirectUri?: string | null | undefined;
343
786
  sessionId: string;
787
+ redirectUri?: string | null | undefined;
344
788
  }>;
345
789
  };
346
790
  put: {};
347
- head: {};
348
791
  delete: {};
349
792
  copy: {};
793
+ head: {};
350
794
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
351
- options: {};
352
795
  patch: {};
796
+ options: {};
353
797
  get: {
354
798
  "/affiliates": import("@withtyped/server").PathGuard<"/", unknown, unknown, AffiliateData[]>;
355
799
  };
@@ -357,57 +801,214 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
357
801
  "/affiliates": import("@withtyped/server").PathGuard<"/", unknown, {
358
802
  name: string;
359
803
  }, {
360
- createdAt: Date;
361
804
  id: string;
805
+ createdAt: Date;
362
806
  name: string;
363
807
  }>;
364
808
  } & {
365
809
  "/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
366
- value: string;
367
810
  type: "hostname" | "query";
368
- }, {
369
811
  value: string;
370
- type: "hostname" | "query";
812
+ }, {
371
813
  createdAt: Date;
372
814
  affiliateId: string;
815
+ type: "hostname" | "query";
816
+ value: string;
373
817
  }>;
374
818
  };
375
819
  put: {};
376
- head: {};
377
820
  delete: {
378
821
  "/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
379
- value: string;
380
822
  type: "hostname" | "query";
823
+ value: string;
381
824
  }, unknown>;
382
825
  };
383
826
  copy: {};
827
+ head: {};
384
828
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
385
- options: {};
386
829
  patch: {};
830
+ options: {};
387
831
  get: {};
388
832
  post: {
389
833
  "/affiliate-logs": import("@withtyped/server").PathGuard<"/", unknown, {
390
- hostname?: string | undefined;
391
- query?: string | undefined;
392
834
  createdAt: string;
393
835
  userId: string;
836
+ hostname?: string | undefined;
837
+ query?: string | undefined;
394
838
  }, {
395
- createdAt: Date;
396
839
  id: string;
840
+ createdAt: Date;
397
841
  affiliateId: string | null;
398
842
  userId: string;
399
843
  createdVia: {
844
+ createdAt: string;
400
845
  hostname?: string | undefined;
401
846
  query?: string | undefined;
402
- createdAt: string;
403
847
  };
404
848
  }>;
405
849
  };
406
850
  put: {};
851
+ delete: {};
852
+ copy: {};
407
853
  head: {};
854
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
855
+ patch: {
856
+ "/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:invitationId/status", unknown, {
857
+ status: OrganizationInvitationStatus.Accepted;
858
+ }, unknown>;
859
+ };
860
+ options: {};
861
+ get: {
862
+ "/invitations": import("@withtyped/server").PathGuard<"/", unknown, unknown, ({
863
+ id: string;
864
+ createdAt: number;
865
+ status: OrganizationInvitationStatus;
866
+ tenantId: string;
867
+ updatedAt: number;
868
+ inviterId: string | null;
869
+ invitee: string;
870
+ acceptedUserId: string | null;
871
+ organizationId: string;
872
+ expiresAt: number;
873
+ organizationRoles: OrganizationRoleEntity[];
874
+ } & {
875
+ tenantName: string;
876
+ tenantTag: TenantTag;
877
+ })[]>;
878
+ } & {
879
+ "/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:invitationId", unknown, unknown, {
880
+ id: string;
881
+ createdAt: number;
882
+ status: OrganizationInvitationStatus;
883
+ tenantId: string;
884
+ updatedAt: number;
885
+ inviterId: string | null;
886
+ invitee: string;
887
+ acceptedUserId: string | null;
888
+ organizationId: string;
889
+ expiresAt: number;
890
+ organizationRoles: OrganizationRoleEntity[];
891
+ }>;
892
+ };
893
+ post: {};
894
+ put: {};
408
895
  delete: {};
409
896
  copy: {};
897
+ head: {};
898
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
899
+ patch: {};
900
+ options: {};
901
+ get: {};
902
+ post: {};
903
+ put: {};
904
+ delete: {
905
+ "/me": import("@withtyped/server").PathGuard<"/", unknown, unknown, unknown>;
906
+ };
907
+ copy: {};
908
+ head: {};
410
909
  }, "/api">>, "/api">;
910
+ export declare const tenantAuthRouter: import("@withtyped/server").Router<RequestContext, import("@withtyped/server").WithBodyContext<import("@withtyped/server").BaseContext & {
911
+ request: {
912
+ id?: string | undefined;
913
+ method?: import("@withtyped/server").RequestMethod | undefined;
914
+ headers: import("http").IncomingHttpHeaders;
915
+ url: URL;
916
+ body?: unknown;
917
+ };
918
+ }>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
919
+ patch: {
920
+ "/:tenantId/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/status", unknown, {
921
+ status: OrganizationInvitationStatus.Revoked;
922
+ }, {
923
+ id: string;
924
+ createdAt: number;
925
+ status: OrganizationInvitationStatus;
926
+ tenantId: string;
927
+ updatedAt: number;
928
+ inviterId: string | null;
929
+ invitee: string;
930
+ acceptedUserId: string | null;
931
+ organizationId: string;
932
+ expiresAt: number;
933
+ organizationRoles: OrganizationRoleEntity[];
934
+ }>;
935
+ };
936
+ options: {};
937
+ get: {
938
+ "/:tenantId/members": import("@withtyped/server").PathGuard<"/:tenantId/members", unknown, unknown, {
939
+ id: string;
940
+ name: string | null;
941
+ username: string | null;
942
+ primaryEmail: string | null;
943
+ primaryPhone: string | null;
944
+ avatar: string | null;
945
+ organizationRoles: OrganizationRoleEntity[];
946
+ }[]>;
947
+ } & {
948
+ "/:tenantId/members/:userId/scopes": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/scopes", unknown, unknown, OrganizationScope[]>;
949
+ } & {
950
+ "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, unknown, ({
951
+ id: string;
952
+ createdAt: number;
953
+ status: OrganizationInvitationStatus;
954
+ tenantId: string;
955
+ updatedAt: number;
956
+ inviterId: string | null;
957
+ invitee: string;
958
+ acceptedUserId: string | null;
959
+ organizationId: string;
960
+ expiresAt: number;
961
+ organizationRoles: OrganizationRoleEntity[];
962
+ } & {
963
+ inviterName?: string | undefined;
964
+ })[]>;
965
+ };
966
+ post: {
967
+ "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
968
+ invitee: string | string[];
969
+ roleName: TenantRole;
970
+ expiresAt?: number | undefined;
971
+ }, {
972
+ id: string;
973
+ createdAt: number;
974
+ status: OrganizationInvitationStatus;
975
+ tenantId: string;
976
+ updatedAt: number;
977
+ inviterId: string | null;
978
+ invitee: string;
979
+ acceptedUserId: string | null;
980
+ organizationId: string;
981
+ expiresAt: number;
982
+ organizationRoles: OrganizationRoleEntity[];
983
+ } | {
984
+ id: string;
985
+ createdAt: number;
986
+ status: OrganizationInvitationStatus;
987
+ tenantId: string;
988
+ updatedAt: number;
989
+ inviterId: string | null;
990
+ invitee: string;
991
+ acceptedUserId: string | null;
992
+ organizationId: string;
993
+ expiresAt: number;
994
+ organizationRoles: OrganizationRoleEntity[];
995
+ }[]>;
996
+ } & {
997
+ "/:tenantId/invitations/:invitationId/message": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/message", unknown, unknown, unknown>;
998
+ };
999
+ put: {
1000
+ "/:tenantId/members/:userId/roles": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/roles", unknown, {
1001
+ roleName: TenantRole;
1002
+ }, unknown>;
1003
+ };
1004
+ delete: {
1005
+ "/:tenantId/members/:userId": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId", unknown, unknown, unknown>;
1006
+ } & {
1007
+ "/:tenantId/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId", unknown, unknown, unknown>;
1008
+ };
1009
+ copy: {};
1010
+ head: {};
1011
+ }, "/api/tenants">>, "/api/tenants">;
411
1012
 
412
1013
  export {
413
1014
  router as default,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/cloud",
3
- "version": "0.2.5-71b7fea",
3
+ "version": "0.2.5-73a3bfd",
4
4
  "description": "Logto Cloud service.",
5
5
  "main": "build/index.js",
6
6
  "author": "Silverhand Inc. <contact@silverhand.io>",
@@ -16,25 +16,24 @@
16
16
  "#src/*": "./build/*"
17
17
  },
18
18
  "devDependencies": {
19
- "@silverhand/eslint-config": "4.0.1",
20
- "@silverhand/jest-config": "4.0.0",
21
- "@silverhand/ts-config": "4.0.0",
19
+ "@silverhand/eslint-config": "6.0.1",
20
+ "@silverhand/ts-config": "6.0.0",
22
21
  "@types/accepts": "^1.3.5",
23
22
  "@types/http-proxy": "^1.17.9",
24
- "@types/jest": "^29.4.0",
25
23
  "@types/mime-types": "^2.1.1",
26
- "@types/node": "^18.11.18",
24
+ "@types/node": "^20.0.0",
27
25
  "@types/yargs": "^17.0.24",
28
- "dts-bundle-generator": "^8.0.1",
29
- "eslint": "^8.44.0",
30
- "jest": "^29.5.0",
31
- "lint-staged": "^14.0.0",
26
+ "dts-bundle-generator": "^9.3.1",
27
+ "eslint": "^8.57.0",
28
+ "lint-staged": "^15.0.0",
32
29
  "nodemon": "^3.0.0",
33
30
  "prettier": "^3.0.0",
34
- "typescript": "^5.0.0"
31
+ "typescript": "^5.3.3",
32
+ "vite-tsconfig-paths": "^5.0.0",
33
+ "vitest": "^2.0.0"
35
34
  },
36
35
  "engines": {
37
- "node": "^18.12.0"
36
+ "node": "^20.9.0"
38
37
  },
39
38
  "eslintConfig": {
40
39
  "extends": "@silverhand",
@@ -50,22 +49,19 @@
50
49
  "access": "public"
51
50
  },
52
51
  "dependencies": {
53
- "@silverhand/essentials": "^2.8.4",
54
- "@withtyped/server": "^0.12.7"
52
+ "@silverhand/essentials": "^2.9.2",
53
+ "@withtyped/server": "^0.14.0"
55
54
  },
56
55
  "scripts": {
57
56
  "precommit": "lint-staged",
58
57
  "build": "rm -rf build/ && tsc -p tsconfig.build.json && pnpm build:lib",
59
58
  "//": "It is not used to build the service itself.",
60
- "build:lib": "rm -rf lib/ && dts-bundle-generator src/routes/index.ts --project tsconfig.build.json -o lib/routes/index.d.ts",
61
- "build:test": "rm -rf build/ && tsc -p tsconfig.test.json --sourcemap",
59
+ "build:lib": "rm -rf lib/ && dts-bundle-generator src/routes/index.ts --project tsconfig.build.lib.json -o lib/routes/index.d.ts",
62
60
  "lint": "eslint --ext .ts src",
63
61
  "lint:report": "pnpm lint --format json --output-file report.json",
64
62
  "dev": "rm -rf build/ && nodemon",
65
63
  "start": "NODE_ENV=production node .",
66
- "test:only": "NODE_OPTIONS=\"--experimental-vm-modules --max_old_space_size=4096\" jest --logHeapUsage",
67
- "test": "pnpm build:test && pnpm test:only && pnpm build:lib && pnpm test:types",
68
- "test:ci": "pnpm test:only --coverage --silent",
64
+ "test": "vitest && pnpm build:lib && pnpm test:types",
69
65
  "test:types": "tsc -p tsconfig.test.types.json",
70
66
  "cli": "node ./build/cli/index.js"
71
67
  }