@logto/cloud 0.2.5-5a698db → 0.2.5-6c090b2

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 +299 -79
  2. package/package.json +13 -17
@@ -1,11 +1,13 @@
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
  };
@@ -17,35 +19,91 @@ declare enum VerificationCodeType {
17
19
  /** @deprecated Use `Generic` type template for sending test sms/email use case */
18
20
  Test = "Test"
19
21
  }
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
+ declare enum LogtoJwtTokenPath {
41
+ AccessToken = "access-token",
42
+ ClientCredentials = "client-credentials"
43
+ }
44
+ /**
45
+ * The simplified organization role entity that is returned in the `roles` field
46
+ * of the organization.
47
+ */
48
+ export type OrganizationRoleEntity = {
49
+ id: string;
50
+ name: string;
51
+ };
20
52
  declare enum TenantTag {
21
53
  Development = "development",
22
- Staging = "staging",
23
54
  Production = "production"
24
55
  }
25
- declare const AffiliateProperties: import("@withtyped/server/model").default<"affiliate_properties", {
56
+ declare enum TenantRole {
57
+ /** Admin of the tenant, who has all permissions. */
58
+ Admin = "admin",
59
+ /** Collaborator of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
60
+ Collaborator = "collaborator"
61
+ }
62
+ declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
26
63
  createdAt: Date;
27
64
  affiliateId: string;
28
65
  type: "hostname" | "query";
29
66
  value: string;
30
67
  }, "createdAt", "createdAt">;
31
68
  export type AffiliateProperty = InferModelType<typeof AffiliateProperties>;
32
- declare const Affiliates: import("@withtyped/server/model").default<"affiliates", {
33
- id: string;
34
- createdAt: Date;
69
+ declare const Affiliates: import("@withtyped/server/lib/model/index.js").default<"affiliates", {
35
70
  name: string;
36
- }, "createdAt" | "id", "createdAt" | "id">;
71
+ createdAt: Date;
72
+ id: string;
73
+ }, "id" | "createdAt", "id" | "createdAt">;
37
74
  export type Affiliate = InferModelType<typeof Affiliates>;
38
75
  export type AffiliateData = Affiliate & {
39
76
  properties: Array<Pick<AffiliateProperty, "type" | "value">>;
40
77
  };
41
- 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<{
42
- options: {};
78
+ declare const router: import("@withtyped/server").Router<RequestContext, WithAuthContext<Omit<import("@withtyped/server").BaseContext & {
79
+ request: {
80
+ method?: import("@withtyped/server").RequestMethod | undefined;
81
+ headers: import("http").IncomingHttpHeaders;
82
+ url: URL;
83
+ body?: unknown;
84
+ };
85
+ }, "request"> & {
86
+ request: Record<string, unknown> & {
87
+ method?: import("@withtyped/server").RequestMethod | undefined;
88
+ headers: import("http").IncomingHttpHeaders;
89
+ url: URL;
90
+ body?: unknown;
91
+ } & {
92
+ body?: Json | undefined;
93
+ bodyRaw?: Buffer | undefined;
94
+ };
95
+ }>, 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<{
43
96
  patch: {
44
97
  "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
45
98
  name?: string | undefined;
46
99
  }, {
47
100
  id: string;
48
101
  name: string;
102
+ usage: {
103
+ activeUsers: number;
104
+ cost: number;
105
+ tokenUsage: number;
106
+ };
49
107
  indicator: string;
50
108
  isSuspended: boolean;
51
109
  planId: string;
@@ -55,15 +113,10 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
55
113
  currentPeriodStart: Date;
56
114
  currentPeriodEnd: Date;
57
115
  };
58
- tag: TenantTag;
59
- usage: {
60
- activeUsers: number;
61
- cost: number;
62
- };
63
116
  openInvoices: {
64
117
  status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
65
- createdAt: Date;
66
118
  id: string;
119
+ createdAt: Date;
67
120
  updatedAt: Date;
68
121
  customerId: string | null;
69
122
  billingReason: string | null;
@@ -75,12 +128,19 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
75
128
  hostedInvoiceUrl: string | null;
76
129
  invoicePdf: string | null;
77
130
  }[];
131
+ tag: TenantTag;
78
132
  }>;
79
133
  };
134
+ options: {};
80
135
  get: {
81
136
  "/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
82
137
  id: string;
83
138
  name: string;
139
+ usage: {
140
+ activeUsers: number;
141
+ cost: number;
142
+ tokenUsage: number;
143
+ };
84
144
  indicator: string;
85
145
  isSuspended: boolean;
86
146
  planId: string;
@@ -90,15 +150,10 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
90
150
  currentPeriodStart: Date;
91
151
  currentPeriodEnd: Date;
92
152
  };
93
- tag: TenantTag;
94
- usage: {
95
- activeUsers: number;
96
- cost: number;
97
- };
98
153
  openInvoices: {
99
154
  status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
100
- createdAt: Date;
101
155
  id: string;
156
+ createdAt: Date;
102
157
  updatedAt: Date;
103
158
  customerId: string | null;
104
159
  billingReason: string | null;
@@ -110,6 +165,7 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
110
165
  hostedInvoiceUrl: string | null;
111
166
  invoicePdf: string | null;
112
167
  }[];
168
+ tag: TenantTag;
113
169
  }[]>;
114
170
  };
115
171
  post: {
@@ -119,6 +175,11 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
119
175
  }, {
120
176
  id: string;
121
177
  name: string;
178
+ usage: {
179
+ activeUsers: number;
180
+ cost: number;
181
+ tokenUsage: number;
182
+ };
122
183
  indicator: string;
123
184
  isSuspended: boolean;
124
185
  planId: string;
@@ -128,15 +189,10 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
128
189
  currentPeriodStart: Date;
129
190
  currentPeriodEnd: Date;
130
191
  };
131
- tag: TenantTag;
132
- usage: {
133
- activeUsers: number;
134
- cost: number;
135
- };
136
192
  openInvoices: {
137
193
  status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
138
- createdAt: Date;
139
194
  id: string;
195
+ createdAt: Date;
140
196
  updatedAt: Date;
141
197
  customerId: string | null;
142
198
  billingReason: string | null;
@@ -148,6 +204,7 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
148
204
  hostedInvoiceUrl: string | null;
149
205
  invoicePdf: string | null;
150
206
  }[];
207
+ tag: TenantTag;
151
208
  }>;
152
209
  };
153
210
  put: {};
@@ -157,8 +214,8 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
157
214
  copy: {};
158
215
  head: {};
159
216
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
160
- options: {};
161
217
  patch: {};
218
+ options: {};
162
219
  get: {
163
220
  "/tenants/my/subscription": import("@withtyped/server").PathGuard<"/my/subscription", unknown, unknown, {
164
221
  status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
@@ -177,8 +234,8 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
177
234
  "/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
178
235
  invoices: {
179
236
  status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
180
- createdAt: Date;
181
237
  id: string;
238
+ createdAt: Date;
182
239
  updatedAt: Date;
183
240
  customerId: string | null;
184
241
  billingReason: string | null;
@@ -200,6 +257,7 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
200
257
  "/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
201
258
  activeUsers: number;
202
259
  cost: number;
260
+ tokenUsage: number;
203
261
  }>;
204
262
  };
205
263
  post: {
@@ -216,8 +274,8 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
216
274
  copy: {};
217
275
  head: {};
218
276
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
219
- options: {};
220
277
  patch: {};
278
+ options: {};
221
279
  get: {
222
280
  "/services/mails/usage": import("@withtyped/server").PathGuard<"/mails/usage", {
223
281
  from?: string | undefined;
@@ -228,9 +286,11 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
228
286
  post: {
229
287
  "/services/mails": import("@withtyped/server").PathGuard<"/mails", unknown, {
230
288
  data: {
231
- type: VerificationCodeType;
289
+ type: TemplateType | VerificationCodeType;
232
290
  payload: {
233
- code: string;
291
+ code?: string | undefined;
292
+ link?: string | undefined;
293
+ } & Record<string, string> & {
234
294
  senderName?: string | undefined;
235
295
  companyInformation?: string | undefined;
236
296
  appLogo?: string | undefined;
@@ -241,28 +301,56 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
241
301
  } & {
242
302
  "/services/send-sms": import("@withtyped/server").PathGuard<"/send-sms", unknown, {
243
303
  data: {
244
- type: VerificationCodeType;
304
+ type: TemplateType | VerificationCodeType;
245
305
  to: string;
246
306
  payload: {
247
- code: string;
248
- };
307
+ code?: string | undefined;
308
+ link?: string | undefined;
309
+ } & Record<string, string>;
249
310
  };
250
311
  }, unknown>;
312
+ } & {
313
+ "/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", unknown, {
314
+ script: string;
315
+ tokenType: LogtoJwtTokenPath.AccessToken;
316
+ token: Record<string, Json>;
317
+ context: Record<string, Json>;
318
+ envVars?: Record<string, string> | undefined;
319
+ } | {
320
+ script: string;
321
+ tokenType: LogtoJwtTokenPath.ClientCredentials;
322
+ token: Record<string, Json>;
323
+ envVars?: Record<string, string> | undefined;
324
+ }, Record<string, unknown>>;
251
325
  };
252
326
  put: {};
253
327
  delete: {};
254
328
  copy: {};
255
329
  head: {};
256
330
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
257
- options: {};
258
331
  patch: {};
332
+ options: {};
259
333
  get: {
260
334
  "/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
261
- createdAt: Date;
262
335
  id: string;
336
+ createdAt: Date;
263
337
  name: string;
338
+ updatedAt: Date;
339
+ stripeProducts: {
340
+ type: "flat" | "tier1" | "tier2" | "tier3";
341
+ id: string;
342
+ name: string;
343
+ price: {
344
+ id: string;
345
+ unitAmountDecimal: string;
346
+ quantity?: 1 | undefined;
347
+ unitAmount?: number | null | undefined;
348
+ };
349
+ description?: string | undefined;
350
+ }[];
264
351
  quota: {
265
352
  mauLimit: number | null;
353
+ tokenLimit: number | null;
266
354
  applicationsLimit: number | null;
267
355
  machineToMachineLimit: number | null;
268
356
  resourcesLimit: number | null;
@@ -273,26 +361,15 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
273
361
  socialConnectorsLimit: number | null;
274
362
  standardConnectorsLimit: number | null;
275
363
  rolesLimit: number | null;
364
+ machineToMachineRolesLimit: number | null;
276
365
  scopesPerRoleLimit: number | null;
277
366
  hooksLimit: number | null;
278
367
  auditLogsRetentionDays: number | null;
279
368
  mfaEnabled: boolean;
280
369
  organizationsEnabled: boolean;
281
370
  ssoEnabled: boolean;
371
+ thirdPartyApplicationsLimit: number | null;
282
372
  };
283
- stripeProducts: {
284
- type: "flat" | "tier1" | "tier2" | "tier3";
285
- id: string;
286
- name: string;
287
- price: {
288
- id: string;
289
- unitAmountDecimal: string;
290
- quantity?: 1 | undefined;
291
- unitAmount?: number | null | undefined;
292
- };
293
- description?: string | undefined;
294
- }[];
295
- updatedAt: Date;
296
373
  }[]>;
297
374
  };
298
375
  post: {};
@@ -301,33 +378,16 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
301
378
  copy: {};
302
379
  head: {};
303
380
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
304
- options: {};
305
381
  patch: {};
306
- get: {
307
- "/my/tenant": import("@withtyped/server").PathGuard<"/tenant", unknown, unknown, {
308
- name: string;
309
- id: string;
310
- indicator: string;
311
- isSuspended: boolean;
312
- tag: TenantTag;
313
- }>;
314
- };
315
- post: {};
316
- put: {};
317
- delete: {};
318
- copy: {};
319
- head: {};
320
- }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
321
382
  options: {};
322
- patch: {};
323
383
  get: {
324
384
  "/checkout-session/:id": import("@withtyped/server").PathGuard<"/:id", unknown, unknown, {
325
- status: "open" | "complete" | "expired";
326
- createdAt: Date;
327
385
  id: string;
386
+ createdAt: Date;
328
387
  userId: string;
329
- updatedAt: Date;
388
+ status: "open" | "complete" | "expired";
330
389
  tenantId: string | null;
390
+ updatedAt: Date;
331
391
  planId: string;
332
392
  }>;
333
393
  };
@@ -349,8 +409,8 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
349
409
  copy: {};
350
410
  head: {};
351
411
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
352
- options: {};
353
412
  patch: {};
413
+ options: {};
354
414
  get: {
355
415
  "/affiliates": import("@withtyped/server").PathGuard<"/", unknown, unknown, AffiliateData[]>;
356
416
  };
@@ -358,33 +418,33 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
358
418
  "/affiliates": import("@withtyped/server").PathGuard<"/", unknown, {
359
419
  name: string;
360
420
  }, {
361
- createdAt: Date;
362
421
  id: string;
422
+ createdAt: Date;
363
423
  name: string;
364
424
  }>;
365
425
  } & {
366
426
  "/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
367
- value: string;
368
427
  type: "hostname" | "query";
369
- }, {
370
428
  value: string;
371
- type: "hostname" | "query";
429
+ }, {
372
430
  createdAt: Date;
373
431
  affiliateId: string;
432
+ type: "hostname" | "query";
433
+ value: string;
374
434
  }>;
375
435
  };
376
436
  put: {};
377
437
  delete: {
378
438
  "/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
379
- value: string;
380
439
  type: "hostname" | "query";
440
+ value: string;
381
441
  }, unknown>;
382
442
  };
383
443
  copy: {};
384
444
  head: {};
385
445
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
386
- options: {};
387
446
  patch: {};
447
+ options: {};
388
448
  get: {};
389
449
  post: {
390
450
  "/affiliate-logs": import("@withtyped/server").PathGuard<"/", unknown, {
@@ -393,8 +453,8 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
393
453
  hostname?: string | undefined;
394
454
  query?: string | undefined;
395
455
  }, {
396
- createdAt: Date;
397
456
  id: string;
457
+ createdAt: Date;
398
458
  affiliateId: string | null;
399
459
  userId: string;
400
460
  createdVia: {
@@ -408,7 +468,167 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
408
468
  delete: {};
409
469
  copy: {};
410
470
  head: {};
471
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
472
+ patch: {
473
+ "/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:invitationId/status", unknown, {
474
+ status: OrganizationInvitationStatus.Accepted;
475
+ }, unknown>;
476
+ };
477
+ options: {};
478
+ get: {
479
+ "/invitations": import("@withtyped/server").PathGuard<"/", unknown, unknown, ({
480
+ id: string;
481
+ createdAt: number;
482
+ status: OrganizationInvitationStatus;
483
+ tenantId: string;
484
+ updatedAt: number;
485
+ organizationId: string;
486
+ inviterId: string | null;
487
+ invitee: string;
488
+ expiresAt: number;
489
+ acceptedUserId: string | null;
490
+ organizationRoles: OrganizationRoleEntity[];
491
+ } & {
492
+ tenantTag: TenantTag;
493
+ tenantName: string;
494
+ })[]>;
495
+ } & {
496
+ "/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:invitationId", unknown, unknown, {
497
+ id: string;
498
+ createdAt: number;
499
+ status: OrganizationInvitationStatus;
500
+ tenantId: string;
501
+ updatedAt: number;
502
+ organizationId: string;
503
+ inviterId: string | null;
504
+ invitee: string;
505
+ expiresAt: number;
506
+ acceptedUserId: string | null;
507
+ organizationRoles: OrganizationRoleEntity[];
508
+ }>;
509
+ };
510
+ post: {};
511
+ put: {};
512
+ delete: {};
513
+ copy: {};
514
+ head: {};
411
515
  }, "/api">>, "/api">;
516
+ export declare const tenantAuthRouter: import("@withtyped/server").Router<RequestContext, import("@withtyped/server").WithBodyContext<import("@withtyped/server").BaseContext & {
517
+ request: {
518
+ method?: import("@withtyped/server").RequestMethod | undefined;
519
+ headers: import("http").IncomingHttpHeaders;
520
+ url: URL;
521
+ body?: unknown;
522
+ };
523
+ }>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
524
+ patch: {
525
+ "/:tenantId/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/status", unknown, {
526
+ status: OrganizationInvitationStatus.Revoked;
527
+ }, {
528
+ id: string;
529
+ createdAt: number;
530
+ status: OrganizationInvitationStatus;
531
+ tenantId: string;
532
+ updatedAt: number;
533
+ organizationId: string;
534
+ inviterId: string | null;
535
+ invitee: string;
536
+ expiresAt: number;
537
+ acceptedUserId: string | null;
538
+ organizationRoles: OrganizationRoleEntity[];
539
+ }>;
540
+ };
541
+ options: {};
542
+ get: {
543
+ "/:tenantId/members": import("@withtyped/server").PathGuard<"/:tenantId/members", unknown, unknown, {
544
+ id: string;
545
+ name: string | null;
546
+ username: string | null;
547
+ primaryEmail: string | null;
548
+ primaryPhone: string | null;
549
+ avatar: string | null;
550
+ organizationRoles: OrganizationRoleEntity[];
551
+ }[]>;
552
+ } & {
553
+ "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, unknown, ({
554
+ id: string;
555
+ createdAt: number;
556
+ status: OrganizationInvitationStatus;
557
+ tenantId: string;
558
+ updatedAt: number;
559
+ organizationId: string;
560
+ inviterId: string | null;
561
+ invitee: string;
562
+ expiresAt: number;
563
+ acceptedUserId: string | null;
564
+ organizationRoles: OrganizationRoleEntity[];
565
+ } & {
566
+ inviterName?: string | undefined;
567
+ })[]>;
568
+ };
569
+ post: {
570
+ "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
571
+ invitee: string;
572
+ roleName: TenantRole;
573
+ expiresAt?: number | undefined;
574
+ }, {
575
+ id: string;
576
+ createdAt: number;
577
+ status: OrganizationInvitationStatus;
578
+ tenantId: string;
579
+ updatedAt: number;
580
+ organizationId: string;
581
+ inviterId: string | null;
582
+ invitee: string;
583
+ expiresAt: number;
584
+ acceptedUserId: string | null;
585
+ organizationRoles: OrganizationRoleEntity[];
586
+ }>;
587
+ } & {
588
+ "/:tenantId/invitations/:invitationId/message": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/message", unknown, unknown, unknown>;
589
+ };
590
+ put: {
591
+ "/:tenantId/members/:userId/roles": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/roles", unknown, {
592
+ roleName: TenantRole;
593
+ }, unknown>;
594
+ };
595
+ delete: {
596
+ "/:tenantId/members/:userId": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId", unknown, unknown, unknown>;
597
+ } & {
598
+ "/:tenantId/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId", unknown, unknown, unknown>;
599
+ };
600
+ copy: {};
601
+ head: {};
602
+ }, "/api/tenants">>, "/api/tenants">;
603
+ export declare const functionsRouter: import("@withtyped/server").Router<RequestContext, WithAuthContext<Omit<import("@withtyped/server").BaseContext & {
604
+ request: {
605
+ method?: import("@withtyped/server").RequestMethod | undefined;
606
+ headers: import("http").IncomingHttpHeaders;
607
+ url: URL;
608
+ body?: unknown;
609
+ };
610
+ }, "request"> & {
611
+ request: Record<string, unknown> & {
612
+ method?: import("@withtyped/server").RequestMethod | undefined;
613
+ headers: import("http").IncomingHttpHeaders;
614
+ url: URL;
615
+ body?: unknown;
616
+ } & {
617
+ body?: Json | undefined;
618
+ bodyRaw?: Buffer | undefined;
619
+ };
620
+ }>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
621
+ patch: {};
622
+ options: {};
623
+ get: {};
624
+ post: {
625
+ "/database-alteration": import("@withtyped/server").PathGuard<"/database-alteration", unknown, Json, unknown>;
626
+ };
627
+ put: {};
628
+ delete: {};
629
+ copy: {};
630
+ head: {};
631
+ }, "/functions">>, "/functions">;
412
632
 
413
633
  export {
414
634
  router as default,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/cloud",
3
- "version": "0.2.5-5a698db",
3
+ "version": "0.2.5-6c090b2",
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": "5.0.0",
20
+ "@silverhand/ts-config": "5.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",
26
+ "dts-bundle-generator": "^9.3.1",
29
27
  "eslint": "^8.44.0",
30
- "jest": "^29.5.0",
31
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": "^4.3.1",
33
+ "vitest": "^1.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.5",
54
- "@withtyped/server": "^0.12.7"
52
+ "@silverhand/essentials": "^2.9.0",
53
+ "@withtyped/server": "^0.13.3"
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
  }