@logto/cloud 0.2.5-71b7fea → 0.2.5-7a187bb

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