@logto/cloud 0.2.5-faca9a9 → 0.2.5-fd61498

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 (3) hide show
  1. package/README.md +63 -0
  2. package/lib/routes/index.d.ts +1500 -141
  3. package/package.json +19 -18
@@ -1,22 +1,42 @@
1
- // Generated by dts-bundle-generator v9.0.0
1
+ // Generated by dts-bundle-generator v9.3.1
2
2
 
3
- import { RequestContext } from '@withtyped/server';
4
- import { InferModelType } from '@withtyped/server/model';
3
+ import { Json, JsonObject, RequestContext } from '@withtyped/server';
5
4
 
5
+ declare const router: import("@withtyped/server").Router<import("@withtyped/server").RequestContext, import("@withtyped/server").RequestContext, import("@withtyped/server").MergeRoutes<{
6
+ options: {};
7
+ patch: {};
8
+ get: {
9
+ "/api/status": import("@withtyped/server").PathGuard<"/status", unknown, unknown, unknown>;
10
+ } & {
11
+ "/api/teapot": import("@withtyped/server").PathGuard<"/teapot", unknown, unknown, {
12
+ message: string;
13
+ }>;
14
+ };
15
+ post: {};
16
+ put: {};
17
+ delete: {};
18
+ copy: {};
19
+ head: {};
20
+ }, import("@withtyped/server").RoutesWithPrefix<{
21
+ options: {};
22
+ patch: {};
23
+ get: {};
24
+ post: {
25
+ "/invitations/:invitationId/auth": import("@withtyped/server").PathGuard<"/:invitationId/auth", unknown, unknown, unknown>;
26
+ };
27
+ put: {};
28
+ delete: {};
29
+ copy: {};
30
+ head: {};
31
+ }, "/api">>, "/api">;
6
32
  export type WithAuthContext<Context = RequestContext> = Context & {
7
33
  auth: {
34
+ /** The ID of the authenticated subject (`sub`). */
8
35
  id: string;
36
+ /** The scopes that the subject has (`scope`). */
9
37
  scopes: string[];
10
38
  };
11
39
  };
12
- declare enum VerificationCodeType {
13
- SignIn = "SignIn",
14
- Register = "Register",
15
- ForgotPassword = "ForgotPassword",
16
- Generic = "Generic",
17
- /** @deprecated Use `Generic` type template for sending test sms/email use case */
18
- Test = "Test"
19
- }
20
40
  declare enum TemplateType {
21
41
  /** The template for sending verification code when user is signing in. */
22
42
  SignIn = "SignIn",
@@ -27,29 +47,118 @@ declare enum TemplateType {
27
47
  /** The template for sending organization invitation. */
28
48
  OrganizationInvitation = "OrganizationInvitation",
29
49
  /** The template for generic usage. */
30
- Generic = "Generic"
50
+ Generic = "Generic",
51
+ /** The template for validating user permission for sensitive operations. */
52
+ UserPermissionValidation = "UserPermissionValidation",
53
+ /** The template for binding a new identifier to an existing account. */
54
+ BindNewIdentifier = "BindNewIdentifier",
55
+ /** The template for sending MFA verification code. */
56
+ MfaVerification = "MfaVerification",
57
+ /** The template for binding MFA verification. */
58
+ BindMfa = "BindMfa"
31
59
  }
32
- declare enum TenantTag {
33
- Development = "development",
34
- Production = "production"
60
+ declare enum OrganizationInvitationStatus {
61
+ Pending = "Pending",
62
+ Accepted = "Accepted",
63
+ Expired = "Expired",
64
+ Revoked = "Revoked"
35
65
  }
36
- declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
37
- createdAt: Date;
38
- affiliateId: string;
39
- type: "hostname" | "query";
40
- value: string;
41
- }, "createdAt", "createdAt">;
42
- export type AffiliateProperty = InferModelType<typeof AffiliateProperties>;
43
- declare const Affiliates: import("@withtyped/server/lib/model/index.js").default<"affiliates", {
66
+ /** The scopes (permissions) defined by the organization template. */
67
+ export type OrganizationScope = {
68
+ tenantId: string;
69
+ /** The globally unique identifier of the organization scope. */
44
70
  id: string;
45
- createdAt: Date;
71
+ /** The organization scope's name, unique within the organization template. */
46
72
  name: string;
47
- }, "createdAt" | "id", "createdAt" | "id">;
48
- export type Affiliate = InferModelType<typeof Affiliates>;
49
- export type AffiliateData = Affiliate & {
50
- properties: Array<Pick<AffiliateProperty, "type" | "value">>;
73
+ /** A brief description of the organization scope. */
74
+ description: string | null;
51
75
  };
52
- 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<{
76
+ declare enum LogtoJwtTokenKeyType {
77
+ AccessToken = "access-token",
78
+ ClientCredentials = "client-credentials"
79
+ }
80
+ /**
81
+ * The simplified organization role entity that is returned in the `roles` field
82
+ * of the organization.
83
+ */
84
+ export type OrganizationRoleEntity = {
85
+ id: string;
86
+ name: string;
87
+ };
88
+ declare enum TenantTag {
89
+ Development = "development",
90
+ Production = "production"
91
+ }
92
+ declare enum TenantRole {
93
+ /** Admin of the tenant, who has all permissions. */
94
+ Admin = "admin",
95
+ /** Collaborator of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
96
+ Collaborator = "collaborator"
97
+ }
98
+ declare const availableReportableUsageKeys: readonly [
99
+ "tokenLimit",
100
+ "mauLimit",
101
+ "machineToMachineLimit",
102
+ "resourcesLimit",
103
+ "enterpriseSsoLimit",
104
+ "hooksLimit",
105
+ "tenantMembersLimit",
106
+ "mfaEnabled",
107
+ "organizationsEnabled",
108
+ "organizationsLimit",
109
+ "securityFeaturesEnabled",
110
+ "userRolesLimit",
111
+ "machineToMachineRolesLimit",
112
+ "thirdPartyApplicationsLimit",
113
+ "samlApplicationsLimit",
114
+ "customDomainsLimit"
115
+ ];
116
+ export type ReportableUsageKey = (typeof availableReportableUsageKeys)[number];
117
+ export type RealtimeReportableUsageKey = Exclude<ReportableUsageKey, "tokenLimit" | "mauLimit">;
118
+ declare enum LogtoSkuType {
119
+ Basic = "Basic",
120
+ AddOn = "AddOn"
121
+ }
122
+ declare enum UsageReportingType {
123
+ TokenUsage = "tokenUsage",
124
+ MauUsageWithM2MTokens = "mauUsageWithM2MTokens"
125
+ }
126
+ declare enum DatabaseRegionAccessRole {
127
+ /** Instance administrator - can manage collaborators and create tenants */
128
+ Admin = "admin",
129
+ /** Collaborator user - can only create tenants in the instance */
130
+ Collaborator = "collaborator"
131
+ }
132
+ declare enum QuotaScope {
133
+ /**
134
+ * Shared quota across multiple regions or tenants under the same enterprise.
135
+ */
136
+ Shared = "shared",
137
+ /**
138
+ * Tenant level dedicated quota.
139
+ */
140
+ Dedicated = "dedicated"
141
+ }
142
+ declare const router$1: import("@withtyped/server").Router<RequestContext, WithAuthContext<Omit<import("@withtyped/server").BaseContext & {
143
+ request: {
144
+ id?: string | undefined;
145
+ method?: import("@withtyped/server").RequestMethod | undefined;
146
+ headers: import("http").IncomingHttpHeaders;
147
+ url: URL;
148
+ body?: unknown;
149
+ };
150
+ }, "request"> & {
151
+ request: Record<string, unknown> & {
152
+ id?: string | undefined;
153
+ method?: import("@withtyped/server").RequestMethod | undefined;
154
+ headers: import("http").IncomingHttpHeaders;
155
+ url: URL;
156
+ body?: unknown;
157
+ } & {
158
+ body?: Json | undefined;
159
+ bodyRaw?: Buffer | undefined;
160
+ };
161
+ }>, 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").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
53
162
  options: {};
54
163
  patch: {
55
164
  "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
@@ -57,10 +166,16 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
57
166
  }, {
58
167
  id: string;
59
168
  name: string;
169
+ createdAt: Date;
170
+ quota: {
171
+ mauLimit: number | null;
172
+ tokenLimit: number | null;
173
+ };
60
174
  usage: {
61
- activeUsers: number;
62
- cost: number;
175
+ userTokenUsage: number;
176
+ m2mTokenUsage: number;
63
177
  tokenUsage: number;
178
+ activeUsers: number;
64
179
  };
65
180
  indicator: string;
66
181
  isSuspended: boolean;
@@ -70,12 +185,22 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
70
185
  planId: string;
71
186
  currentPeriodStart: Date;
72
187
  currentPeriodEnd: Date;
188
+ isEnterprisePlan: boolean;
189
+ quotaScope: "dedicated" | "shared";
190
+ id?: string | undefined;
191
+ upcomingInvoice?: {
192
+ subtotal: number;
193
+ subtotalExcludingTax: number | null;
194
+ total: number;
195
+ totalExcludingTax: number | null;
196
+ } | null | undefined;
73
197
  };
198
+ regionName: string;
74
199
  tag: TenantTag;
75
200
  openInvoices: {
76
- status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
77
- createdAt: Date;
78
201
  id: string;
202
+ createdAt: Date;
203
+ status: "open" | "void" | "draft" | "paid" | "uncollectible" | null;
79
204
  updatedAt: Date;
80
205
  customerId: string | null;
81
206
  billingReason: string | null;
@@ -83,20 +208,32 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
83
208
  periodEnd: Date;
84
209
  amountDue: number;
85
210
  amountPaid: number;
211
+ basicSkuId: string | null;
86
212
  subscriptionId: string | null;
87
213
  hostedInvoiceUrl: string | null;
88
214
  invoicePdf: string | null;
215
+ collectionMethod: "charge_automatically" | "send_invoice" | null;
216
+ dueDate: Date | null;
89
217
  }[];
218
+ featureFlags?: {
219
+ isMultipleCustomDomainsEnabled?: boolean | undefined;
220
+ } | undefined;
90
221
  }>;
91
222
  };
92
223
  get: {
93
224
  "/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
94
225
  id: string;
95
226
  name: string;
227
+ createdAt: Date;
228
+ quota: {
229
+ mauLimit: number | null;
230
+ tokenLimit: number | null;
231
+ };
96
232
  usage: {
97
- activeUsers: number;
98
- cost: number;
233
+ userTokenUsage: number;
234
+ m2mTokenUsage: number;
99
235
  tokenUsage: number;
236
+ activeUsers: number;
100
237
  };
101
238
  indicator: string;
102
239
  isSuspended: boolean;
@@ -106,12 +243,22 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
106
243
  planId: string;
107
244
  currentPeriodStart: Date;
108
245
  currentPeriodEnd: Date;
246
+ isEnterprisePlan: boolean;
247
+ quotaScope: "dedicated" | "shared";
248
+ id?: string | undefined;
249
+ upcomingInvoice?: {
250
+ subtotal: number;
251
+ subtotalExcludingTax: number | null;
252
+ total: number;
253
+ totalExcludingTax: number | null;
254
+ } | null | undefined;
109
255
  };
256
+ regionName: string;
110
257
  tag: TenantTag;
111
258
  openInvoices: {
112
- status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
113
- createdAt: Date;
114
259
  id: string;
260
+ createdAt: Date;
261
+ status: "open" | "void" | "draft" | "paid" | "uncollectible" | null;
115
262
  updatedAt: Date;
116
263
  customerId: string | null;
117
264
  billingReason: string | null;
@@ -119,23 +266,37 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
119
266
  periodEnd: Date;
120
267
  amountDue: number;
121
268
  amountPaid: number;
269
+ basicSkuId: string | null;
122
270
  subscriptionId: string | null;
123
271
  hostedInvoiceUrl: string | null;
124
272
  invoicePdf: string | null;
273
+ collectionMethod: "charge_automatically" | "send_invoice" | null;
274
+ dueDate: Date | null;
125
275
  }[];
276
+ featureFlags?: {
277
+ isMultipleCustomDomainsEnabled?: boolean | undefined;
278
+ } | undefined;
126
279
  }[]>;
127
280
  };
128
281
  post: {
129
282
  "/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
283
+ id?: string | undefined;
130
284
  name?: string | undefined;
285
+ regionName?: string | undefined;
131
286
  tag?: TenantTag | undefined;
132
287
  }, {
133
288
  id: string;
134
289
  name: string;
290
+ createdAt: Date;
291
+ quota: {
292
+ mauLimit: number | null;
293
+ tokenLimit: number | null;
294
+ };
135
295
  usage: {
136
- activeUsers: number;
137
- cost: number;
296
+ userTokenUsage: number;
297
+ m2mTokenUsage: number;
138
298
  tokenUsage: number;
299
+ activeUsers: number;
139
300
  };
140
301
  indicator: string;
141
302
  isSuspended: boolean;
@@ -145,12 +306,22 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
145
306
  planId: string;
146
307
  currentPeriodStart: Date;
147
308
  currentPeriodEnd: Date;
309
+ isEnterprisePlan: boolean;
310
+ quotaScope: "dedicated" | "shared";
311
+ id?: string | undefined;
312
+ upcomingInvoice?: {
313
+ subtotal: number;
314
+ subtotalExcludingTax: number | null;
315
+ total: number;
316
+ totalExcludingTax: number | null;
317
+ } | null | undefined;
148
318
  };
319
+ regionName: string;
149
320
  tag: TenantTag;
150
321
  openInvoices: {
151
- status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
152
- createdAt: Date;
153
322
  id: string;
323
+ createdAt: Date;
324
+ status: "open" | "void" | "draft" | "paid" | "uncollectible" | null;
154
325
  updatedAt: Date;
155
326
  customerId: string | null;
156
327
  billingReason: string | null;
@@ -158,11 +329,35 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
158
329
  periodEnd: Date;
159
330
  amountDue: number;
160
331
  amountPaid: number;
332
+ basicSkuId: string | null;
161
333
  subscriptionId: string | null;
162
334
  hostedInvoiceUrl: string | null;
163
335
  invoicePdf: string | null;
336
+ collectionMethod: "charge_automatically" | "send_invoice" | null;
337
+ dueDate: Date | null;
164
338
  }[];
339
+ defaultApplication: {
340
+ id: string;
341
+ secret: string;
342
+ };
343
+ featureFlags?: {
344
+ isMultipleCustomDomainsEnabled?: boolean | undefined;
345
+ } | undefined;
165
346
  }>;
347
+ } & {
348
+ "/tenants/subscriptions/plan": import("@withtyped/server").PathGuard<"/subscriptions/plan", unknown, {
349
+ tenantIds: string[];
350
+ planId: string;
351
+ }, {
352
+ tenantId: string;
353
+ success: boolean;
354
+ error?: string | undefined;
355
+ updatedLineItems?: unknown[] | undefined;
356
+ }[]>;
357
+ } & {
358
+ "/tenants/unsuspend": import("@withtyped/server").PathGuard<"/unsuspend", unknown, {
359
+ tenantId: string;
360
+ }, unknown>;
166
361
  };
167
362
  put: {};
168
363
  delete: {
@@ -176,23 +371,394 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
176
371
  get: {
177
372
  "/tenants/my/subscription": import("@withtyped/server").PathGuard<"/my/subscription", unknown, unknown, {
178
373
  status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
374
+ quotaScope: "dedicated" | "shared";
375
+ quota: {
376
+ auditLogsRetentionDays: number | null;
377
+ subjectTokenEnabled: boolean;
378
+ hostedEmailLimit: number | null;
379
+ hostedEmailDailyLimit: number | null;
380
+ mauLimit: number | null;
381
+ applicationsLimit: number | null;
382
+ thirdPartyApplicationsLimit: number | null;
383
+ scopesPerResourceLimit: number | null;
384
+ socialConnectorsLimit: number | null;
385
+ userRolesLimit: number | null;
386
+ machineToMachineRolesLimit: number | null;
387
+ scopesPerRoleLimit: number | null;
388
+ hooksLimit: number | null;
389
+ customJwtEnabled: boolean;
390
+ inlineHooksEnabled: boolean;
391
+ bringYourUiEnabled: boolean;
392
+ collectUserProfileEnabled: boolean;
393
+ passkeySignInEnabled: boolean;
394
+ tokenLimit: number | null;
395
+ machineToMachineLimit: number | null;
396
+ resourcesLimit: number | null;
397
+ enterpriseSsoLimit: number | null;
398
+ tenantMembersLimit: number | null;
399
+ mfaEnabled: boolean;
400
+ organizationsEnabled: boolean;
401
+ organizationsLimit: number | null;
402
+ securityFeaturesEnabled: boolean;
403
+ idpInitiatedSsoEnabled: boolean;
404
+ samlApplicationsLimit: number | null;
405
+ customDomainsLimit: number | null;
406
+ };
179
407
  planId: string;
180
408
  currentPeriodStart: Date;
181
409
  currentPeriodEnd: Date;
410
+ isEnterprisePlan: boolean;
411
+ systemLimit: {
412
+ applicationsLimit?: number | undefined;
413
+ thirdPartyApplicationsLimit?: number | undefined;
414
+ scopesPerResourceLimit?: number | undefined;
415
+ socialConnectorsLimit?: number | undefined;
416
+ userRolesLimit?: number | undefined;
417
+ machineToMachineRolesLimit?: number | undefined;
418
+ scopesPerRoleLimit?: number | undefined;
419
+ hooksLimit?: number | undefined;
420
+ machineToMachineLimit?: number | undefined;
421
+ resourcesLimit?: number | undefined;
422
+ enterpriseSsoLimit?: number | undefined;
423
+ tenantMembersLimit?: number | undefined;
424
+ organizationsLimit?: number | undefined;
425
+ samlApplicationsLimit?: number | undefined;
426
+ customDomainsLimit?: number | undefined;
427
+ usersPerOrganizationLimit?: number | undefined;
428
+ organizationUserRolesLimit?: number | undefined;
429
+ organizationMachineToMachineRolesLimit?: number | undefined;
430
+ organizationScopesLimit?: number | undefined;
431
+ };
432
+ id?: string | undefined;
433
+ upcomingInvoice?: {
434
+ subtotal: number;
435
+ subtotalExcludingTax: number | null;
436
+ total: number;
437
+ totalExcludingTax: number | null;
438
+ } | null | undefined;
182
439
  }>;
183
440
  } & {
441
+ "/tenants/my/subscription-usage": import("@withtyped/server").PathGuard<"/my/subscription-usage", unknown, unknown, {
442
+ quota: {
443
+ auditLogsRetentionDays: number | null;
444
+ subjectTokenEnabled: boolean;
445
+ hostedEmailLimit: number | null;
446
+ hostedEmailDailyLimit: number | null;
447
+ mauLimit: number | null;
448
+ applicationsLimit: number | null;
449
+ thirdPartyApplicationsLimit: number | null;
450
+ scopesPerResourceLimit: number | null;
451
+ socialConnectorsLimit: number | null;
452
+ userRolesLimit: number | null;
453
+ machineToMachineRolesLimit: number | null;
454
+ scopesPerRoleLimit: number | null;
455
+ hooksLimit: number | null;
456
+ customJwtEnabled: boolean;
457
+ inlineHooksEnabled: boolean;
458
+ bringYourUiEnabled: boolean;
459
+ collectUserProfileEnabled: boolean;
460
+ passkeySignInEnabled: boolean;
461
+ tokenLimit: number | null;
462
+ machineToMachineLimit: number | null;
463
+ resourcesLimit: number | null;
464
+ enterpriseSsoLimit: number | null;
465
+ tenantMembersLimit: number | null;
466
+ mfaEnabled: boolean;
467
+ organizationsEnabled: boolean;
468
+ organizationsLimit: number | null;
469
+ securityFeaturesEnabled: boolean;
470
+ idpInitiatedSsoEnabled: boolean;
471
+ samlApplicationsLimit: number | null;
472
+ customDomainsLimit: number | null;
473
+ };
474
+ usage: {
475
+ applicationsLimit: number;
476
+ thirdPartyApplicationsLimit: number;
477
+ scopesPerResourceLimit: number;
478
+ socialConnectorsLimit: number;
479
+ userRolesLimit: number;
480
+ machineToMachineRolesLimit: number;
481
+ scopesPerRoleLimit: number;
482
+ hooksLimit: number;
483
+ customJwtEnabled: boolean;
484
+ inlineHooksEnabled: boolean;
485
+ bringYourUiEnabled: boolean;
486
+ collectUserProfileEnabled: boolean;
487
+ passkeySignInEnabled: boolean;
488
+ machineToMachineLimit: number;
489
+ resourcesLimit: number;
490
+ enterpriseSsoLimit: number;
491
+ tenantMembersLimit: number;
492
+ mfaEnabled: boolean;
493
+ organizationsEnabled: boolean;
494
+ organizationsLimit: number;
495
+ securityFeaturesEnabled: boolean;
496
+ idpInitiatedSsoEnabled: boolean;
497
+ samlApplicationsLimit: number;
498
+ customDomainsLimit: number;
499
+ };
500
+ basicQuota: {
501
+ auditLogsRetentionDays: number | null;
502
+ subjectTokenEnabled: boolean;
503
+ hostedEmailLimit: number | null;
504
+ hostedEmailDailyLimit: number | null;
505
+ mauLimit: number | null;
506
+ applicationsLimit: number | null;
507
+ thirdPartyApplicationsLimit: number | null;
508
+ scopesPerResourceLimit: number | null;
509
+ socialConnectorsLimit: number | null;
510
+ userRolesLimit: number | null;
511
+ machineToMachineRolesLimit: number | null;
512
+ scopesPerRoleLimit: number | null;
513
+ hooksLimit: number | null;
514
+ customJwtEnabled: boolean;
515
+ inlineHooksEnabled: boolean;
516
+ bringYourUiEnabled: boolean;
517
+ collectUserProfileEnabled: boolean;
518
+ passkeySignInEnabled: boolean;
519
+ tokenLimit: number | null;
520
+ machineToMachineLimit: number | null;
521
+ resourcesLimit: number | null;
522
+ enterpriseSsoLimit: number | null;
523
+ tenantMembersLimit: number | null;
524
+ mfaEnabled: boolean;
525
+ organizationsEnabled: boolean;
526
+ organizationsLimit: number | null;
527
+ securityFeaturesEnabled: boolean;
528
+ idpInitiatedSsoEnabled: boolean;
529
+ samlApplicationsLimit: number | null;
530
+ customDomainsLimit: number | null;
531
+ };
532
+ }>;
533
+ };
534
+ post: {
535
+ "/tenants/my/subscription/item-updates": import("@withtyped/server").PathGuard<"/my/subscription/item-updates", unknown, {
536
+ usageKey: RealtimeReportableUsageKey;
537
+ }, {
538
+ message: string;
539
+ }>;
540
+ };
541
+ put: {};
542
+ delete: {};
543
+ copy: {};
544
+ head: {};
545
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
546
+ options: {};
547
+ patch: {};
548
+ get: {};
549
+ post: {
550
+ "/tenants/subscription-cache/invalidate": import("@withtyped/server").PathGuard<"/subscription-cache/invalidate", unknown, {
551
+ tenantIds: string[];
552
+ }, unknown>;
553
+ };
554
+ put: {};
555
+ delete: {};
556
+ copy: {};
557
+ head: {};
558
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
559
+ options: {};
560
+ patch: {};
561
+ get: {};
562
+ post: {
563
+ "/tenants/domains/cleanup": import("@withtyped/server").PathGuard<"/domains/cleanup", unknown, {
564
+ staleDays: number;
565
+ cursor?: string | undefined;
566
+ limit?: number | undefined;
567
+ }, {
568
+ results: ({
569
+ tenantId: string;
570
+ success: true;
571
+ summary: {
572
+ scannedCount: number;
573
+ staleCandidateCount: number;
574
+ deletedCount: number;
575
+ skippedActiveCount: number;
576
+ failedCount: number;
577
+ };
578
+ } | {
579
+ tenantId: string;
580
+ error: string;
581
+ success: false;
582
+ })[];
583
+ nextCursor: string | null;
584
+ }>;
585
+ };
586
+ put: {};
587
+ delete: {};
588
+ copy: {};
589
+ head: {};
590
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
591
+ options: {};
592
+ patch: {};
593
+ get: {
184
594
  "/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
185
595
  status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
186
596
  planId: string;
187
597
  currentPeriodStart: Date;
188
598
  currentPeriodEnd: Date;
599
+ isEnterprisePlan: boolean;
600
+ quotaScope: "dedicated" | "shared";
601
+ id?: string | undefined;
602
+ upcomingInvoice?: {
603
+ subtotal: number;
604
+ subtotalExcludingTax: number | null;
605
+ total: number;
606
+ totalExcludingTax: number | null;
607
+ } | null | undefined;
608
+ }>;
609
+ } & {
610
+ "/tenants/:tenantId/subscription-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription-usage", unknown, unknown, {
611
+ quota: {
612
+ auditLogsRetentionDays: number | null;
613
+ subjectTokenEnabled: boolean;
614
+ hostedEmailLimit: number | null;
615
+ hostedEmailDailyLimit: number | null;
616
+ mauLimit: number | null;
617
+ applicationsLimit: number | null;
618
+ thirdPartyApplicationsLimit: number | null;
619
+ scopesPerResourceLimit: number | null;
620
+ socialConnectorsLimit: number | null;
621
+ userRolesLimit: number | null;
622
+ machineToMachineRolesLimit: number | null;
623
+ scopesPerRoleLimit: number | null;
624
+ hooksLimit: number | null;
625
+ customJwtEnabled: boolean;
626
+ inlineHooksEnabled: boolean;
627
+ bringYourUiEnabled: boolean;
628
+ collectUserProfileEnabled: boolean;
629
+ passkeySignInEnabled: boolean;
630
+ tokenLimit: number | null;
631
+ machineToMachineLimit: number | null;
632
+ resourcesLimit: number | null;
633
+ enterpriseSsoLimit: number | null;
634
+ tenantMembersLimit: number | null;
635
+ mfaEnabled: boolean;
636
+ organizationsEnabled: boolean;
637
+ organizationsLimit: number | null;
638
+ securityFeaturesEnabled: boolean;
639
+ idpInitiatedSsoEnabled: boolean;
640
+ samlApplicationsLimit: number | null;
641
+ customDomainsLimit: number | null;
642
+ };
643
+ usage: {
644
+ applicationsLimit: number;
645
+ thirdPartyApplicationsLimit: number;
646
+ scopesPerResourceLimit: number;
647
+ socialConnectorsLimit: number;
648
+ userRolesLimit: number;
649
+ machineToMachineRolesLimit: number;
650
+ scopesPerRoleLimit: number;
651
+ hooksLimit: number;
652
+ customJwtEnabled: boolean;
653
+ inlineHooksEnabled: boolean;
654
+ bringYourUiEnabled: boolean;
655
+ collectUserProfileEnabled: boolean;
656
+ passkeySignInEnabled: boolean;
657
+ machineToMachineLimit: number;
658
+ resourcesLimit: number;
659
+ enterpriseSsoLimit: number;
660
+ tenantMembersLimit: number;
661
+ mfaEnabled: boolean;
662
+ organizationsEnabled: boolean;
663
+ organizationsLimit: number;
664
+ securityFeaturesEnabled: boolean;
665
+ idpInitiatedSsoEnabled: boolean;
666
+ samlApplicationsLimit: number;
667
+ customDomainsLimit: number;
668
+ };
669
+ resources: Record<string, number>;
670
+ roles: Record<string, number>;
671
+ basicQuota: {
672
+ auditLogsRetentionDays: number | null;
673
+ subjectTokenEnabled: boolean;
674
+ hostedEmailLimit: number | null;
675
+ hostedEmailDailyLimit: number | null;
676
+ mauLimit: number | null;
677
+ applicationsLimit: number | null;
678
+ thirdPartyApplicationsLimit: number | null;
679
+ scopesPerResourceLimit: number | null;
680
+ socialConnectorsLimit: number | null;
681
+ userRolesLimit: number | null;
682
+ machineToMachineRolesLimit: number | null;
683
+ scopesPerRoleLimit: number | null;
684
+ hooksLimit: number | null;
685
+ customJwtEnabled: boolean;
686
+ inlineHooksEnabled: boolean;
687
+ bringYourUiEnabled: boolean;
688
+ collectUserProfileEnabled: boolean;
689
+ passkeySignInEnabled: boolean;
690
+ tokenLimit: number | null;
691
+ machineToMachineLimit: number | null;
692
+ resourcesLimit: number | null;
693
+ enterpriseSsoLimit: number | null;
694
+ tenantMembersLimit: number | null;
695
+ mfaEnabled: boolean;
696
+ organizationsEnabled: boolean;
697
+ organizationsLimit: number | null;
698
+ securityFeaturesEnabled: boolean;
699
+ idpInitiatedSsoEnabled: boolean;
700
+ samlApplicationsLimit: number | null;
701
+ customDomainsLimit: number | null;
702
+ };
189
703
  }>;
704
+ } & {
705
+ "/tenants/:tenantId/subscription/periodic-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription/periodic-usage", unknown, unknown, {
706
+ mauLimit: number;
707
+ tokenLimit: number;
708
+ userTokenLimit: number;
709
+ m2mTokenLimit: number;
710
+ }>;
711
+ } & {
712
+ "/tenants/:tenantId/subscription/add-on-skus": import("@withtyped/server").PathGuard<"/:tenantId/subscription/add-on-skus", unknown, unknown, Partial<Record<"mauLimit" | "thirdPartyApplicationsLimit" | "userRolesLimit" | "machineToMachineRolesLimit" | "hooksLimit" | "tokenLimit" | "machineToMachineLimit" | "resourcesLimit" | "enterpriseSsoLimit" | "tenantMembersLimit" | "mfaEnabled" | "organizationsEnabled" | "organizationsLimit" | "securityFeaturesEnabled" | "samlApplicationsLimit" | "customDomainsLimit", {
713
+ id: string;
714
+ name: string | null;
715
+ createdAt: Date;
716
+ defaultPriceId: string | null;
717
+ unitPrice: number | null;
718
+ type: LogtoSkuType;
719
+ quota: {
720
+ auditLogsRetentionDays?: number | null | undefined;
721
+ subjectTokenEnabled?: boolean | undefined;
722
+ hostedEmailLimit?: number | null | undefined;
723
+ hostedEmailDailyLimit?: number | null | undefined;
724
+ mauLimit?: number | null | undefined;
725
+ applicationsLimit?: number | null | undefined;
726
+ thirdPartyApplicationsLimit?: number | null | undefined;
727
+ scopesPerResourceLimit?: number | null | undefined;
728
+ socialConnectorsLimit?: number | null | undefined;
729
+ userRolesLimit?: number | null | undefined;
730
+ machineToMachineRolesLimit?: number | null | undefined;
731
+ scopesPerRoleLimit?: number | null | undefined;
732
+ hooksLimit?: number | null | undefined;
733
+ customJwtEnabled?: boolean | undefined;
734
+ inlineHooksEnabled?: boolean | undefined;
735
+ bringYourUiEnabled?: boolean | undefined;
736
+ collectUserProfileEnabled?: boolean | undefined;
737
+ passkeySignInEnabled?: boolean | undefined;
738
+ tokenLimit?: number | null | undefined;
739
+ machineToMachineLimit?: number | null | undefined;
740
+ resourcesLimit?: number | null | undefined;
741
+ enterpriseSsoLimit?: number | null | undefined;
742
+ tenantMembersLimit?: number | null | undefined;
743
+ mfaEnabled?: boolean | undefined;
744
+ organizationsEnabled?: boolean | undefined;
745
+ organizationsLimit?: number | null | undefined;
746
+ securityFeaturesEnabled?: boolean | undefined;
747
+ idpInitiatedSsoEnabled?: boolean | undefined;
748
+ samlApplicationsLimit?: number | null | undefined;
749
+ customDomainsLimit?: number | null | undefined;
750
+ };
751
+ isDefault: boolean;
752
+ isDevPlan: boolean;
753
+ updatedAt: Date;
754
+ productId: string | null;
755
+ }>>>;
190
756
  } & {
191
757
  "/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
192
758
  invoices: {
193
- status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
194
- createdAt: Date;
195
759
  id: string;
760
+ createdAt: Date;
761
+ status: "open" | "void" | "draft" | "paid" | "uncollectible" | null;
196
762
  updatedAt: Date;
197
763
  customerId: string | null;
198
764
  billingReason: string | null;
@@ -200,22 +766,67 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
200
766
  periodEnd: Date;
201
767
  amountDue: number;
202
768
  amountPaid: number;
769
+ basicSkuId: string | null;
203
770
  subscriptionId: string | null;
204
771
  hostedInvoiceUrl: string | null;
205
772
  invoicePdf: string | null;
773
+ collectionMethod: "charge_automatically" | "send_invoice" | null;
774
+ dueDate: Date | null;
206
775
  planName: string | null;
776
+ skuId?: string | null | undefined;
207
777
  }[];
208
778
  }>;
779
+ } & {
780
+ "/tenants/:tenantId/available-skus": import("@withtyped/server").PathGuard<"/:tenantId/available-skus", {
781
+ type?: LogtoSkuType | undefined;
782
+ }, unknown, {
783
+ id: string;
784
+ name: string | null;
785
+ createdAt: Date;
786
+ defaultPriceId: string | null;
787
+ unitPrice: number | null;
788
+ type: LogtoSkuType;
789
+ quota: {
790
+ auditLogsRetentionDays?: number | null | undefined;
791
+ subjectTokenEnabled?: boolean | undefined;
792
+ hostedEmailLimit?: number | null | undefined;
793
+ hostedEmailDailyLimit?: number | null | undefined;
794
+ mauLimit?: number | null | undefined;
795
+ applicationsLimit?: number | null | undefined;
796
+ thirdPartyApplicationsLimit?: number | null | undefined;
797
+ scopesPerResourceLimit?: number | null | undefined;
798
+ socialConnectorsLimit?: number | null | undefined;
799
+ userRolesLimit?: number | null | undefined;
800
+ machineToMachineRolesLimit?: number | null | undefined;
801
+ scopesPerRoleLimit?: number | null | undefined;
802
+ hooksLimit?: number | null | undefined;
803
+ customJwtEnabled?: boolean | undefined;
804
+ inlineHooksEnabled?: boolean | undefined;
805
+ bringYourUiEnabled?: boolean | undefined;
806
+ collectUserProfileEnabled?: boolean | undefined;
807
+ passkeySignInEnabled?: boolean | undefined;
808
+ tokenLimit?: number | null | undefined;
809
+ machineToMachineLimit?: number | null | undefined;
810
+ resourcesLimit?: number | null | undefined;
811
+ enterpriseSsoLimit?: number | null | undefined;
812
+ tenantMembersLimit?: number | null | undefined;
813
+ mfaEnabled?: boolean | undefined;
814
+ organizationsEnabled?: boolean | undefined;
815
+ organizationsLimit?: number | null | undefined;
816
+ securityFeaturesEnabled?: boolean | undefined;
817
+ idpInitiatedSsoEnabled?: boolean | undefined;
818
+ samlApplicationsLimit?: number | null | undefined;
819
+ customDomainsLimit?: number | null | undefined;
820
+ };
821
+ isDefault: boolean;
822
+ isDevPlan: boolean;
823
+ updatedAt: Date;
824
+ productId: string | null;
825
+ }[]>;
209
826
  } & {
210
827
  "/tenants/:tenantId/invoices/:invoiceId/hosted-invoice-url": import("@withtyped/server").PathGuard<"/:tenantId/invoices/:invoiceId/hosted-invoice-url", unknown, unknown, {
211
828
  hostedInvoiceUrl: string;
212
829
  }>;
213
- } & {
214
- "/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
215
- activeUsers: number;
216
- cost: number;
217
- tokenUsage: number;
218
- }>;
219
830
  };
220
831
  post: {
221
832
  "/tenants/:tenantId/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:tenantId/stripe-customer-portal", unknown, {
@@ -238,103 +849,293 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
238
849
  from?: string | undefined;
239
850
  }, unknown, {
240
851
  count: number;
852
+ periodStart?: string | undefined;
853
+ periodEnd?: string | undefined;
854
+ dailyUsage?: number | undefined;
855
+ periodUsage?: number | undefined;
856
+ dailyLimit?: number | null | undefined;
857
+ periodLimit?: number | null | undefined;
241
858
  }>;
242
859
  };
243
860
  post: {
244
861
  "/services/mails": import("@withtyped/server").PathGuard<"/mails", unknown, {
245
862
  data: {
246
- type: TemplateType | VerificationCodeType;
863
+ type: TemplateType;
247
864
  payload: {
248
865
  code?: string | undefined;
249
866
  link?: string | undefined;
867
+ locale?: string | undefined;
868
+ uiLocales?: string | undefined;
869
+ } & {
870
+ [k: string]: unknown;
871
+ } & {
250
872
  senderName?: string | undefined;
251
873
  companyInformation?: string | undefined;
252
874
  appLogo?: string | undefined;
875
+ } & {
876
+ organization?: {
877
+ id: string;
878
+ name: string;
879
+ branding: {
880
+ logoUrl?: string | undefined;
881
+ darkLogoUrl?: string | undefined;
882
+ favicon?: string | undefined;
883
+ darkFavicon?: string | undefined;
884
+ };
885
+ } | undefined;
886
+ inviter?: {
887
+ id: string;
888
+ name: string | null;
889
+ username: string | null;
890
+ primaryEmail: string | null;
891
+ primaryPhone: string | null;
892
+ avatar: string | null;
893
+ profile: Partial<{
894
+ familyName: string;
895
+ givenName: string;
896
+ middleName: string;
897
+ nickname: string;
898
+ preferredUsername: string;
899
+ profile: string;
900
+ website: string;
901
+ gender: string;
902
+ birthdate: string;
903
+ zoneinfo: string;
904
+ locale: string;
905
+ address: Partial<{
906
+ formatted: string;
907
+ streetAddress: string;
908
+ locality: string;
909
+ region: string;
910
+ postalCode: string;
911
+ country: string;
912
+ }>;
913
+ }>;
914
+ } | undefined;
253
915
  };
254
916
  to: string;
917
+ ip?: string | undefined;
255
918
  };
256
919
  }, unknown>;
257
920
  } & {
258
921
  "/services/send-sms": import("@withtyped/server").PathGuard<"/send-sms", unknown, {
259
922
  data: {
260
- type: TemplateType | VerificationCodeType;
923
+ type: TemplateType;
261
924
  to: string;
262
925
  payload: {
263
926
  code?: string | undefined;
264
927
  link?: string | undefined;
928
+ locale?: string | undefined;
929
+ uiLocales?: string | undefined;
930
+ } & {
931
+ [k: string]: unknown;
265
932
  };
933
+ ip?: string | undefined;
266
934
  };
267
935
  }, unknown>;
936
+ } & {
937
+ "/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", {
938
+ isTest?: string | undefined;
939
+ }, {
940
+ token: Record<string, Json>;
941
+ context: Record<string, Json>;
942
+ tokenType: LogtoJwtTokenKeyType.AccessToken;
943
+ script: string;
944
+ environmentVariables?: Record<string, string> | undefined;
945
+ } | {
946
+ token: Record<string, Json>;
947
+ tokenType: LogtoJwtTokenKeyType.ClientCredentials;
948
+ script: string;
949
+ context?: Record<string, Json> | undefined;
950
+ environmentVariables?: Record<string, string> | undefined;
951
+ }, Record<string, unknown>>;
952
+ };
953
+ put: {
954
+ "/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, {
955
+ "jwt.accessToken"?: {
956
+ production?: string | undefined;
957
+ test?: string | undefined;
958
+ } | undefined;
959
+ "jwt.clientCredentials"?: {
960
+ production?: string | undefined;
961
+ test?: string | undefined;
962
+ } | undefined;
963
+ }, unknown>;
964
+ };
965
+ delete: {
966
+ "/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, unknown, unknown>;
268
967
  };
269
- put: {};
270
- delete: {};
271
968
  copy: {};
272
969
  head: {};
273
970
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
274
971
  options: {};
275
972
  patch: {};
276
973
  get: {
277
- "/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
278
- createdAt: Date;
974
+ "/skus": import("@withtyped/server").PathGuard<"/", {
975
+ type?: LogtoSkuType | undefined;
976
+ }, unknown, {
279
977
  id: string;
280
- name: string;
978
+ name: string | null;
979
+ createdAt: Date;
980
+ defaultPriceId: string | null;
981
+ unitPrice: number | null;
982
+ type: LogtoSkuType;
281
983
  quota: {
282
- mauLimit: number | null;
283
- tokenLimit: number | null;
284
- applicationsLimit: number | null;
285
- machineToMachineLimit: number | null;
286
- resourcesLimit: number | null;
287
- scopesPerResourceLimit: number | null;
288
- customDomainEnabled: boolean;
289
- omniSignInEnabled: boolean;
290
- builtInEmailConnectorEnabled: boolean;
291
- socialConnectorsLimit: number | null;
292
- standardConnectorsLimit: number | null;
293
- rolesLimit: number | null;
294
- machineToMachineRolesLimit: number | null;
295
- scopesPerRoleLimit: number | null;
296
- hooksLimit: number | null;
297
- auditLogsRetentionDays: number | null;
298
- mfaEnabled: boolean;
299
- organizationsEnabled: boolean;
300
- ssoEnabled: boolean;
301
- thirdPartyApplicationsLimit: number | null;
984
+ auditLogsRetentionDays?: number | null | undefined;
985
+ subjectTokenEnabled?: boolean | undefined;
986
+ hostedEmailLimit?: number | null | undefined;
987
+ hostedEmailDailyLimit?: number | null | undefined;
988
+ mauLimit?: number | null | undefined;
989
+ applicationsLimit?: number | null | undefined;
990
+ thirdPartyApplicationsLimit?: number | null | undefined;
991
+ scopesPerResourceLimit?: number | null | undefined;
992
+ socialConnectorsLimit?: number | null | undefined;
993
+ userRolesLimit?: number | null | undefined;
994
+ machineToMachineRolesLimit?: number | null | undefined;
995
+ scopesPerRoleLimit?: number | null | undefined;
996
+ hooksLimit?: number | null | undefined;
997
+ customJwtEnabled?: boolean | undefined;
998
+ inlineHooksEnabled?: boolean | undefined;
999
+ bringYourUiEnabled?: boolean | undefined;
1000
+ collectUserProfileEnabled?: boolean | undefined;
1001
+ passkeySignInEnabled?: boolean | undefined;
1002
+ tokenLimit?: number | null | undefined;
1003
+ machineToMachineLimit?: number | null | undefined;
1004
+ resourcesLimit?: number | null | undefined;
1005
+ enterpriseSsoLimit?: number | null | undefined;
1006
+ tenantMembersLimit?: number | null | undefined;
1007
+ mfaEnabled?: boolean | undefined;
1008
+ organizationsEnabled?: boolean | undefined;
1009
+ organizationsLimit?: number | null | undefined;
1010
+ securityFeaturesEnabled?: boolean | undefined;
1011
+ idpInitiatedSsoEnabled?: boolean | undefined;
1012
+ samlApplicationsLimit?: number | null | undefined;
1013
+ customDomainsLimit?: number | null | undefined;
302
1014
  };
303
- stripeProducts: {
304
- type: "flat" | "tier1" | "tier2" | "tier3";
305
- id: string;
306
- name: string;
307
- price: {
308
- id: string;
309
- unitAmountDecimal: string;
310
- quantity?: 1 | undefined;
311
- unitAmount?: number | null | undefined;
312
- };
313
- description?: string | undefined;
314
- }[];
1015
+ isDefault: boolean;
1016
+ isDevPlan: boolean;
315
1017
  updatedAt: Date;
1018
+ productId: string | null;
316
1019
  }[]>;
1020
+ } & {
1021
+ "/skus/:basicSkuId/usage-reporting-type": import("@withtyped/server").PathGuard<"/:basicSkuId/usage-reporting-type", unknown, unknown, {
1022
+ basicSkuId: string;
1023
+ usageReportingType: UsageReportingType | null;
1024
+ }>;
317
1025
  };
318
- post: {};
319
- put: {};
320
- delete: {};
321
- copy: {};
322
- head: {};
323
- }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
324
- options: {};
325
- patch: {};
326
- get: {
327
- "/my/tenant": import("@withtyped/server").PathGuard<"/tenant", unknown, unknown, {
328
- name: string;
1026
+ post: {
1027
+ "/skus": import("@withtyped/server").PathGuard<"/", unknown, {
1028
+ type: LogtoSkuType;
1029
+ quota: {
1030
+ mauLimit?: number | null | undefined;
1031
+ applicationsLimit?: number | null | undefined;
1032
+ thirdPartyApplicationsLimit?: number | null | undefined;
1033
+ scopesPerResourceLimit?: number | null | undefined;
1034
+ socialConnectorsLimit?: number | null | undefined;
1035
+ userRolesLimit?: number | null | undefined;
1036
+ machineToMachineRolesLimit?: number | null | undefined;
1037
+ scopesPerRoleLimit?: number | null | undefined;
1038
+ hooksLimit?: number | null | undefined;
1039
+ auditLogsRetentionDays?: number | null | undefined;
1040
+ hostedEmailLimit?: number | null | undefined;
1041
+ hostedEmailDailyLimit?: number | null | undefined;
1042
+ customJwtEnabled?: boolean | undefined;
1043
+ inlineHooksEnabled?: boolean | undefined;
1044
+ subjectTokenEnabled?: boolean | undefined;
1045
+ bringYourUiEnabled?: boolean | undefined;
1046
+ collectUserProfileEnabled?: boolean | undefined;
1047
+ passkeySignInEnabled?: boolean | undefined;
1048
+ tokenLimit?: number | null | undefined;
1049
+ machineToMachineLimit?: number | null | undefined;
1050
+ resourcesLimit?: number | null | undefined;
1051
+ enterpriseSsoLimit?: number | null | undefined;
1052
+ tenantMembersLimit?: number | null | undefined;
1053
+ mfaEnabled?: boolean | undefined;
1054
+ organizationsEnabled?: boolean | undefined;
1055
+ organizationsLimit?: number | null | undefined;
1056
+ securityFeaturesEnabled?: boolean | undefined;
1057
+ idpInitiatedSsoEnabled?: boolean | undefined;
1058
+ samlApplicationsLimit?: number | null | undefined;
1059
+ customDomainsLimit?: number | null | undefined;
1060
+ };
1061
+ id?: string | undefined;
1062
+ isDefault?: boolean | undefined;
1063
+ isDevPlan?: boolean | undefined;
1064
+ usageReportingType?: UsageReportingType | undefined;
1065
+ }, {
1066
+ type: LogtoSkuType;
329
1067
  id: string;
330
- indicator: string;
331
- isSuspended: boolean;
332
- tag: TenantTag;
1068
+ createdAt: Date;
1069
+ isDefault: boolean;
1070
+ isDevPlan: boolean;
1071
+ updatedAt: Date;
1072
+ quota: {
1073
+ auditLogsRetentionDays?: number | null | undefined;
1074
+ subjectTokenEnabled?: boolean | undefined;
1075
+ hostedEmailLimit?: number | null | undefined;
1076
+ hostedEmailDailyLimit?: number | null | undefined;
1077
+ mauLimit?: number | null | undefined;
1078
+ applicationsLimit?: number | null | undefined;
1079
+ thirdPartyApplicationsLimit?: number | null | undefined;
1080
+ scopesPerResourceLimit?: number | null | undefined;
1081
+ socialConnectorsLimit?: number | null | undefined;
1082
+ userRolesLimit?: number | null | undefined;
1083
+ machineToMachineRolesLimit?: number | null | undefined;
1084
+ scopesPerRoleLimit?: number | null | undefined;
1085
+ hooksLimit?: number | null | undefined;
1086
+ customJwtEnabled?: boolean | undefined;
1087
+ inlineHooksEnabled?: boolean | undefined;
1088
+ bringYourUiEnabled?: boolean | undefined;
1089
+ collectUserProfileEnabled?: boolean | undefined;
1090
+ passkeySignInEnabled?: boolean | undefined;
1091
+ tokenLimit?: number | null | undefined;
1092
+ machineToMachineLimit?: number | null | undefined;
1093
+ resourcesLimit?: number | null | undefined;
1094
+ enterpriseSsoLimit?: number | null | undefined;
1095
+ tenantMembersLimit?: number | null | undefined;
1096
+ mfaEnabled?: boolean | undefined;
1097
+ organizationsEnabled?: boolean | undefined;
1098
+ organizationsLimit?: number | null | undefined;
1099
+ securityFeaturesEnabled?: boolean | undefined;
1100
+ idpInitiatedSsoEnabled?: boolean | undefined;
1101
+ samlApplicationsLimit?: number | null | undefined;
1102
+ customDomainsLimit?: number | null | undefined;
1103
+ };
1104
+ }>;
1105
+ } & {
1106
+ "/skus/:skuId/products": import("@withtyped/server").PathGuard<"/:skuId/products", {
1107
+ isOneTime?: string | undefined;
1108
+ }, {
1109
+ name: string;
1110
+ unitPrice: number;
1111
+ }, {
1112
+ productId: string;
1113
+ }>;
1114
+ } & {
1115
+ "/skus/:basicSkuId/usage-add-on-relations": import("@withtyped/server").PathGuard<"/:basicSkuId/usage-add-on-relations", unknown, {
1116
+ usageKey: "mauLimit" | "thirdPartyApplicationsLimit" | "userRolesLimit" | "machineToMachineRolesLimit" | "hooksLimit" | "tokenLimit" | "machineToMachineLimit" | "resourcesLimit" | "enterpriseSsoLimit" | "tenantMembersLimit" | "mfaEnabled" | "organizationsEnabled" | "organizationsLimit" | "securityFeaturesEnabled" | "samlApplicationsLimit" | "customDomainsLimit";
1117
+ addOnSkuId: string;
1118
+ }, {
1119
+ usageKey: "mauLimit" | "thirdPartyApplicationsLimit" | "userRolesLimit" | "machineToMachineRolesLimit" | "hooksLimit" | "tokenLimit" | "machineToMachineLimit" | "resourcesLimit" | "enterpriseSsoLimit" | "tenantMembersLimit" | "mfaEnabled" | "organizationsEnabled" | "organizationsLimit" | "securityFeaturesEnabled" | "samlApplicationsLimit" | "customDomainsLimit";
1120
+ basicSkuId: string;
1121
+ addOnSkuId: string;
333
1122
  }>;
334
1123
  };
335
- post: {};
336
- put: {};
337
- delete: {};
1124
+ put: {
1125
+ "/skus/:basicSkuId/usage-reporting-type": import("@withtyped/server").PathGuard<"/:basicSkuId/usage-reporting-type", unknown, {
1126
+ usageReportingType: UsageReportingType;
1127
+ }, {
1128
+ basicSkuId: string;
1129
+ usageReportingType: UsageReportingType;
1130
+ }>;
1131
+ };
1132
+ delete: {
1133
+ "/skus/:skuId": import("@withtyped/server").PathGuard<"/:skuId", unknown, unknown, unknown>;
1134
+ } & {
1135
+ "/skus/:basicSkuId/usage-add-on-relations/:usageKey": import("@withtyped/server").PathGuard<"/:basicSkuId/usage-add-on-relations/:usageKey", unknown, unknown, unknown>;
1136
+ } & {
1137
+ "/skus/:basicSkuId/usage-reporting-type": import("@withtyped/server").PathGuard<"/:basicSkuId/usage-reporting-type", unknown, unknown, unknown>;
1138
+ };
338
1139
  copy: {};
339
1140
  head: {};
340
1141
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
@@ -343,22 +1144,24 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
343
1144
  get: {
344
1145
  "/checkout-session/:id": import("@withtyped/server").PathGuard<"/:id", unknown, unknown, {
345
1146
  status: "open" | "complete" | "expired";
346
- createdAt: Date;
347
- id: string;
1147
+ skuId: string | null;
348
1148
  userId: string;
349
- updatedAt: Date;
350
1149
  tenantId: string | null;
351
- planId: string;
1150
+ id: string;
1151
+ createdAt: Date;
1152
+ updatedAt: Date;
1153
+ planId: string | null;
352
1154
  }>;
353
1155
  };
354
1156
  post: {
355
1157
  "/checkout-session": import("@withtyped/server").PathGuard<"/", unknown, {
356
- planId: string;
357
1158
  successCallbackUrl: string;
358
- tenantId?: string | undefined;
359
- cancelCallbackUrl?: string | undefined;
360
1159
  tenantTag?: TenantTag | undefined;
361
1160
  tenantName?: string | undefined;
1161
+ tenantRegionName?: string | undefined;
1162
+ skuId?: string | undefined;
1163
+ tenantId?: string | undefined;
1164
+ cancelCallbackUrl?: string | undefined;
362
1165
  }, {
363
1166
  sessionId: string;
364
1167
  redirectUri?: string | null | undefined;
@@ -370,34 +1173,227 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
370
1173
  head: {};
371
1174
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
372
1175
  options: {};
373
- patch: {};
1176
+ patch: {
1177
+ "/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:invitationId/status", unknown, {
1178
+ status: OrganizationInvitationStatus.Accepted;
1179
+ }, unknown>;
1180
+ };
374
1181
  get: {
375
- "/affiliates": import("@withtyped/server").PathGuard<"/", unknown, unknown, AffiliateData[]>;
1182
+ "/invitations": import("@withtyped/server").PathGuard<"/", unknown, unknown, ({
1183
+ status: OrganizationInvitationStatus;
1184
+ tenantId: string;
1185
+ id: string;
1186
+ createdAt: number;
1187
+ updatedAt: number;
1188
+ inviterId: string | null;
1189
+ invitee: string;
1190
+ acceptedUserId: string | null;
1191
+ organizationId: string;
1192
+ expiresAt: number;
1193
+ organizationRoles: OrganizationRoleEntity[];
1194
+ } & {
1195
+ tenantTag: TenantTag;
1196
+ tenantName: string;
1197
+ })[]>;
1198
+ } & {
1199
+ "/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:invitationId", unknown, unknown, {
1200
+ status: OrganizationInvitationStatus;
1201
+ tenantId: string;
1202
+ id: string;
1203
+ createdAt: number;
1204
+ updatedAt: number;
1205
+ inviterId: string | null;
1206
+ invitee: string;
1207
+ acceptedUserId: string | null;
1208
+ organizationId: string;
1209
+ expiresAt: number;
1210
+ organizationRoles: OrganizationRoleEntity[];
1211
+ }>;
376
1212
  };
377
- post: {
378
- "/affiliates": import("@withtyped/server").PathGuard<"/", unknown, {
379
- name: string;
1213
+ post: {};
1214
+ put: {};
1215
+ delete: {};
1216
+ copy: {};
1217
+ head: {};
1218
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
1219
+ options: {};
1220
+ patch: {
1221
+ "/system-limits/:id": import("@withtyped/server").PathGuard<"/:id", unknown, {
1222
+ limits: {
1223
+ applicationsLimit?: number | undefined;
1224
+ thirdPartyApplicationsLimit?: number | undefined;
1225
+ scopesPerResourceLimit?: number | undefined;
1226
+ socialConnectorsLimit?: number | undefined;
1227
+ userRolesLimit?: number | undefined;
1228
+ machineToMachineRolesLimit?: number | undefined;
1229
+ scopesPerRoleLimit?: number | undefined;
1230
+ hooksLimit?: number | undefined;
1231
+ machineToMachineLimit?: number | undefined;
1232
+ resourcesLimit?: number | undefined;
1233
+ enterpriseSsoLimit?: number | undefined;
1234
+ tenantMembersLimit?: number | undefined;
1235
+ organizationsLimit?: number | undefined;
1236
+ samlApplicationsLimit?: number | undefined;
1237
+ customDomainsLimit?: number | undefined;
1238
+ usersPerOrganizationLimit?: number | undefined;
1239
+ organizationUserRolesLimit?: number | undefined;
1240
+ organizationMachineToMachineRolesLimit?: number | undefined;
1241
+ organizationScopesLimit?: number | undefined;
1242
+ };
380
1243
  }, {
381
- createdAt: Date;
382
1244
  id: string;
383
- name: string;
1245
+ createdAt: Date;
1246
+ updatedAt: Date;
1247
+ limits: {
1248
+ applicationsLimit?: number | undefined;
1249
+ thirdPartyApplicationsLimit?: number | undefined;
1250
+ scopesPerResourceLimit?: number | undefined;
1251
+ socialConnectorsLimit?: number | undefined;
1252
+ userRolesLimit?: number | undefined;
1253
+ machineToMachineRolesLimit?: number | undefined;
1254
+ scopesPerRoleLimit?: number | undefined;
1255
+ hooksLimit?: number | undefined;
1256
+ machineToMachineLimit?: number | undefined;
1257
+ resourcesLimit?: number | undefined;
1258
+ enterpriseSsoLimit?: number | undefined;
1259
+ tenantMembersLimit?: number | undefined;
1260
+ organizationsLimit?: number | undefined;
1261
+ samlApplicationsLimit?: number | undefined;
1262
+ customDomainsLimit?: number | undefined;
1263
+ usersPerOrganizationLimit?: number | undefined;
1264
+ organizationUserRolesLimit?: number | undefined;
1265
+ organizationMachineToMachineRolesLimit?: number | undefined;
1266
+ organizationScopesLimit?: number | undefined;
1267
+ };
384
1268
  }>;
1269
+ };
1270
+ get: {
1271
+ "/system-limits": import("@withtyped/server").PathGuard<"/", {
1272
+ basicSkuId?: string | undefined;
1273
+ }, unknown, {
1274
+ id: string;
1275
+ createdAt: Date;
1276
+ updatedAt: Date;
1277
+ limits: {
1278
+ applicationsLimit?: number | undefined;
1279
+ thirdPartyApplicationsLimit?: number | undefined;
1280
+ scopesPerResourceLimit?: number | undefined;
1281
+ socialConnectorsLimit?: number | undefined;
1282
+ userRolesLimit?: number | undefined;
1283
+ machineToMachineRolesLimit?: number | undefined;
1284
+ scopesPerRoleLimit?: number | undefined;
1285
+ hooksLimit?: number | undefined;
1286
+ machineToMachineLimit?: number | undefined;
1287
+ resourcesLimit?: number | undefined;
1288
+ enterpriseSsoLimit?: number | undefined;
1289
+ tenantMembersLimit?: number | undefined;
1290
+ organizationsLimit?: number | undefined;
1291
+ samlApplicationsLimit?: number | undefined;
1292
+ customDomainsLimit?: number | undefined;
1293
+ usersPerOrganizationLimit?: number | undefined;
1294
+ organizationUserRolesLimit?: number | undefined;
1295
+ organizationMachineToMachineRolesLimit?: number | undefined;
1296
+ organizationScopesLimit?: number | undefined;
1297
+ };
1298
+ basicSkuIds: string[];
1299
+ }[]>;
385
1300
  } & {
386
- "/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
387
- value: string;
388
- type: "hostname" | "query";
1301
+ "/system-limits/:id": import("@withtyped/server").PathGuard<"/:id", unknown, unknown, {
1302
+ id: string;
1303
+ createdAt: Date;
1304
+ updatedAt: Date;
1305
+ limits: {
1306
+ applicationsLimit?: number | undefined;
1307
+ thirdPartyApplicationsLimit?: number | undefined;
1308
+ scopesPerResourceLimit?: number | undefined;
1309
+ socialConnectorsLimit?: number | undefined;
1310
+ userRolesLimit?: number | undefined;
1311
+ machineToMachineRolesLimit?: number | undefined;
1312
+ scopesPerRoleLimit?: number | undefined;
1313
+ hooksLimit?: number | undefined;
1314
+ machineToMachineLimit?: number | undefined;
1315
+ resourcesLimit?: number | undefined;
1316
+ enterpriseSsoLimit?: number | undefined;
1317
+ tenantMembersLimit?: number | undefined;
1318
+ organizationsLimit?: number | undefined;
1319
+ samlApplicationsLimit?: number | undefined;
1320
+ customDomainsLimit?: number | undefined;
1321
+ usersPerOrganizationLimit?: number | undefined;
1322
+ organizationUserRolesLimit?: number | undefined;
1323
+ organizationMachineToMachineRolesLimit?: number | undefined;
1324
+ organizationScopesLimit?: number | undefined;
1325
+ };
1326
+ basicSkuIds: string[];
1327
+ }>;
1328
+ };
1329
+ post: {
1330
+ "/system-limits": import("@withtyped/server").PathGuard<"/", unknown, {
1331
+ limits: {
1332
+ applicationsLimit?: number | undefined;
1333
+ thirdPartyApplicationsLimit?: number | undefined;
1334
+ scopesPerResourceLimit?: number | undefined;
1335
+ socialConnectorsLimit?: number | undefined;
1336
+ userRolesLimit?: number | undefined;
1337
+ machineToMachineRolesLimit?: number | undefined;
1338
+ scopesPerRoleLimit?: number | undefined;
1339
+ hooksLimit?: number | undefined;
1340
+ machineToMachineLimit?: number | undefined;
1341
+ resourcesLimit?: number | undefined;
1342
+ enterpriseSsoLimit?: number | undefined;
1343
+ tenantMembersLimit?: number | undefined;
1344
+ organizationsLimit?: number | undefined;
1345
+ samlApplicationsLimit?: number | undefined;
1346
+ customDomainsLimit?: number | undefined;
1347
+ usersPerOrganizationLimit?: number | undefined;
1348
+ organizationUserRolesLimit?: number | undefined;
1349
+ organizationMachineToMachineRolesLimit?: number | undefined;
1350
+ organizationScopesLimit?: number | undefined;
1351
+ };
1352
+ id?: string | undefined;
389
1353
  }, {
390
- value: string;
391
- type: "hostname" | "query";
1354
+ id: string;
392
1355
  createdAt: Date;
393
- affiliateId: string;
1356
+ updatedAt: Date;
1357
+ limits: {
1358
+ applicationsLimit?: number | undefined;
1359
+ thirdPartyApplicationsLimit?: number | undefined;
1360
+ scopesPerResourceLimit?: number | undefined;
1361
+ socialConnectorsLimit?: number | undefined;
1362
+ userRolesLimit?: number | undefined;
1363
+ machineToMachineRolesLimit?: number | undefined;
1364
+ scopesPerRoleLimit?: number | undefined;
1365
+ hooksLimit?: number | undefined;
1366
+ machineToMachineLimit?: number | undefined;
1367
+ resourcesLimit?: number | undefined;
1368
+ enterpriseSsoLimit?: number | undefined;
1369
+ tenantMembersLimit?: number | undefined;
1370
+ organizationsLimit?: number | undefined;
1371
+ samlApplicationsLimit?: number | undefined;
1372
+ customDomainsLimit?: number | undefined;
1373
+ usersPerOrganizationLimit?: number | undefined;
1374
+ organizationUserRolesLimit?: number | undefined;
1375
+ organizationMachineToMachineRolesLimit?: number | undefined;
1376
+ organizationScopesLimit?: number | undefined;
1377
+ };
1378
+ }>;
1379
+ } & {
1380
+ "/system-limits/:systemLimitId/basic-sku-relations": import("@withtyped/server").PathGuard<"/:systemLimitId/basic-sku-relations", unknown, {
1381
+ basicSkuIds: string[];
1382
+ }, {
1383
+ relations: {
1384
+ createdAt: Date;
1385
+ updatedAt: Date;
1386
+ basicSkuId: string;
1387
+ systemLimitId: string;
1388
+ }[];
394
1389
  }>;
395
1390
  };
396
1391
  put: {};
397
1392
  delete: {
398
- "/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
399
- value: string;
400
- type: "hostname" | "query";
1393
+ "/system-limits/:id": import("@withtyped/server").PathGuard<"/:id", unknown, unknown, unknown>;
1394
+ } & {
1395
+ "/system-limits/:systemLimitId/basic-sku-relations": import("@withtyped/server").PathGuard<"/:systemLimitId/basic-sku-relations", unknown, {
1396
+ basicSkuIds: string[];
401
1397
  }, unknown>;
402
1398
  };
403
1399
  copy: {};
@@ -406,22 +1402,263 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
406
1402
  options: {};
407
1403
  patch: {};
408
1404
  get: {};
1405
+ post: {};
1406
+ put: {};
1407
+ delete: {
1408
+ "/me": import("@withtyped/server").PathGuard<"/", unknown, unknown, unknown>;
1409
+ };
1410
+ copy: {};
1411
+ head: {};
1412
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
1413
+ options: {};
1414
+ patch: {
1415
+ "/me/regions/:regionName/users/:userId": import("@withtyped/server").PathGuard<"/:regionName/users/:userId", unknown, {
1416
+ role: DatabaseRegionAccessRole;
1417
+ }, {
1418
+ role: DatabaseRegionAccessRole;
1419
+ userId: string;
1420
+ }>;
1421
+ };
1422
+ get: {
1423
+ "/me/regions": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
1424
+ regions: {
1425
+ id: string;
1426
+ name: string;
1427
+ country: string;
1428
+ displayName: string;
1429
+ tags: TenantTag[];
1430
+ isPrivate: boolean;
1431
+ customTenantIdPrefix: string | null;
1432
+ }[];
1433
+ }>;
1434
+ } & {
1435
+ "/me/regions/:regionName/users": import("@withtyped/server").PathGuard<"/:regionName/users", unknown, unknown, {
1436
+ users: {
1437
+ role: DatabaseRegionAccessRole;
1438
+ userId: string;
1439
+ }[];
1440
+ }>;
1441
+ };
409
1442
  post: {
410
- "/affiliate-logs": import("@withtyped/server").PathGuard<"/", unknown, {
411
- createdAt: string;
1443
+ "/me/regions/:regionName/users": import("@withtyped/server").PathGuard<"/:regionName/users", unknown, {
1444
+ role: DatabaseRegionAccessRole;
412
1445
  userId: string;
413
- hostname?: string | undefined;
414
- query?: string | undefined;
415
1446
  }, {
416
- createdAt: Date;
417
- id: string;
418
- affiliateId: string | null;
1447
+ role: DatabaseRegionAccessRole;
419
1448
  userId: string;
420
- createdVia: {
421
- createdAt: string;
422
- hostname?: string | undefined;
423
- query?: string | undefined;
424
- };
1449
+ }>;
1450
+ };
1451
+ put: {};
1452
+ delete: {
1453
+ "/me/regions/:regionName/users/:userId": import("@withtyped/server").PathGuard<"/:regionName/users/:userId", unknown, unknown, unknown>;
1454
+ };
1455
+ copy: {};
1456
+ head: {};
1457
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
1458
+ options: {};
1459
+ patch: {};
1460
+ get: {
1461
+ "/me/logto-enterprises": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
1462
+ logtoEnterprises: {
1463
+ id: string;
1464
+ quotaScope: QuotaScope;
1465
+ createdAt: Date;
1466
+ name: string | null;
1467
+ updatedAt: Date;
1468
+ }[];
1469
+ }>;
1470
+ } & {
1471
+ "/me/logto-enterprises/:id": import("@withtyped/server").PathGuard<"/:id", {
1472
+ includeSharedQuota?: string | undefined;
1473
+ includeUsages?: string | undefined;
1474
+ includeSkuItems?: string | undefined;
1475
+ }, unknown, {
1476
+ id: string;
1477
+ regionNames: string[];
1478
+ quotaScope: QuotaScope;
1479
+ createdAt: Date;
1480
+ name: string | null;
1481
+ updatedAt: Date;
1482
+ subscription?: {
1483
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
1484
+ quotaScope: "dedicated" | "shared";
1485
+ currentPeriodStart: Date;
1486
+ currentPeriodEnd: Date;
1487
+ isEnterprisePlan: boolean;
1488
+ id?: string | undefined;
1489
+ upcomingInvoice?: {
1490
+ subtotal: number;
1491
+ subtotalExcludingTax: number | null;
1492
+ total: number;
1493
+ totalExcludingTax: number | null;
1494
+ } | null | undefined;
1495
+ } | undefined;
1496
+ quota?: {
1497
+ usageReportingType: UsageReportingType;
1498
+ basicQuota: {
1499
+ auditLogsRetentionDays: number | null;
1500
+ subjectTokenEnabled: boolean;
1501
+ hostedEmailLimit: number | null;
1502
+ hostedEmailDailyLimit: number | null;
1503
+ mauLimit: number | null;
1504
+ applicationsLimit: number | null;
1505
+ thirdPartyApplicationsLimit: number | null;
1506
+ scopesPerResourceLimit: number | null;
1507
+ socialConnectorsLimit: number | null;
1508
+ userRolesLimit: number | null;
1509
+ machineToMachineRolesLimit: number | null;
1510
+ scopesPerRoleLimit: number | null;
1511
+ hooksLimit: number | null;
1512
+ customJwtEnabled: boolean;
1513
+ inlineHooksEnabled: boolean;
1514
+ bringYourUiEnabled: boolean;
1515
+ collectUserProfileEnabled: boolean;
1516
+ passkeySignInEnabled: boolean;
1517
+ tokenLimit: number | null;
1518
+ machineToMachineLimit: number | null;
1519
+ resourcesLimit: number | null;
1520
+ enterpriseSsoLimit: number | null;
1521
+ tenantMembersLimit: number | null;
1522
+ mfaEnabled: boolean;
1523
+ organizationsEnabled: boolean;
1524
+ organizationsLimit: number | null;
1525
+ securityFeaturesEnabled: boolean;
1526
+ idpInitiatedSsoEnabled: boolean;
1527
+ samlApplicationsLimit: number | null;
1528
+ customDomainsLimit: number | null;
1529
+ };
1530
+ aggregatedQuota: {
1531
+ auditLogsRetentionDays: number | null;
1532
+ subjectTokenEnabled: boolean;
1533
+ hostedEmailLimit: number | null;
1534
+ hostedEmailDailyLimit: number | null;
1535
+ mauLimit: number | null;
1536
+ applicationsLimit: number | null;
1537
+ thirdPartyApplicationsLimit: number | null;
1538
+ scopesPerResourceLimit: number | null;
1539
+ socialConnectorsLimit: number | null;
1540
+ userRolesLimit: number | null;
1541
+ machineToMachineRolesLimit: number | null;
1542
+ scopesPerRoleLimit: number | null;
1543
+ hooksLimit: number | null;
1544
+ customJwtEnabled: boolean;
1545
+ inlineHooksEnabled: boolean;
1546
+ bringYourUiEnabled: boolean;
1547
+ collectUserProfileEnabled: boolean;
1548
+ passkeySignInEnabled: boolean;
1549
+ tokenLimit: number | null;
1550
+ machineToMachineLimit: number | null;
1551
+ resourcesLimit: number | null;
1552
+ enterpriseSsoLimit: number | null;
1553
+ tenantMembersLimit: number | null;
1554
+ mfaEnabled: boolean;
1555
+ organizationsEnabled: boolean;
1556
+ organizationsLimit: number | null;
1557
+ securityFeaturesEnabled: boolean;
1558
+ idpInitiatedSsoEnabled: boolean;
1559
+ samlApplicationsLimit: number | null;
1560
+ customDomainsLimit: number | null;
1561
+ };
1562
+ } | undefined;
1563
+ usages?: {
1564
+ mauLimit: number;
1565
+ applicationsLimit: number;
1566
+ thirdPartyApplicationsLimit: number;
1567
+ socialConnectorsLimit: number;
1568
+ userRolesLimit: number;
1569
+ machineToMachineRolesLimit: number;
1570
+ hooksLimit: number;
1571
+ customJwtEnabled: boolean;
1572
+ inlineHooksEnabled: boolean;
1573
+ bringYourUiEnabled: boolean;
1574
+ collectUserProfileEnabled: boolean;
1575
+ passkeySignInEnabled: boolean;
1576
+ tokenLimit: number;
1577
+ machineToMachineLimit: number;
1578
+ resourcesLimit: number;
1579
+ enterpriseSsoLimit: number;
1580
+ tenantMembersLimit: number;
1581
+ mfaEnabled: boolean;
1582
+ organizationsEnabled: boolean;
1583
+ organizationsLimit: number;
1584
+ securityFeaturesEnabled: boolean;
1585
+ idpInitiatedSsoEnabled: boolean;
1586
+ samlApplicationsLimit: number;
1587
+ customDomainsLimit: number;
1588
+ userTokenLimit: number;
1589
+ m2mTokenLimit: number;
1590
+ } | undefined;
1591
+ subscriptionSkuItems?: {
1592
+ type: LogtoSkuType;
1593
+ logtoSkuId: string;
1594
+ count: number;
1595
+ isDevPlan: boolean;
1596
+ quota: {
1597
+ auditLogsRetentionDays?: number | null | undefined;
1598
+ subjectTokenEnabled?: boolean | undefined;
1599
+ hostedEmailLimit?: number | null | undefined;
1600
+ hostedEmailDailyLimit?: number | null | undefined;
1601
+ mauLimit?: number | null | undefined;
1602
+ applicationsLimit?: number | null | undefined;
1603
+ thirdPartyApplicationsLimit?: number | null | undefined;
1604
+ scopesPerResourceLimit?: number | null | undefined;
1605
+ socialConnectorsLimit?: number | null | undefined;
1606
+ userRolesLimit?: number | null | undefined;
1607
+ machineToMachineRolesLimit?: number | null | undefined;
1608
+ scopesPerRoleLimit?: number | null | undefined;
1609
+ hooksLimit?: number | null | undefined;
1610
+ customJwtEnabled?: boolean | undefined;
1611
+ inlineHooksEnabled?: boolean | undefined;
1612
+ bringYourUiEnabled?: boolean | undefined;
1613
+ collectUserProfileEnabled?: boolean | undefined;
1614
+ passkeySignInEnabled?: boolean | undefined;
1615
+ tokenLimit?: number | null | undefined;
1616
+ machineToMachineLimit?: number | null | undefined;
1617
+ resourcesLimit?: number | null | undefined;
1618
+ enterpriseSsoLimit?: number | null | undefined;
1619
+ tenantMembersLimit?: number | null | undefined;
1620
+ mfaEnabled?: boolean | undefined;
1621
+ organizationsEnabled?: boolean | undefined;
1622
+ organizationsLimit?: number | null | undefined;
1623
+ securityFeaturesEnabled?: boolean | undefined;
1624
+ idpInitiatedSsoEnabled?: boolean | undefined;
1625
+ samlApplicationsLimit?: number | null | undefined;
1626
+ customDomainsLimit?: number | null | undefined;
1627
+ };
1628
+ unitPrice?: number | null | undefined;
1629
+ }[] | undefined;
1630
+ }>;
1631
+ } & {
1632
+ "/me/logto-enterprises/:id/invoices": import("@withtyped/server").PathGuard<"/:id/invoices", unknown, unknown, {
1633
+ invoices: {
1634
+ status: "open" | "void" | "draft" | "paid" | "uncollectible" | null;
1635
+ id: string;
1636
+ createdAt: Date;
1637
+ updatedAt: Date;
1638
+ customerId: string | null;
1639
+ basicSkuId: string | null;
1640
+ billingReason: string | null;
1641
+ periodStart: Date;
1642
+ periodEnd: Date;
1643
+ amountDue: number;
1644
+ amountPaid: number;
1645
+ subscriptionId: string | null;
1646
+ hostedInvoiceUrl: string | null;
1647
+ invoicePdf: string | null;
1648
+ collectionMethod: "charge_automatically" | "send_invoice" | null;
1649
+ dueDate: Date | null;
1650
+ }[];
1651
+ }>;
1652
+ } & {
1653
+ "/me/logto-enterprises/:enterpriseId/invoices/:invoiceId/hosted-invoice-url": import("@withtyped/server").PathGuard<"/:enterpriseId/invoices/:invoiceId/hosted-invoice-url", unknown, unknown, {
1654
+ hostedInvoiceUrl: string;
1655
+ }>;
1656
+ };
1657
+ post: {
1658
+ "/me/logto-enterprises/:id/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:id/stripe-customer-portal", unknown, {
1659
+ callbackUrl?: string | undefined;
1660
+ }, {
1661
+ redirectUri: string;
425
1662
  }>;
426
1663
  };
427
1664
  put: {};
@@ -429,9 +1666,131 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
429
1666
  copy: {};
430
1667
  head: {};
431
1668
  }, "/api">>, "/api">;
1669
+ export declare const tenantAuthRouter: import("@withtyped/server").Router<RequestContext, import("@withtyped/server").WithBodyContext<import("@withtyped/server").BaseContext & {
1670
+ request: {
1671
+ id?: string | undefined;
1672
+ method?: import("@withtyped/server").RequestMethod | undefined;
1673
+ headers: import("http").IncomingHttpHeaders;
1674
+ url: URL;
1675
+ body?: unknown;
1676
+ };
1677
+ }>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
1678
+ options: {};
1679
+ patch: {
1680
+ "/:tenantId/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/status", unknown, {
1681
+ status: OrganizationInvitationStatus.Revoked;
1682
+ }, {
1683
+ status: OrganizationInvitationStatus;
1684
+ tenantId: string;
1685
+ id: string;
1686
+ createdAt: number;
1687
+ updatedAt: number;
1688
+ inviterId: string | null;
1689
+ invitee: string;
1690
+ acceptedUserId: string | null;
1691
+ organizationId: string;
1692
+ expiresAt: number;
1693
+ organizationRoles: OrganizationRoleEntity[];
1694
+ }>;
1695
+ };
1696
+ get: {
1697
+ "/:tenantId/members": import("@withtyped/server").PathGuard<"/:tenantId/members", unknown, unknown, {
1698
+ id: string;
1699
+ name: string | null;
1700
+ username: string | null;
1701
+ primaryEmail: string | null;
1702
+ primaryPhone: string | null;
1703
+ avatar: string | null;
1704
+ organizationRoles: OrganizationRoleEntity[];
1705
+ }[]>;
1706
+ } & {
1707
+ "/:tenantId/members/:userId/scopes": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/scopes", unknown, unknown, OrganizationScope[]>;
1708
+ } & {
1709
+ "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, unknown, ({
1710
+ status: OrganizationInvitationStatus;
1711
+ tenantId: string;
1712
+ id: string;
1713
+ createdAt: number;
1714
+ updatedAt: number;
1715
+ inviterId: string | null;
1716
+ invitee: string;
1717
+ acceptedUserId: string | null;
1718
+ organizationId: string;
1719
+ expiresAt: number;
1720
+ organizationRoles: OrganizationRoleEntity[];
1721
+ } & {
1722
+ inviterName?: string | undefined;
1723
+ })[]>;
1724
+ };
1725
+ post: {
1726
+ "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
1727
+ invitee: string | string[];
1728
+ roleName: TenantRole;
1729
+ expiresAt?: number | undefined;
1730
+ }, {
1731
+ status: OrganizationInvitationStatus;
1732
+ tenantId: string;
1733
+ id: string;
1734
+ createdAt: number;
1735
+ updatedAt: number;
1736
+ inviterId: string | null;
1737
+ invitee: string;
1738
+ acceptedUserId: string | null;
1739
+ organizationId: string;
1740
+ expiresAt: number;
1741
+ organizationRoles: OrganizationRoleEntity[];
1742
+ } | {
1743
+ status: OrganizationInvitationStatus;
1744
+ tenantId: string;
1745
+ id: string;
1746
+ createdAt: number;
1747
+ updatedAt: number;
1748
+ inviterId: string | null;
1749
+ invitee: string;
1750
+ acceptedUserId: string | null;
1751
+ organizationId: string;
1752
+ expiresAt: number;
1753
+ organizationRoles: OrganizationRoleEntity[];
1754
+ }[]>;
1755
+ } & {
1756
+ "/:tenantId/invitations/:invitationId/message": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/message", unknown, unknown, unknown>;
1757
+ };
1758
+ put: {
1759
+ "/:tenantId/members/:userId/roles": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/roles", unknown, {
1760
+ roleName: TenantRole;
1761
+ }, unknown>;
1762
+ };
1763
+ delete: {
1764
+ "/:tenantId/members/:userId": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId", unknown, unknown, unknown>;
1765
+ } & {
1766
+ "/:tenantId/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId", unknown, unknown, unknown>;
1767
+ };
1768
+ copy: {};
1769
+ head: {};
1770
+ }, "/api/tenants">>, import("@withtyped/server").RoutesWithPrefix<{
1771
+ options: {};
1772
+ patch: {
1773
+ "/:tenantId/settings": import("@withtyped/server").PathGuard<"/:tenantId/settings", unknown, {
1774
+ isMfaRequired?: boolean | undefined;
1775
+ }, {
1776
+ isMfaRequired: boolean;
1777
+ }>;
1778
+ };
1779
+ get: {
1780
+ "/:tenantId/settings": import("@withtyped/server").PathGuard<"/:tenantId/settings", unknown, unknown, {
1781
+ isMfaRequired: boolean;
1782
+ }>;
1783
+ };
1784
+ post: {};
1785
+ put: {};
1786
+ delete: {};
1787
+ copy: {};
1788
+ head: {};
1789
+ }, "/api/tenants">>, "/api/tenants">;
432
1790
 
433
1791
  export {
434
- router as default,
1792
+ router as anonymousRouter,
1793
+ router$1 as default,
435
1794
  };
436
1795
 
437
1796
  export {};