@logto/cloud 0.2.5-4ef0b45 → 0.2.5-4f7a3b5

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