@logto/cloud 0.2.5-93f5b5e → 0.2.5-96334d3

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