@logto/cloud 0.2.5-ab8a489 → 0.2.5-acaf5b8

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 +1248 -208
  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,16 @@ 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
+ };
40
50
  declare enum LogtoJwtTokenKeyType {
41
51
  AccessToken = "access-token",
42
52
  ClientCredentials = "client-credentials"
@@ -59,24 +69,118 @@ declare enum TenantRole {
59
69
  /** Collaborator of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
60
70
  Collaborator = "collaborator"
61
71
  }
62
- declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
63
- createdAt: Date;
64
- affiliateId: string;
65
- type: "hostname" | "query";
66
- value: string;
67
- }, "createdAt", "createdAt">;
68
- export type AffiliateProperty = InferModelType<typeof AffiliateProperties>;
69
- declare const Affiliates: import("@withtyped/server/lib/model/index.js").default<"affiliates", {
70
- name: string;
71
- createdAt: Date;
72
- id: string;
73
- }, "id" | "createdAt", "id" | "createdAt">;
74
- export type Affiliate = InferModelType<typeof Affiliates>;
75
- export type AffiliateData = Affiliate & {
76
- 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>;
77
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
+ }
78
181
  declare const router: import("@withtyped/server").Router<RequestContext, WithAuthContext<Omit<import("@withtyped/server").BaseContext & {
79
182
  request: {
183
+ id?: string | undefined;
80
184
  method?: import("@withtyped/server").RequestMethod | undefined;
81
185
  headers: import("http").IncomingHttpHeaders;
82
186
  url: URL;
@@ -84,6 +188,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
84
188
  };
85
189
  }, "request"> & {
86
190
  request: Record<string, unknown> & {
191
+ id?: string | undefined;
87
192
  method?: import("@withtyped/server").RequestMethod | undefined;
88
193
  headers: import("http").IncomingHttpHeaders;
89
194
  url: URL;
@@ -92,17 +197,23 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
92
197
  body?: Json | undefined;
93
198
  bodyRaw?: Buffer | undefined;
94
199
  };
95
- }>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
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<{
96
201
  patch: {
97
202
  "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
98
203
  name?: string | undefined;
99
204
  }, {
100
205
  id: string;
101
206
  name: string;
207
+ createdAt: Date;
208
+ quota: {
209
+ mauLimit: number | null;
210
+ tokenLimit: number | null;
211
+ };
102
212
  usage: {
103
- activeUsers: number;
104
- cost: number;
213
+ userTokenUsage: number;
214
+ m2mTokenUsage: number;
105
215
  tokenUsage: number;
216
+ activeUsers: number;
106
217
  };
107
218
  indicator: string;
108
219
  isSuspended: boolean;
@@ -112,11 +223,22 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
112
223
  planId: string;
113
224
  currentPeriodStart: Date;
114
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;
115
235
  };
236
+ regionName: string;
237
+ tag: TenantTag;
116
238
  openInvoices: {
117
- status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
118
239
  id: string;
119
240
  createdAt: Date;
241
+ status: "open" | "void" | "draft" | "paid" | "uncollectible" | null;
120
242
  updatedAt: Date;
121
243
  customerId: string | null;
122
244
  billingReason: string | null;
@@ -124,11 +246,16 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
124
246
  periodEnd: Date;
125
247
  amountDue: number;
126
248
  amountPaid: number;
249
+ basicSkuId: string | null;
127
250
  subscriptionId: string | null;
128
251
  hostedInvoiceUrl: string | null;
129
252
  invoicePdf: string | null;
253
+ collectionMethod: "charge_automatically" | "send_invoice" | null;
254
+ dueDate: Date | null;
130
255
  }[];
131
- tag: TenantTag;
256
+ featureFlags?: {
257
+ isMultipleCustomDomainsEnabled?: boolean | undefined;
258
+ } | undefined;
132
259
  }>;
133
260
  };
134
261
  options: {};
@@ -136,10 +263,16 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
136
263
  "/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
137
264
  id: string;
138
265
  name: string;
266
+ createdAt: Date;
267
+ quota: {
268
+ mauLimit: number | null;
269
+ tokenLimit: number | null;
270
+ };
139
271
  usage: {
140
- activeUsers: number;
141
- cost: number;
272
+ userTokenUsage: number;
273
+ m2mTokenUsage: number;
142
274
  tokenUsage: number;
275
+ activeUsers: number;
143
276
  };
144
277
  indicator: string;
145
278
  isSuspended: boolean;
@@ -149,11 +282,22 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
149
282
  planId: string;
150
283
  currentPeriodStart: Date;
151
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;
152
294
  };
295
+ regionName: string;
296
+ tag: TenantTag;
153
297
  openInvoices: {
154
- status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
155
298
  id: string;
156
299
  createdAt: Date;
300
+ status: "open" | "void" | "draft" | "paid" | "uncollectible" | null;
157
301
  updatedAt: Date;
158
302
  customerId: string | null;
159
303
  billingReason: string | null;
@@ -161,24 +305,37 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
161
305
  periodEnd: Date;
162
306
  amountDue: number;
163
307
  amountPaid: number;
308
+ basicSkuId: string | null;
164
309
  subscriptionId: string | null;
165
310
  hostedInvoiceUrl: string | null;
166
311
  invoicePdf: string | null;
312
+ collectionMethod: "charge_automatically" | "send_invoice" | null;
313
+ dueDate: Date | null;
167
314
  }[];
168
- tag: TenantTag;
315
+ featureFlags?: {
316
+ isMultipleCustomDomainsEnabled?: boolean | undefined;
317
+ } | undefined;
169
318
  }[]>;
170
319
  };
171
320
  post: {
172
321
  "/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
322
+ id?: string | undefined;
173
323
  name?: string | undefined;
324
+ regionName?: string | undefined;
174
325
  tag?: TenantTag | undefined;
175
326
  }, {
176
327
  id: string;
177
328
  name: string;
329
+ createdAt: Date;
330
+ quota: {
331
+ mauLimit: number | null;
332
+ tokenLimit: number | null;
333
+ };
178
334
  usage: {
179
- activeUsers: number;
180
- cost: number;
335
+ userTokenUsage: number;
336
+ m2mTokenUsage: number;
181
337
  tokenUsage: number;
338
+ activeUsers: number;
182
339
  };
183
340
  indicator: string;
184
341
  isSuspended: boolean;
@@ -188,11 +345,22 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
188
345
  planId: string;
189
346
  currentPeriodStart: Date;
190
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;
191
357
  };
358
+ regionName: string;
359
+ tag: TenantTag;
192
360
  openInvoices: {
193
- status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
194
361
  id: string;
195
362
  createdAt: Date;
363
+ status: "open" | "void" | "draft" | "paid" | "uncollectible" | null;
196
364
  updatedAt: Date;
197
365
  customerId: string | null;
198
366
  billingReason: string | null;
@@ -200,12 +368,27 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
200
368
  periodEnd: Date;
201
369
  amountDue: number;
202
370
  amountPaid: number;
371
+ basicSkuId: string | null;
203
372
  subscriptionId: string | null;
204
373
  hostedInvoiceUrl: string | null;
205
374
  invoicePdf: string | null;
375
+ collectionMethod: "charge_automatically" | "send_invoice" | null;
376
+ dueDate: Date | null;
206
377
  }[];
207
- tag: TenantTag;
378
+ featureFlags?: {
379
+ isMultipleCustomDomainsEnabled?: boolean | undefined;
380
+ } | undefined;
208
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
+ }[]>;
209
392
  };
210
393
  put: {};
211
394
  delete: {
@@ -219,23 +402,334 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
219
402
  get: {
220
403
  "/tenants/my/subscription": import("@withtyped/server").PathGuard<"/my/subscription", unknown, unknown, {
221
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
+ };
222
433
  planId: string;
223
434
  currentPeriodStart: Date;
224
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;
225
466
  }>;
226
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: {
227
579
  "/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
228
580
  status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
229
581
  planId: string;
230
582
  currentPeriodStart: Date;
231
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;
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;
232
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
+ }>>>;
233
727
  } & {
234
728
  "/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
235
729
  invoices: {
236
- status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
237
730
  id: string;
238
731
  createdAt: Date;
732
+ status: "open" | "void" | "draft" | "paid" | "uncollectible" | null;
239
733
  updatedAt: Date;
240
734
  customerId: string | null;
241
735
  billingReason: string | null;
@@ -243,22 +737,63 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
243
737
  periodEnd: Date;
244
738
  amountDue: number;
245
739
  amountPaid: number;
740
+ basicSkuId: string | null;
246
741
  subscriptionId: string | null;
247
742
  hostedInvoiceUrl: string | null;
248
743
  invoicePdf: string | null;
744
+ collectionMethod: "charge_automatically" | "send_invoice" | null;
745
+ dueDate: Date | null;
249
746
  planName: string | null;
747
+ skuId?: string | null | undefined;
250
748
  }[];
251
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
+ }[]>;
252
793
  } & {
253
794
  "/tenants/:tenantId/invoices/:invoiceId/hosted-invoice-url": import("@withtyped/server").PathGuard<"/:tenantId/invoices/:invoiceId/hosted-invoice-url", unknown, unknown, {
254
795
  hostedInvoiceUrl: string;
255
796
  }>;
256
- } & {
257
- "/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
258
- activeUsers: number;
259
- cost: number;
260
- tokenUsage: number;
261
- }>;
262
797
  };
263
798
  post: {
264
799
  "/tenants/:tenantId/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:tenantId/stripe-customer-portal", unknown, {
@@ -286,183 +821,298 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
286
821
  post: {
287
822
  "/services/mails": import("@withtyped/server").PathGuard<"/mails", unknown, {
288
823
  data: {
289
- type: TemplateType | VerificationCodeType;
824
+ type: TemplateType;
290
825
  payload: {
291
- code?: string | undefined;
292
826
  link?: string | undefined;
293
- } & Record<string, string> & {
827
+ code?: string | undefined;
828
+ locale?: string | undefined;
829
+ uiLocales?: string | undefined;
830
+ } & {
831
+ [k: string]: unknown;
832
+ } & {
294
833
  senderName?: string | undefined;
295
834
  companyInformation?: string | undefined;
296
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;
297
876
  };
298
877
  to: string;
878
+ ip?: string | undefined;
299
879
  };
300
880
  }, unknown>;
301
881
  } & {
302
882
  "/services/send-sms": import("@withtyped/server").PathGuard<"/send-sms", unknown, {
303
883
  data: {
304
- type: TemplateType | VerificationCodeType;
884
+ type: TemplateType;
305
885
  to: string;
306
886
  payload: {
307
887
  code?: string | undefined;
308
888
  link?: string | undefined;
309
- } & Record<string, string>;
889
+ locale?: string | undefined;
890
+ uiLocales?: string | undefined;
891
+ } & {
892
+ [k: string]: unknown;
893
+ };
894
+ ip?: string | undefined;
310
895
  };
311
896
  }, unknown>;
312
897
  } & {
313
- "/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", unknown, {
314
- script: string;
315
- tokenType: LogtoJwtTokenKeyType.AccessToken;
898
+ "/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", {
899
+ isTest?: string | undefined;
900
+ }, {
316
901
  token: Record<string, Json>;
317
902
  context: Record<string, Json>;
903
+ tokenType: LogtoJwtTokenKeyType.AccessToken;
904
+ script: string;
318
905
  environmentVariables?: Record<string, string> | undefined;
319
906
  } | {
320
- script: string;
321
- tokenType: LogtoJwtTokenKeyType.ClientCredentials;
322
907
  token: Record<string, Json>;
908
+ tokenType: LogtoJwtTokenKeyType.ClientCredentials;
909
+ script: string;
323
910
  environmentVariables?: Record<string, string> | undefined;
324
911
  }, Record<string, unknown>>;
325
912
  };
326
- put: {};
327
- 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
+ };
328
928
  copy: {};
329
929
  head: {};
330
930
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
331
931
  patch: {};
332
932
  options: {};
333
933
  get: {
334
- "/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
934
+ "/skus": import("@withtyped/server").PathGuard<"/", {
935
+ type?: LogtoSkuType | undefined;
936
+ }, unknown, {
335
937
  id: string;
938
+ name: string | null;
336
939
  createdAt: Date;
337
- name: string;
338
- updatedAt: Date;
339
- stripeProducts: {
340
- type: "flat" | "tier1" | "tier2" | "tier3";
341
- id: string;
342
- name: string;
343
- price: {
344
- id: string;
345
- unitAmountDecimal: string;
346
- quantity?: 1 | undefined;
347
- unitAmount?: number | null | undefined;
348
- };
349
- description?: string | undefined;
350
- }[];
940
+ defaultPriceId: string | null;
941
+ unitPrice: number | null;
942
+ type: LogtoSkuType;
351
943
  quota: {
352
- mauLimit: number | null;
353
- tokenLimit: number | null;
354
- applicationsLimit: number | null;
355
- machineToMachineLimit: number | null;
356
- resourcesLimit: number | null;
357
- scopesPerResourceLimit: number | null;
358
- customDomainEnabled: boolean;
359
- omniSignInEnabled: boolean;
360
- builtInEmailConnectorEnabled: boolean;
361
- socialConnectorsLimit: number | null;
362
- standardConnectorsLimit: number | null;
363
- rolesLimit: number | null;
364
- machineToMachineRolesLimit: number | null;
365
- scopesPerRoleLimit: number | null;
366
- hooksLimit: number | null;
367
- auditLogsRetentionDays: number | null;
368
- mfaEnabled: boolean;
369
- organizationsEnabled: boolean;
370
- ssoEnabled: boolean;
371
- thirdPartyApplicationsLimit: number | null;
372
- tenantMembersLimit: 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;
373
970
  };
374
- }[]>;
375
- };
376
- post: {};
377
- put: {};
378
- delete: {};
379
- copy: {};
380
- head: {};
381
- }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
382
- patch: {};
383
- options: {};
384
- get: {
385
- "/checkout-session/:id": import("@withtyped/server").PathGuard<"/:id", unknown, unknown, {
386
- id: string;
387
- createdAt: Date;
388
- userId: string;
389
- status: "open" | "complete" | "expired";
390
- tenantId: string | null;
971
+ isDefault: boolean;
972
+ isDevPlan: boolean;
391
973
  updatedAt: Date;
392
- planId: string;
974
+ productId: string | null;
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;
393
980
  }>;
394
981
  };
395
982
  post: {
396
- "/checkout-session": import("@withtyped/server").PathGuard<"/", unknown, {
397
- planId: string;
398
- successCallbackUrl: string;
399
- tenantId?: string | undefined;
400
- cancelCallbackUrl?: string | undefined;
401
- tenantTag?: TenantTag | undefined;
402
- tenantName?: string | undefined;
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;
403
1017
  }, {
404
- sessionId: string;
405
- redirectUri?: string | null | undefined;
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;
406
1052
  }>;
407
- };
408
- put: {};
409
- delete: {};
410
- copy: {};
411
- head: {};
412
- }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
413
- patch: {};
414
- options: {};
415
- get: {
416
- "/affiliates": import("@withtyped/server").PathGuard<"/", unknown, unknown, AffiliateData[]>;
417
- };
418
- post: {
419
- "/affiliates": import("@withtyped/server").PathGuard<"/", unknown, {
420
- name: string;
1053
+ } & {
1054
+ "/skus/:skuId/products": import("@withtyped/server").PathGuard<"/:skuId/products", {
1055
+ isOneTime?: string | undefined;
421
1056
  }, {
422
- id: string;
423
- createdAt: Date;
424
1057
  name: string;
1058
+ unitPrice: number;
1059
+ }, {
1060
+ productId: string;
425
1061
  }>;
426
1062
  } & {
427
- "/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
428
- type: "hostname" | "query";
429
- value: string;
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;
430
1066
  }, {
431
- createdAt: Date;
432
- affiliateId: string;
433
- type: "hostname" | "query";
434
- value: string;
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;
435
1078
  }>;
436
1079
  };
437
- put: {};
438
1080
  delete: {
439
- "/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
440
- type: "hostname" | "query";
441
- value: string;
442
- }, unknown>;
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>;
443
1086
  };
444
1087
  copy: {};
445
1088
  head: {};
446
1089
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
447
1090
  patch: {};
448
1091
  options: {};
449
- get: {};
450
- post: {
451
- "/affiliate-logs": import("@withtyped/server").PathGuard<"/", unknown, {
452
- createdAt: string;
453
- userId: string;
454
- hostname?: string | undefined;
455
- query?: string | undefined;
456
- }, {
457
- id: string;
1092
+ get: {
1093
+ "/checkout-session/:id": import("@withtyped/server").PathGuard<"/:id", unknown, unknown, {
1094
+ tenantId: string | null;
1095
+ status: "open" | "complete" | "expired";
458
1096
  createdAt: Date;
459
- affiliateId: string | null;
1097
+ updatedAt: Date;
1098
+ id: string;
1099
+ planId: string | null;
1100
+ skuId: string | null;
460
1101
  userId: string;
461
- createdVia: {
462
- createdAt: string;
463
- hostname?: string | undefined;
464
- query?: string | undefined;
465
- };
1102
+ }>;
1103
+ };
1104
+ post: {
1105
+ "/checkout-session": import("@withtyped/server").PathGuard<"/", unknown, {
1106
+ successCallbackUrl: string;
1107
+ tenantId?: string | undefined;
1108
+ skuId?: string | undefined;
1109
+ tenantTag?: TenantTag | undefined;
1110
+ tenantName?: string | undefined;
1111
+ tenantRegionName?: string | undefined;
1112
+ cancelCallbackUrl?: string | undefined;
1113
+ }, {
1114
+ sessionId: string;
1115
+ redirectUri?: string | null | undefined;
466
1116
  }>;
467
1117
  };
468
1118
  put: {};
@@ -478,11 +1128,11 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
478
1128
  options: {};
479
1129
  get: {
480
1130
  "/invitations": import("@withtyped/server").PathGuard<"/", unknown, unknown, ({
481
- id: string;
482
- createdAt: number;
483
- status: OrganizationInvitationStatus;
484
1131
  tenantId: string;
1132
+ status: OrganizationInvitationStatus;
1133
+ createdAt: number;
485
1134
  updatedAt: number;
1135
+ id: string;
486
1136
  inviterId: string | null;
487
1137
  invitee: string;
488
1138
  acceptedUserId: string | null;
@@ -495,11 +1145,11 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
495
1145
  })[]>;
496
1146
  } & {
497
1147
  "/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:invitationId", unknown, unknown, {
498
- id: string;
499
- createdAt: number;
500
- status: OrganizationInvitationStatus;
501
1148
  tenantId: string;
1149
+ status: OrganizationInvitationStatus;
1150
+ createdAt: number;
502
1151
  updatedAt: number;
1152
+ id: string;
503
1153
  inviterId: string | null;
504
1154
  invitee: string;
505
1155
  acceptedUserId: string | null;
@@ -513,9 +1163,414 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
513
1163
  delete: {};
514
1164
  copy: {};
515
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
+ };
1190
+ }, {
1191
+ createdAt: Date;
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
+ };
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
+ }[]>;
1248
+ } & {
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;
1301
+ }, {
1302
+ createdAt: Date;
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
+ }[];
1337
+ }>;
1338
+ };
1339
+ put: {};
1340
+ delete: {
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[];
1345
+ }, unknown>;
1346
+ };
1347
+ copy: {};
1348
+ head: {};
1349
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
1350
+ patch: {};
1351
+ options: {};
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
+ };
1389
+ post: {
1390
+ "/me/regions/:regionName/users": import("@withtyped/server").PathGuard<"/:regionName/users", unknown, {
1391
+ role: DatabaseRegionAccessRole;
1392
+ userId: string;
1393
+ }, {
1394
+ role: DatabaseRegionAccessRole;
1395
+ userId: string;
1396
+ }>;
1397
+ };
1398
+ put: {};
1399
+ delete: {
1400
+ "/me/regions/:regionName/users/:userId": import("@withtyped/server").PathGuard<"/:regionName/users/:userId", unknown, unknown, unknown>;
1401
+ };
1402
+ copy: {};
1403
+ head: {};
1404
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
1405
+ patch: {};
1406
+ options: {};
1407
+ get: {
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
+ }>;
1417
+ } & {
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;
1425
+ id: string;
1426
+ name: string | null;
1427
+ quotaScope: QuotaScope;
1428
+ regionNames: string[];
1429
+ quota?: {
1430
+ basicQuota: {
1431
+ auditLogsRetentionDays: number | null;
1432
+ subjectTokenEnabled: boolean;
1433
+ mauLimit: number | null;
1434
+ applicationsLimit: number | null;
1435
+ thirdPartyApplicationsLimit: number | null;
1436
+ scopesPerResourceLimit: number | null;
1437
+ socialConnectorsLimit: number | null;
1438
+ userRolesLimit: number | null;
1439
+ machineToMachineRolesLimit: number | null;
1440
+ scopesPerRoleLimit: number | null;
1441
+ hooksLimit: number | null;
1442
+ customJwtEnabled: boolean;
1443
+ bringYourUiEnabled: boolean;
1444
+ collectUserProfileEnabled: boolean;
1445
+ tokenLimit: number | null;
1446
+ machineToMachineLimit: number | null;
1447
+ resourcesLimit: number | null;
1448
+ enterpriseSsoLimit: number | null;
1449
+ tenantMembersLimit: number | null;
1450
+ mfaEnabled: boolean;
1451
+ organizationsEnabled: boolean;
1452
+ organizationsLimit: number | null;
1453
+ securityFeaturesEnabled: boolean;
1454
+ idpInitiatedSsoEnabled: boolean;
1455
+ samlApplicationsLimit: number | null;
1456
+ customDomainsLimit: number | null;
1457
+ };
1458
+ aggregatedQuota: {
1459
+ auditLogsRetentionDays: number | null;
1460
+ subjectTokenEnabled: boolean;
1461
+ mauLimit: number | null;
1462
+ applicationsLimit: number | null;
1463
+ thirdPartyApplicationsLimit: number | null;
1464
+ scopesPerResourceLimit: number | null;
1465
+ socialConnectorsLimit: number | null;
1466
+ userRolesLimit: number | null;
1467
+ machineToMachineRolesLimit: number | null;
1468
+ scopesPerRoleLimit: number | null;
1469
+ hooksLimit: number | null;
1470
+ customJwtEnabled: boolean;
1471
+ bringYourUiEnabled: boolean;
1472
+ collectUserProfileEnabled: boolean;
1473
+ tokenLimit: number | null;
1474
+ machineToMachineLimit: number | null;
1475
+ resourcesLimit: number | null;
1476
+ enterpriseSsoLimit: number | null;
1477
+ tenantMembersLimit: number | null;
1478
+ mfaEnabled: boolean;
1479
+ organizationsEnabled: boolean;
1480
+ organizationsLimit: number | null;
1481
+ securityFeaturesEnabled: boolean;
1482
+ idpInitiatedSsoEnabled: boolean;
1483
+ samlApplicationsLimit: number | null;
1484
+ customDomainsLimit: number | null;
1485
+ };
1486
+ } | undefined;
1487
+ usages?: {
1488
+ mauLimit: number;
1489
+ applicationsLimit: number;
1490
+ thirdPartyApplicationsLimit: number;
1491
+ socialConnectorsLimit: number;
1492
+ userRolesLimit: number;
1493
+ machineToMachineRolesLimit: number;
1494
+ hooksLimit: number;
1495
+ customJwtEnabled: boolean;
1496
+ bringYourUiEnabled: boolean;
1497
+ collectUserProfileEnabled: boolean;
1498
+ tokenLimit: number;
1499
+ machineToMachineLimit: number;
1500
+ resourcesLimit: number;
1501
+ enterpriseSsoLimit: number;
1502
+ tenantMembersLimit: number;
1503
+ mfaEnabled: boolean;
1504
+ organizationsEnabled: boolean;
1505
+ organizationsLimit: number;
1506
+ securityFeaturesEnabled: boolean;
1507
+ idpInitiatedSsoEnabled: boolean;
1508
+ samlApplicationsLimit: number;
1509
+ customDomainsLimit: number;
1510
+ } | undefined;
1511
+ subscription?: {
1512
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
1513
+ currentPeriodStart: Date;
1514
+ currentPeriodEnd: Date;
1515
+ quotaScope: "dedicated" | "shared";
1516
+ isEnterprisePlan: boolean;
1517
+ id?: string | undefined;
1518
+ upcomingInvoice?: {
1519
+ subtotal: number;
1520
+ subtotalExcludingTax: number | null;
1521
+ total: number;
1522
+ totalExcludingTax: number | null;
1523
+ } | null | undefined;
1524
+ } | undefined;
1525
+ subscriptionSkuItems?: {
1526
+ count: number;
1527
+ logtoSkuId: string;
1528
+ type: LogtoSkuType;
1529
+ quota: Partial<LogtoSkuQuota>;
1530
+ isDevPlan: boolean;
1531
+ }[] | undefined;
1532
+ }>;
1533
+ } & {
1534
+ "/me/logto-enterprises/:id/invoices": import("@withtyped/server").PathGuard<"/:id/invoices", unknown, unknown, {
1535
+ invoices: {
1536
+ status: "open" | "void" | "draft" | "paid" | "uncollectible" | null;
1537
+ createdAt: Date;
1538
+ updatedAt: Date;
1539
+ id: string;
1540
+ customerId: string | null;
1541
+ basicSkuId: string | null;
1542
+ billingReason: string | null;
1543
+ periodStart: Date;
1544
+ periodEnd: Date;
1545
+ amountDue: number;
1546
+ amountPaid: number;
1547
+ subscriptionId: string | null;
1548
+ hostedInvoiceUrl: string | null;
1549
+ invoicePdf: string | null;
1550
+ collectionMethod: "charge_automatically" | "send_invoice" | null;
1551
+ dueDate: Date | null;
1552
+ }[];
1553
+ }>;
1554
+ } & {
1555
+ "/me/logto-enterprises/:enterpriseId/invoices/:invoiceId/hosted-invoice-url": import("@withtyped/server").PathGuard<"/:enterpriseId/invoices/:invoiceId/hosted-invoice-url", unknown, unknown, {
1556
+ hostedInvoiceUrl: string;
1557
+ }>;
1558
+ };
1559
+ post: {
1560
+ "/me/logto-enterprises/:id/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:id/stripe-customer-portal", unknown, {
1561
+ callbackUrl?: string | undefined;
1562
+ }, {
1563
+ redirectUri: string;
1564
+ }>;
1565
+ };
1566
+ put: {};
1567
+ delete: {};
1568
+ copy: {};
1569
+ head: {};
516
1570
  }, "/api">>, "/api">;
517
1571
  export declare const tenantAuthRouter: import("@withtyped/server").Router<RequestContext, import("@withtyped/server").WithBodyContext<import("@withtyped/server").BaseContext & {
518
1572
  request: {
1573
+ id?: string | undefined;
519
1574
  method?: import("@withtyped/server").RequestMethod | undefined;
520
1575
  headers: import("http").IncomingHttpHeaders;
521
1576
  url: URL;
@@ -526,11 +1581,11 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
526
1581
  "/:tenantId/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/status", unknown, {
527
1582
  status: OrganizationInvitationStatus.Revoked;
528
1583
  }, {
529
- id: string;
530
- createdAt: number;
531
- status: OrganizationInvitationStatus;
532
1584
  tenantId: string;
1585
+ status: OrganizationInvitationStatus;
1586
+ createdAt: number;
533
1587
  updatedAt: number;
1588
+ id: string;
534
1589
  inviterId: string | null;
535
1590
  invitee: string;
536
1591
  acceptedUserId: string | null;
@@ -550,13 +1605,15 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
550
1605
  avatar: string | null;
551
1606
  organizationRoles: OrganizationRoleEntity[];
552
1607
  }[]>;
1608
+ } & {
1609
+ "/:tenantId/members/:userId/scopes": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/scopes", unknown, unknown, OrganizationScope[]>;
553
1610
  } & {
554
1611
  "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, unknown, ({
555
- id: string;
556
- createdAt: number;
557
- status: OrganizationInvitationStatus;
558
1612
  tenantId: string;
1613
+ status: OrganizationInvitationStatus;
1614
+ createdAt: number;
559
1615
  updatedAt: number;
1616
+ id: string;
560
1617
  inviterId: string | null;
561
1618
  invitee: string;
562
1619
  acceptedUserId: string | null;
@@ -569,22 +1626,34 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
569
1626
  };
570
1627
  post: {
571
1628
  "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
572
- invitee: string;
1629
+ invitee: string | string[];
573
1630
  roleName: TenantRole;
574
1631
  expiresAt?: number | undefined;
575
1632
  }, {
576
- id: string;
577
- createdAt: number;
1633
+ tenantId: string;
578
1634
  status: OrganizationInvitationStatus;
1635
+ createdAt: number;
1636
+ updatedAt: number;
1637
+ id: string;
1638
+ inviterId: string | null;
1639
+ invitee: string;
1640
+ acceptedUserId: string | null;
1641
+ organizationId: string;
1642
+ expiresAt: number;
1643
+ organizationRoles: OrganizationRoleEntity[];
1644
+ } | {
579
1645
  tenantId: string;
1646
+ status: OrganizationInvitationStatus;
1647
+ createdAt: number;
580
1648
  updatedAt: number;
1649
+ id: string;
581
1650
  inviterId: string | null;
582
1651
  invitee: string;
583
1652
  acceptedUserId: string | null;
584
1653
  organizationId: string;
585
1654
  expiresAt: number;
586
1655
  organizationRoles: OrganizationRoleEntity[];
587
- }>;
1656
+ }[]>;
588
1657
  } & {
589
1658
  "/:tenantId/invitations/:invitationId/message": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/message", unknown, unknown, unknown>;
590
1659
  };
@@ -601,35 +1670,6 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
601
1670
  copy: {};
602
1671
  head: {};
603
1672
  }, "/api/tenants">>, "/api/tenants">;
604
- export declare const functionsRouter: import("@withtyped/server").Router<RequestContext, WithAuthContext<Omit<import("@withtyped/server").BaseContext & {
605
- request: {
606
- method?: import("@withtyped/server").RequestMethod | undefined;
607
- headers: import("http").IncomingHttpHeaders;
608
- url: URL;
609
- body?: unknown;
610
- };
611
- }, "request"> & {
612
- request: Record<string, unknown> & {
613
- method?: import("@withtyped/server").RequestMethod | undefined;
614
- headers: import("http").IncomingHttpHeaders;
615
- url: URL;
616
- body?: unknown;
617
- } & {
618
- body?: Json | undefined;
619
- bodyRaw?: Buffer | undefined;
620
- };
621
- }>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
622
- patch: {};
623
- options: {};
624
- get: {};
625
- post: {
626
- "/database-alteration": import("@withtyped/server").PathGuard<"/database-alteration", unknown, Json, unknown>;
627
- };
628
- put: {};
629
- delete: {};
630
- copy: {};
631
- head: {};
632
- }, "/functions">>, "/functions">;
633
1673
 
634
1674
  export {
635
1675
  router as default,