@logto/cloud 0.2.5-c6ed487 → 0.2.5-cb80c9b

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