@logto/cloud 0.2.5-81f06ea → 0.2.5-8741de8

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