@logto/cloud 0.2.5-4f1d80b → 0.2.5-4f7a3b5

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.
@@ -0,0 +1,1145 @@
1
+ // Generated by dts-bundle-generator v9.3.1
2
+
3
+ import { Json, JsonObject, RequestContext } from '@withtyped/server';
4
+ import { InferModelType } from '@withtyped/server/model';
5
+
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
+ ];
18
+ export type ReportableUsageKey = (typeof availableReportableUsageKeys)[number];
19
+ export type RealtimeReportableUsageKey = Exclude<ReportableUsageKey, "tokenLimit">;
20
+ declare enum LogtoSkuType {
21
+ Basic = "Basic",
22
+ AddOn = "AddOn"
23
+ }
24
+ declare enum TemplateType {
25
+ /** The template for sending verification code when user is signing in. */
26
+ SignIn = "SignIn",
27
+ /** The template for sending verification code when user is registering. */
28
+ Register = "Register",
29
+ /** The template for sending verification code when user is resetting password. */
30
+ ForgotPassword = "ForgotPassword",
31
+ /** The template for sending organization invitation. */
32
+ OrganizationInvitation = "OrganizationInvitation",
33
+ /** The template for generic usage. */
34
+ Generic = "Generic",
35
+ /** The template for validating user permission for sensitive operations. */
36
+ UserPermissionValidation = "UserPermissionValidation",
37
+ /** The template for binding a new identifier to an existing account. */
38
+ BindNewIdentifier = "BindNewIdentifier"
39
+ }
40
+ declare enum OrganizationInvitationStatus {
41
+ Pending = "Pending",
42
+ Accepted = "Accepted",
43
+ Expired = "Expired",
44
+ Revoked = "Revoked"
45
+ }
46
+ /** The scopes (permissions) defined by the organization template. */
47
+ export type OrganizationScope = {
48
+ tenantId: string;
49
+ /** The globally unique identifier of the organization scope. */
50
+ id: string;
51
+ /** The organization scope's name, unique within the organization template. */
52
+ name: string;
53
+ /** A brief description of the organization scope. */
54
+ description: string | null;
55
+ };
56
+ declare enum LogtoJwtTokenKeyType {
57
+ AccessToken = "access-token",
58
+ ClientCredentials = "client-credentials"
59
+ }
60
+ /**
61
+ * The simplified organization role entity that is returned in the `roles` field
62
+ * of the organization.
63
+ */
64
+ export type OrganizationRoleEntity = {
65
+ id: string;
66
+ name: string;
67
+ };
68
+ declare enum TenantTag {
69
+ Development = "development",
70
+ Production = "production"
71
+ }
72
+ declare enum TenantRole {
73
+ /** Admin of the tenant, who has all permissions. */
74
+ Admin = "admin",
75
+ /** Collaborator of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
76
+ Collaborator = "collaborator"
77
+ }
78
+ declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
79
+ createdAt: Date;
80
+ affiliateId: string;
81
+ type: "hostname" | "query";
82
+ value: string;
83
+ }, "createdAt", "createdAt">;
84
+ export type AffiliateProperty = InferModelType<typeof AffiliateProperties>;
85
+ declare const Affiliates: import("@withtyped/server/lib/model/index.js").default<"affiliates", {
86
+ name: string;
87
+ createdAt: Date;
88
+ id: string;
89
+ }, "id" | "createdAt", "id" | "createdAt">;
90
+ export type Affiliate = InferModelType<typeof Affiliates>;
91
+ declare const publicRegionNames: readonly [
92
+ "EU",
93
+ "US",
94
+ "AU",
95
+ "JP"
96
+ ];
97
+ /** The type of region names for the public cloud. */
98
+ export type PublicRegionName = (typeof publicRegionNames)[number];
99
+ export type WithAuthContext<Context = RequestContext> = Context & {
100
+ auth: {
101
+ /** The ID of the authenticated subject (`sub`). */
102
+ id: string;
103
+ /** The scopes that the subject has (`scope`). */
104
+ scopes: string[];
105
+ };
106
+ };
107
+ export type AffiliateData = Affiliate & {
108
+ properties: Array<Pick<AffiliateProperty, "type" | "value">>;
109
+ };
110
+ declare const router: import("@withtyped/server").Router<RequestContext, WithAuthContext<Omit<import("@withtyped/server").BaseContext & {
111
+ request: {
112
+ id?: string | undefined;
113
+ method?: import("@withtyped/server").RequestMethod | undefined;
114
+ headers: import("http").IncomingHttpHeaders;
115
+ url: URL;
116
+ body?: unknown;
117
+ };
118
+ }, "request"> & {
119
+ request: Record<string, unknown> & {
120
+ id?: string | undefined;
121
+ method?: import("@withtyped/server").RequestMethod | undefined;
122
+ headers: import("http").IncomingHttpHeaders;
123
+ url: URL;
124
+ body?: unknown;
125
+ } & {
126
+ body?: Json | undefined;
127
+ bodyRaw?: Buffer | undefined;
128
+ };
129
+ }>, 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<{
130
+ patch: {
131
+ "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
132
+ name?: string | undefined;
133
+ }, {
134
+ id: string;
135
+ name: string;
136
+ createdAt: Date;
137
+ quota: {
138
+ mauLimit: number | null;
139
+ tokenLimit: number | null;
140
+ };
141
+ usage: {
142
+ activeUsers: number;
143
+ tokenUsage: number;
144
+ };
145
+ indicator: string;
146
+ isSuspended: boolean;
147
+ planId: string;
148
+ subscription: {
149
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
150
+ planId: string;
151
+ currentPeriodStart: Date;
152
+ currentPeriodEnd: Date;
153
+ isEnterprisePlan: boolean;
154
+ id?: string | undefined;
155
+ upcomingInvoice?: {
156
+ subtotal: number;
157
+ subtotalExcludingTax: number | null;
158
+ total: number;
159
+ totalExcludingTax: number | null;
160
+ } | null | undefined;
161
+ };
162
+ regionName: string;
163
+ tag: TenantTag;
164
+ openInvoices: {
165
+ id: string;
166
+ createdAt: Date;
167
+ status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
168
+ updatedAt: Date;
169
+ customerId: string | null;
170
+ billingReason: string | null;
171
+ periodStart: Date;
172
+ periodEnd: Date;
173
+ amountDue: number;
174
+ amountPaid: number;
175
+ basicSkuId: string | null;
176
+ subscriptionId: string | null;
177
+ hostedInvoiceUrl: string | null;
178
+ invoicePdf: string | null;
179
+ }[];
180
+ }>;
181
+ };
182
+ options: {};
183
+ get: {
184
+ "/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
185
+ id: string;
186
+ name: string;
187
+ createdAt: Date;
188
+ quota: {
189
+ mauLimit: number | null;
190
+ tokenLimit: number | null;
191
+ };
192
+ usage: {
193
+ activeUsers: number;
194
+ tokenUsage: number;
195
+ };
196
+ indicator: string;
197
+ isSuspended: boolean;
198
+ planId: string;
199
+ subscription: {
200
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
201
+ planId: string;
202
+ currentPeriodStart: Date;
203
+ currentPeriodEnd: Date;
204
+ isEnterprisePlan: boolean;
205
+ id?: string | undefined;
206
+ upcomingInvoice?: {
207
+ subtotal: number;
208
+ subtotalExcludingTax: number | null;
209
+ total: number;
210
+ totalExcludingTax: number | null;
211
+ } | null | undefined;
212
+ };
213
+ regionName: string;
214
+ tag: TenantTag;
215
+ openInvoices: {
216
+ id: string;
217
+ createdAt: Date;
218
+ status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
219
+ updatedAt: Date;
220
+ customerId: string | null;
221
+ billingReason: string | null;
222
+ periodStart: Date;
223
+ periodEnd: Date;
224
+ amountDue: number;
225
+ amountPaid: number;
226
+ basicSkuId: string | null;
227
+ subscriptionId: string | null;
228
+ hostedInvoiceUrl: string | null;
229
+ invoicePdf: string | null;
230
+ }[];
231
+ }[]>;
232
+ };
233
+ post: {
234
+ "/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
235
+ id?: string | undefined;
236
+ name?: string | undefined;
237
+ tag?: TenantTag | undefined;
238
+ regionName?: string | undefined;
239
+ }, {
240
+ id: string;
241
+ name: string;
242
+ createdAt: Date;
243
+ quota: {
244
+ mauLimit: number | null;
245
+ tokenLimit: number | null;
246
+ };
247
+ usage: {
248
+ activeUsers: number;
249
+ tokenUsage: number;
250
+ };
251
+ indicator: string;
252
+ isSuspended: boolean;
253
+ planId: string;
254
+ subscription: {
255
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
256
+ planId: string;
257
+ currentPeriodStart: Date;
258
+ currentPeriodEnd: Date;
259
+ isEnterprisePlan: boolean;
260
+ id?: string | undefined;
261
+ upcomingInvoice?: {
262
+ subtotal: number;
263
+ subtotalExcludingTax: number | null;
264
+ total: number;
265
+ totalExcludingTax: number | null;
266
+ } | null | undefined;
267
+ };
268
+ regionName: string;
269
+ tag: TenantTag;
270
+ openInvoices: {
271
+ id: string;
272
+ createdAt: Date;
273
+ status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
274
+ updatedAt: Date;
275
+ customerId: string | null;
276
+ billingReason: string | null;
277
+ periodStart: Date;
278
+ periodEnd: Date;
279
+ amountDue: number;
280
+ amountPaid: number;
281
+ basicSkuId: string | null;
282
+ subscriptionId: string | null;
283
+ hostedInvoiceUrl: string | null;
284
+ invoicePdf: string | null;
285
+ }[];
286
+ }>;
287
+ };
288
+ put: {};
289
+ delete: {
290
+ "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, unknown, unknown>;
291
+ };
292
+ copy: {};
293
+ head: {};
294
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
295
+ patch: {};
296
+ options: {};
297
+ get: {
298
+ "/tenants/my/subscription": import("@withtyped/server").PathGuard<"/my/subscription", unknown, unknown, {
299
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
300
+ quota: {
301
+ auditLogsRetentionDays: number | null;
302
+ mauLimit: number | null;
303
+ applicationsLimit: number | null;
304
+ thirdPartyApplicationsLimit: number | null;
305
+ scopesPerResourceLimit: number | null;
306
+ socialConnectorsLimit: number | null;
307
+ userRolesLimit: number | null;
308
+ machineToMachineRolesLimit: number | null;
309
+ scopesPerRoleLimit: number | null;
310
+ hooksLimit: number | null;
311
+ customJwtEnabled: boolean;
312
+ subjectTokenEnabled: boolean;
313
+ bringYourUiEnabled: boolean;
314
+ tokenLimit: number | null;
315
+ machineToMachineLimit: number | null;
316
+ resourcesLimit: number | null;
317
+ enterpriseSsoLimit: number | null;
318
+ tenantMembersLimit: number | null;
319
+ mfaEnabled: boolean;
320
+ organizationsEnabled: boolean;
321
+ organizationsLimit: number | null;
322
+ securityFeaturesEnabled: boolean;
323
+ idpInitiatedSsoEnabled: boolean;
324
+ samlApplicationsLimit: number | null;
325
+ captchaEnabled: boolean;
326
+ };
327
+ planId: string;
328
+ currentPeriodStart: Date;
329
+ currentPeriodEnd: Date;
330
+ isEnterprisePlan: boolean;
331
+ id?: string | undefined;
332
+ upcomingInvoice?: {
333
+ subtotal: number;
334
+ subtotalExcludingTax: number | null;
335
+ total: number;
336
+ totalExcludingTax: number | null;
337
+ } | null | undefined;
338
+ }>;
339
+ } & {
340
+ "/tenants/my/subscription-usage": import("@withtyped/server").PathGuard<"/my/subscription-usage", unknown, unknown, {
341
+ usage: {
342
+ applicationsLimit: number;
343
+ thirdPartyApplicationsLimit: number;
344
+ scopesPerResourceLimit: number;
345
+ socialConnectorsLimit: number;
346
+ userRolesLimit: number;
347
+ machineToMachineRolesLimit: number;
348
+ scopesPerRoleLimit: number;
349
+ hooksLimit: number;
350
+ customJwtEnabled: boolean;
351
+ subjectTokenEnabled: boolean;
352
+ bringYourUiEnabled: boolean;
353
+ machineToMachineLimit: number;
354
+ resourcesLimit: number;
355
+ enterpriseSsoLimit: number;
356
+ tenantMembersLimit: number;
357
+ mfaEnabled: boolean;
358
+ organizationsEnabled: boolean;
359
+ organizationsLimit: number;
360
+ securityFeaturesEnabled: boolean;
361
+ idpInitiatedSsoEnabled: boolean;
362
+ samlApplicationsLimit: number;
363
+ captchaEnabled: boolean;
364
+ };
365
+ resources: Record<string, number>;
366
+ roles: Record<string, number>;
367
+ quota: {
368
+ auditLogsRetentionDays: number | null;
369
+ mauLimit: number | null;
370
+ applicationsLimit: number | null;
371
+ thirdPartyApplicationsLimit: number | null;
372
+ scopesPerResourceLimit: number | null;
373
+ socialConnectorsLimit: number | null;
374
+ userRolesLimit: number | null;
375
+ machineToMachineRolesLimit: number | null;
376
+ scopesPerRoleLimit: number | null;
377
+ hooksLimit: number | null;
378
+ customJwtEnabled: boolean;
379
+ subjectTokenEnabled: boolean;
380
+ bringYourUiEnabled: boolean;
381
+ tokenLimit: number | null;
382
+ machineToMachineLimit: number | null;
383
+ resourcesLimit: number | null;
384
+ enterpriseSsoLimit: number | null;
385
+ tenantMembersLimit: number | null;
386
+ mfaEnabled: boolean;
387
+ organizationsEnabled: boolean;
388
+ organizationsLimit: number | null;
389
+ securityFeaturesEnabled: boolean;
390
+ idpInitiatedSsoEnabled: boolean;
391
+ samlApplicationsLimit: number | null;
392
+ captchaEnabled: boolean;
393
+ };
394
+ basicQuota: {
395
+ auditLogsRetentionDays: number | null;
396
+ mauLimit: number | null;
397
+ applicationsLimit: number | null;
398
+ thirdPartyApplicationsLimit: number | null;
399
+ scopesPerResourceLimit: number | null;
400
+ socialConnectorsLimit: number | null;
401
+ userRolesLimit: number | null;
402
+ machineToMachineRolesLimit: number | null;
403
+ scopesPerRoleLimit: number | null;
404
+ hooksLimit: number | null;
405
+ customJwtEnabled: boolean;
406
+ subjectTokenEnabled: boolean;
407
+ bringYourUiEnabled: boolean;
408
+ tokenLimit: number | null;
409
+ machineToMachineLimit: number | null;
410
+ resourcesLimit: number | null;
411
+ enterpriseSsoLimit: number | null;
412
+ tenantMembersLimit: number | null;
413
+ mfaEnabled: boolean;
414
+ organizationsEnabled: boolean;
415
+ organizationsLimit: number | null;
416
+ securityFeaturesEnabled: boolean;
417
+ idpInitiatedSsoEnabled: boolean;
418
+ samlApplicationsLimit: number | null;
419
+ captchaEnabled: boolean;
420
+ };
421
+ }>;
422
+ };
423
+ post: {
424
+ "/tenants/my/subscription/item-updates": import("@withtyped/server").PathGuard<"/my/subscription/item-updates", unknown, {
425
+ usageKey: RealtimeReportableUsageKey;
426
+ }, {
427
+ message: string;
428
+ }>;
429
+ };
430
+ put: {};
431
+ delete: {};
432
+ copy: {};
433
+ head: {};
434
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
435
+ patch: {};
436
+ options: {};
437
+ get: {
438
+ "/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
439
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
440
+ planId: string;
441
+ currentPeriodStart: Date;
442
+ currentPeriodEnd: Date;
443
+ isEnterprisePlan: boolean;
444
+ id?: string | undefined;
445
+ upcomingInvoice?: {
446
+ subtotal: number;
447
+ subtotalExcludingTax: number | null;
448
+ total: number;
449
+ totalExcludingTax: number | null;
450
+ } | null | undefined;
451
+ }>;
452
+ } & {
453
+ "/tenants/:tenantId/subscription-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription-usage", unknown, unknown, {
454
+ usage: {
455
+ applicationsLimit: number;
456
+ thirdPartyApplicationsLimit: number;
457
+ scopesPerResourceLimit: number;
458
+ socialConnectorsLimit: number;
459
+ userRolesLimit: number;
460
+ machineToMachineRolesLimit: number;
461
+ scopesPerRoleLimit: number;
462
+ hooksLimit: number;
463
+ customJwtEnabled: boolean;
464
+ subjectTokenEnabled: boolean;
465
+ bringYourUiEnabled: boolean;
466
+ machineToMachineLimit: number;
467
+ resourcesLimit: number;
468
+ enterpriseSsoLimit: number;
469
+ tenantMembersLimit: number;
470
+ mfaEnabled: boolean;
471
+ organizationsEnabled: boolean;
472
+ organizationsLimit: number;
473
+ securityFeaturesEnabled: boolean;
474
+ idpInitiatedSsoEnabled: boolean;
475
+ samlApplicationsLimit: number;
476
+ captchaEnabled: boolean;
477
+ };
478
+ resources: Record<string, number>;
479
+ roles: Record<string, number>;
480
+ quota: {
481
+ auditLogsRetentionDays: number | null;
482
+ mauLimit: number | null;
483
+ applicationsLimit: number | null;
484
+ thirdPartyApplicationsLimit: number | null;
485
+ scopesPerResourceLimit: number | null;
486
+ socialConnectorsLimit: number | null;
487
+ userRolesLimit: number | null;
488
+ machineToMachineRolesLimit: number | null;
489
+ scopesPerRoleLimit: number | null;
490
+ hooksLimit: number | null;
491
+ customJwtEnabled: boolean;
492
+ subjectTokenEnabled: boolean;
493
+ bringYourUiEnabled: boolean;
494
+ tokenLimit: number | null;
495
+ machineToMachineLimit: number | null;
496
+ resourcesLimit: number | null;
497
+ enterpriseSsoLimit: number | null;
498
+ tenantMembersLimit: number | null;
499
+ mfaEnabled: boolean;
500
+ organizationsEnabled: boolean;
501
+ organizationsLimit: number | null;
502
+ securityFeaturesEnabled: boolean;
503
+ idpInitiatedSsoEnabled: boolean;
504
+ samlApplicationsLimit: number | null;
505
+ captchaEnabled: boolean;
506
+ };
507
+ basicQuota: {
508
+ auditLogsRetentionDays: number | null;
509
+ mauLimit: number | null;
510
+ applicationsLimit: number | null;
511
+ thirdPartyApplicationsLimit: number | null;
512
+ scopesPerResourceLimit: number | null;
513
+ socialConnectorsLimit: number | null;
514
+ userRolesLimit: number | null;
515
+ machineToMachineRolesLimit: number | null;
516
+ scopesPerRoleLimit: number | null;
517
+ hooksLimit: number | null;
518
+ customJwtEnabled: boolean;
519
+ subjectTokenEnabled: boolean;
520
+ bringYourUiEnabled: boolean;
521
+ tokenLimit: number | null;
522
+ machineToMachineLimit: number | null;
523
+ resourcesLimit: number | null;
524
+ enterpriseSsoLimit: number | null;
525
+ tenantMembersLimit: number | null;
526
+ mfaEnabled: boolean;
527
+ organizationsEnabled: boolean;
528
+ organizationsLimit: number | null;
529
+ securityFeaturesEnabled: boolean;
530
+ idpInitiatedSsoEnabled: boolean;
531
+ samlApplicationsLimit: number | null;
532
+ captchaEnabled: boolean;
533
+ };
534
+ }>;
535
+ } & {
536
+ "/tenants/:tenantId/subscription/periodic-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription/periodic-usage", unknown, unknown, {
537
+ mauLimit: number;
538
+ tokenLimit: number;
539
+ }>;
540
+ } & {
541
+ "/tenants/:tenantId/subscription/add-on-skus": import("@withtyped/server").PathGuard<"/:tenantId/subscription/add-on-skus", unknown, unknown, {
542
+ tokenLimit?: {
543
+ id: string;
544
+ name: string | null;
545
+ createdAt: Date;
546
+ defaultPriceId: string | null;
547
+ unitPrice: number | null;
548
+ type: LogtoSkuType;
549
+ quota: {
550
+ auditLogsRetentionDays?: number | null | undefined;
551
+ mauLimit?: number | null | undefined;
552
+ applicationsLimit?: number | null | undefined;
553
+ thirdPartyApplicationsLimit?: number | null | undefined;
554
+ scopesPerResourceLimit?: number | null | undefined;
555
+ socialConnectorsLimit?: number | null | undefined;
556
+ userRolesLimit?: number | null | undefined;
557
+ machineToMachineRolesLimit?: number | null | undefined;
558
+ scopesPerRoleLimit?: number | null | undefined;
559
+ hooksLimit?: number | null | undefined;
560
+ customJwtEnabled?: boolean | undefined;
561
+ subjectTokenEnabled?: boolean | undefined;
562
+ bringYourUiEnabled?: boolean | undefined;
563
+ tokenLimit?: number | null | undefined;
564
+ machineToMachineLimit?: number | null | undefined;
565
+ resourcesLimit?: number | null | undefined;
566
+ enterpriseSsoLimit?: number | null | undefined;
567
+ tenantMembersLimit?: number | null | undefined;
568
+ mfaEnabled?: boolean | undefined;
569
+ organizationsEnabled?: boolean | undefined;
570
+ organizationsLimit?: number | null | undefined;
571
+ securityFeaturesEnabled?: boolean | undefined;
572
+ idpInitiatedSsoEnabled?: boolean | undefined;
573
+ samlApplicationsLimit?: number | null | undefined;
574
+ captchaEnabled?: boolean | undefined;
575
+ };
576
+ updatedAt: Date;
577
+ productId: string | null;
578
+ } | undefined;
579
+ }>;
580
+ } & {
581
+ "/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
582
+ invoices: {
583
+ id: string;
584
+ createdAt: Date;
585
+ status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
586
+ updatedAt: Date;
587
+ customerId: string | null;
588
+ billingReason: string | null;
589
+ periodStart: Date;
590
+ periodEnd: Date;
591
+ amountDue: number;
592
+ amountPaid: number;
593
+ basicSkuId: string | null;
594
+ subscriptionId: string | null;
595
+ hostedInvoiceUrl: string | null;
596
+ invoicePdf: string | null;
597
+ planName: string | null;
598
+ skuId?: string | null | undefined;
599
+ }[];
600
+ }>;
601
+ } & {
602
+ "/tenants/:tenantId/available-skus": import("@withtyped/server").PathGuard<"/:tenantId/available-skus", {
603
+ type?: LogtoSkuType | undefined;
604
+ }, unknown, {
605
+ id: string;
606
+ name: string | null;
607
+ createdAt: Date;
608
+ defaultPriceId: string | null;
609
+ unitPrice: number | null;
610
+ type: LogtoSkuType;
611
+ quota: {
612
+ auditLogsRetentionDays?: number | null | undefined;
613
+ mauLimit?: number | null | undefined;
614
+ applicationsLimit?: number | null | undefined;
615
+ thirdPartyApplicationsLimit?: number | null | undefined;
616
+ scopesPerResourceLimit?: number | null | undefined;
617
+ socialConnectorsLimit?: number | null | undefined;
618
+ userRolesLimit?: number | null | undefined;
619
+ machineToMachineRolesLimit?: number | null | undefined;
620
+ scopesPerRoleLimit?: number | null | undefined;
621
+ hooksLimit?: number | null | undefined;
622
+ customJwtEnabled?: boolean | undefined;
623
+ subjectTokenEnabled?: boolean | undefined;
624
+ bringYourUiEnabled?: boolean | undefined;
625
+ tokenLimit?: number | null | undefined;
626
+ machineToMachineLimit?: number | null | undefined;
627
+ resourcesLimit?: number | null | undefined;
628
+ enterpriseSsoLimit?: number | null | undefined;
629
+ tenantMembersLimit?: number | null | undefined;
630
+ mfaEnabled?: boolean | undefined;
631
+ organizationsEnabled?: boolean | undefined;
632
+ organizationsLimit?: number | null | undefined;
633
+ securityFeaturesEnabled?: boolean | undefined;
634
+ idpInitiatedSsoEnabled?: boolean | undefined;
635
+ samlApplicationsLimit?: number | null | undefined;
636
+ captchaEnabled?: boolean | undefined;
637
+ };
638
+ updatedAt: Date;
639
+ productId: string | null;
640
+ }[]>;
641
+ } & {
642
+ "/tenants/:tenantId/invoices/:invoiceId/hosted-invoice-url": import("@withtyped/server").PathGuard<"/:tenantId/invoices/:invoiceId/hosted-invoice-url", unknown, unknown, {
643
+ hostedInvoiceUrl: string;
644
+ }>;
645
+ };
646
+ post: {
647
+ "/tenants/:tenantId/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:tenantId/stripe-customer-portal", unknown, {
648
+ callbackUrl?: string | undefined;
649
+ }, {
650
+ redirectUri: string;
651
+ }>;
652
+ };
653
+ put: {};
654
+ delete: {
655
+ "/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, unknown>;
656
+ };
657
+ copy: {};
658
+ head: {};
659
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
660
+ patch: {};
661
+ options: {};
662
+ get: {
663
+ "/services/mails/usage": import("@withtyped/server").PathGuard<"/mails/usage", {
664
+ from?: string | undefined;
665
+ }, unknown, {
666
+ count: number;
667
+ }>;
668
+ };
669
+ post: {
670
+ "/services/mails": import("@withtyped/server").PathGuard<"/mails", unknown, {
671
+ data: {
672
+ type: TemplateType;
673
+ payload: {
674
+ link?: string | undefined;
675
+ code?: string | undefined;
676
+ locale?: string | undefined;
677
+ } & {
678
+ [k: string]: unknown;
679
+ } & {
680
+ senderName?: string | undefined;
681
+ companyInformation?: string | undefined;
682
+ appLogo?: string | undefined;
683
+ };
684
+ to: string;
685
+ };
686
+ }, unknown>;
687
+ } & {
688
+ "/services/send-sms": import("@withtyped/server").PathGuard<"/send-sms", unknown, {
689
+ data: {
690
+ type: TemplateType;
691
+ to: string;
692
+ payload: {
693
+ code?: string | undefined;
694
+ link?: string | undefined;
695
+ locale?: string | undefined;
696
+ } & {
697
+ [k: string]: unknown;
698
+ };
699
+ };
700
+ }, unknown>;
701
+ } & {
702
+ "/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", {
703
+ isTest?: string | undefined;
704
+ }, {
705
+ token: Record<string, Json>;
706
+ context: Record<string, Json>;
707
+ script: string;
708
+ tokenType: LogtoJwtTokenKeyType.AccessToken;
709
+ environmentVariables?: Record<string, string> | undefined;
710
+ } | {
711
+ token: Record<string, Json>;
712
+ script: string;
713
+ tokenType: LogtoJwtTokenKeyType.ClientCredentials;
714
+ environmentVariables?: Record<string, string> | undefined;
715
+ }, Record<string, unknown>>;
716
+ };
717
+ put: {
718
+ "/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, {
719
+ "jwt.accessToken"?: {
720
+ production?: string | undefined;
721
+ test?: string | undefined;
722
+ } | undefined;
723
+ "jwt.clientCredentials"?: {
724
+ production?: string | undefined;
725
+ test?: string | undefined;
726
+ } | undefined;
727
+ }, unknown>;
728
+ };
729
+ delete: {
730
+ "/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, unknown, unknown>;
731
+ };
732
+ copy: {};
733
+ head: {};
734
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
735
+ patch: {};
736
+ options: {};
737
+ get: {
738
+ "/skus": import("@withtyped/server").PathGuard<"/", {
739
+ type?: LogtoSkuType | undefined;
740
+ }, unknown, {
741
+ id: string;
742
+ name: string | null;
743
+ createdAt: Date;
744
+ defaultPriceId: string | null;
745
+ unitPrice: number | null;
746
+ type: LogtoSkuType;
747
+ quota: {
748
+ auditLogsRetentionDays?: number | null | undefined;
749
+ mauLimit?: number | null | undefined;
750
+ applicationsLimit?: number | null | undefined;
751
+ thirdPartyApplicationsLimit?: number | null | undefined;
752
+ scopesPerResourceLimit?: number | null | undefined;
753
+ socialConnectorsLimit?: number | null | undefined;
754
+ userRolesLimit?: number | null | undefined;
755
+ machineToMachineRolesLimit?: number | null | undefined;
756
+ scopesPerRoleLimit?: number | null | undefined;
757
+ hooksLimit?: number | null | undefined;
758
+ customJwtEnabled?: boolean | undefined;
759
+ subjectTokenEnabled?: boolean | undefined;
760
+ bringYourUiEnabled?: boolean | undefined;
761
+ tokenLimit?: number | null | undefined;
762
+ machineToMachineLimit?: number | null | undefined;
763
+ resourcesLimit?: number | null | undefined;
764
+ enterpriseSsoLimit?: number | null | undefined;
765
+ tenantMembersLimit?: number | null | undefined;
766
+ mfaEnabled?: boolean | undefined;
767
+ organizationsEnabled?: boolean | undefined;
768
+ organizationsLimit?: number | null | undefined;
769
+ securityFeaturesEnabled?: boolean | undefined;
770
+ idpInitiatedSsoEnabled?: boolean | undefined;
771
+ samlApplicationsLimit?: number | null | undefined;
772
+ captchaEnabled?: boolean | undefined;
773
+ };
774
+ updatedAt: Date;
775
+ productId: string | null;
776
+ }[]>;
777
+ };
778
+ post: {
779
+ "/skus": import("@withtyped/server").PathGuard<"/", unknown, {
780
+ type: LogtoSkuType.AddOn;
781
+ quota: {
782
+ tokenLimit?: number | null | undefined;
783
+ machineToMachineLimit?: number | null | undefined;
784
+ resourcesLimit?: number | null | undefined;
785
+ enterpriseSsoLimit?: number | null | undefined;
786
+ hooksLimit?: number | null | undefined;
787
+ tenantMembersLimit?: number | null | undefined;
788
+ mfaEnabled?: boolean | undefined;
789
+ organizationsEnabled?: boolean | undefined;
790
+ organizationsLimit?: number | null | undefined;
791
+ securityFeaturesEnabled?: boolean | undefined;
792
+ auditLogsRetentionDays?: number | null | undefined;
793
+ mauLimit?: number | null | undefined;
794
+ applicationsLimit?: number | null | undefined;
795
+ thirdPartyApplicationsLimit?: number | null | undefined;
796
+ scopesPerResourceLimit?: number | null | undefined;
797
+ socialConnectorsLimit?: number | null | undefined;
798
+ userRolesLimit?: number | null | undefined;
799
+ machineToMachineRolesLimit?: number | null | undefined;
800
+ scopesPerRoleLimit?: number | null | undefined;
801
+ customJwtEnabled?: boolean | undefined;
802
+ subjectTokenEnabled?: boolean | undefined;
803
+ bringYourUiEnabled?: boolean | undefined;
804
+ idpInitiatedSsoEnabled?: boolean | undefined;
805
+ samlApplicationsLimit?: number | null | undefined;
806
+ captchaEnabled?: boolean | undefined;
807
+ };
808
+ } | {
809
+ type: LogtoSkuType.Basic;
810
+ quota: {
811
+ auditLogsRetentionDays: number | null;
812
+ mauLimit: number | null;
813
+ applicationsLimit: number | null;
814
+ thirdPartyApplicationsLimit: number | null;
815
+ scopesPerResourceLimit: number | null;
816
+ socialConnectorsLimit: number | null;
817
+ userRolesLimit: number | null;
818
+ machineToMachineRolesLimit: number | null;
819
+ scopesPerRoleLimit: number | null;
820
+ hooksLimit: number | null;
821
+ customJwtEnabled: boolean;
822
+ subjectTokenEnabled: boolean;
823
+ bringYourUiEnabled: boolean;
824
+ tokenLimit: number | null;
825
+ machineToMachineLimit: number | null;
826
+ resourcesLimit: number | null;
827
+ enterpriseSsoLimit: number | null;
828
+ tenantMembersLimit: number | null;
829
+ mfaEnabled: boolean;
830
+ organizationsEnabled: boolean;
831
+ organizationsLimit: number | null;
832
+ securityFeaturesEnabled: boolean;
833
+ idpInitiatedSsoEnabled: boolean;
834
+ samlApplicationsLimit: number | null;
835
+ captchaEnabled: boolean;
836
+ };
837
+ addOnRelations: {
838
+ tokenLimit: string;
839
+ };
840
+ }, {
841
+ id: string;
842
+ createdAt: Date;
843
+ type: LogtoSkuType;
844
+ updatedAt: Date;
845
+ quota: {
846
+ auditLogsRetentionDays?: number | null | undefined;
847
+ mauLimit?: number | null | undefined;
848
+ applicationsLimit?: number | null | undefined;
849
+ thirdPartyApplicationsLimit?: number | null | undefined;
850
+ scopesPerResourceLimit?: number | null | undefined;
851
+ socialConnectorsLimit?: number | null | undefined;
852
+ userRolesLimit?: number | null | undefined;
853
+ machineToMachineRolesLimit?: number | null | undefined;
854
+ scopesPerRoleLimit?: number | null | undefined;
855
+ hooksLimit?: number | null | undefined;
856
+ customJwtEnabled?: boolean | undefined;
857
+ subjectTokenEnabled?: boolean | undefined;
858
+ bringYourUiEnabled?: boolean | undefined;
859
+ tokenLimit?: number | null | undefined;
860
+ machineToMachineLimit?: number | null | undefined;
861
+ resourcesLimit?: number | null | undefined;
862
+ enterpriseSsoLimit?: number | null | undefined;
863
+ tenantMembersLimit?: number | null | undefined;
864
+ mfaEnabled?: boolean | undefined;
865
+ organizationsEnabled?: boolean | undefined;
866
+ organizationsLimit?: number | null | undefined;
867
+ securityFeaturesEnabled?: boolean | undefined;
868
+ idpInitiatedSsoEnabled?: boolean | undefined;
869
+ samlApplicationsLimit?: number | null | undefined;
870
+ captchaEnabled?: boolean | undefined;
871
+ };
872
+ }>;
873
+ } & {
874
+ "/skus/:skuId/products": import("@withtyped/server").PathGuard<"/:skuId/products", {
875
+ isOneTime?: string | undefined;
876
+ }, {
877
+ name: string;
878
+ unitPrice: number;
879
+ }, {
880
+ productId: string;
881
+ }>;
882
+ };
883
+ put: {};
884
+ delete: {
885
+ "/skus/:skuId": import("@withtyped/server").PathGuard<"/:skuId", unknown, unknown, unknown>;
886
+ };
887
+ copy: {};
888
+ head: {};
889
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
890
+ patch: {};
891
+ options: {};
892
+ get: {
893
+ "/checkout-session/:id": import("@withtyped/server").PathGuard<"/:id", unknown, unknown, {
894
+ id: string;
895
+ createdAt: Date;
896
+ userId: string;
897
+ status: "open" | "complete" | "expired";
898
+ tenantId: string | null;
899
+ updatedAt: Date;
900
+ skuId: string | null;
901
+ planId: string | null;
902
+ }>;
903
+ };
904
+ post: {
905
+ "/checkout-session": import("@withtyped/server").PathGuard<"/", unknown, {
906
+ successCallbackUrl: string;
907
+ tenantId?: string | undefined;
908
+ skuId?: string | undefined;
909
+ tenantName?: string | undefined;
910
+ tenantTag?: TenantTag | undefined;
911
+ tenantRegionName?: string | undefined;
912
+ cancelCallbackUrl?: string | undefined;
913
+ }, {
914
+ sessionId: string;
915
+ redirectUri?: string | null | undefined;
916
+ }>;
917
+ };
918
+ put: {};
919
+ delete: {};
920
+ copy: {};
921
+ head: {};
922
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
923
+ patch: {};
924
+ options: {};
925
+ get: {
926
+ "/affiliates": import("@withtyped/server").PathGuard<"/", unknown, unknown, AffiliateData[]>;
927
+ };
928
+ post: {
929
+ "/affiliates": import("@withtyped/server").PathGuard<"/", unknown, {
930
+ name: string;
931
+ }, {
932
+ id: string;
933
+ createdAt: Date;
934
+ name: string;
935
+ }>;
936
+ } & {
937
+ "/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
938
+ type: "hostname" | "query";
939
+ value: string;
940
+ }, {
941
+ createdAt: Date;
942
+ affiliateId: string;
943
+ type: "hostname" | "query";
944
+ value: string;
945
+ }>;
946
+ };
947
+ put: {};
948
+ delete: {
949
+ "/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
950
+ type: "hostname" | "query";
951
+ value: string;
952
+ }, unknown>;
953
+ };
954
+ copy: {};
955
+ head: {};
956
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
957
+ patch: {};
958
+ options: {};
959
+ get: {};
960
+ post: {
961
+ "/affiliate-logs": import("@withtyped/server").PathGuard<"/", unknown, {
962
+ createdAt: string;
963
+ userId: string;
964
+ hostname?: string | undefined;
965
+ query?: string | undefined;
966
+ }, {
967
+ id: string;
968
+ createdAt: Date;
969
+ affiliateId: string | null;
970
+ userId: string;
971
+ createdVia: {
972
+ createdAt: string;
973
+ hostname?: string | undefined;
974
+ query?: string | undefined;
975
+ };
976
+ }>;
977
+ };
978
+ put: {};
979
+ delete: {};
980
+ copy: {};
981
+ head: {};
982
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
983
+ patch: {
984
+ "/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:invitationId/status", unknown, {
985
+ status: OrganizationInvitationStatus.Accepted;
986
+ }, unknown>;
987
+ };
988
+ options: {};
989
+ get: {
990
+ "/invitations": import("@withtyped/server").PathGuard<"/", unknown, unknown, ({
991
+ id: string;
992
+ createdAt: number;
993
+ status: OrganizationInvitationStatus;
994
+ tenantId: string;
995
+ updatedAt: number;
996
+ inviterId: string | null;
997
+ invitee: string;
998
+ acceptedUserId: string | null;
999
+ organizationId: string;
1000
+ expiresAt: number;
1001
+ organizationRoles: OrganizationRoleEntity[];
1002
+ } & {
1003
+ tenantName: string;
1004
+ tenantTag: TenantTag;
1005
+ })[]>;
1006
+ } & {
1007
+ "/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:invitationId", unknown, unknown, {
1008
+ id: string;
1009
+ createdAt: number;
1010
+ status: OrganizationInvitationStatus;
1011
+ tenantId: string;
1012
+ updatedAt: number;
1013
+ inviterId: string | null;
1014
+ invitee: string;
1015
+ acceptedUserId: string | null;
1016
+ organizationId: string;
1017
+ expiresAt: number;
1018
+ organizationRoles: OrganizationRoleEntity[];
1019
+ }>;
1020
+ };
1021
+ post: {};
1022
+ put: {};
1023
+ delete: {};
1024
+ copy: {};
1025
+ head: {};
1026
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
1027
+ patch: {};
1028
+ options: {};
1029
+ get: {};
1030
+ post: {};
1031
+ put: {};
1032
+ delete: {
1033
+ "/me": import("@withtyped/server").PathGuard<"/", unknown, unknown, unknown>;
1034
+ };
1035
+ copy: {};
1036
+ head: {};
1037
+ }, "/api">>, "/api">;
1038
+ export declare const tenantAuthRouter: import("@withtyped/server").Router<RequestContext, import("@withtyped/server").WithBodyContext<import("@withtyped/server").BaseContext & {
1039
+ request: {
1040
+ id?: string | undefined;
1041
+ method?: import("@withtyped/server").RequestMethod | undefined;
1042
+ headers: import("http").IncomingHttpHeaders;
1043
+ url: URL;
1044
+ body?: unknown;
1045
+ };
1046
+ }>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
1047
+ patch: {
1048
+ "/:tenantId/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/status", unknown, {
1049
+ status: OrganizationInvitationStatus.Revoked;
1050
+ }, {
1051
+ id: string;
1052
+ createdAt: number;
1053
+ status: OrganizationInvitationStatus;
1054
+ tenantId: string;
1055
+ updatedAt: number;
1056
+ inviterId: string | null;
1057
+ invitee: string;
1058
+ acceptedUserId: string | null;
1059
+ organizationId: string;
1060
+ expiresAt: number;
1061
+ organizationRoles: OrganizationRoleEntity[];
1062
+ }>;
1063
+ };
1064
+ options: {};
1065
+ get: {
1066
+ "/:tenantId/members": import("@withtyped/server").PathGuard<"/:tenantId/members", unknown, unknown, {
1067
+ id: string;
1068
+ name: string | null;
1069
+ username: string | null;
1070
+ primaryEmail: string | null;
1071
+ primaryPhone: string | null;
1072
+ avatar: string | null;
1073
+ organizationRoles: OrganizationRoleEntity[];
1074
+ }[]>;
1075
+ } & {
1076
+ "/:tenantId/members/:userId/scopes": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/scopes", unknown, unknown, OrganizationScope[]>;
1077
+ } & {
1078
+ "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, unknown, ({
1079
+ id: string;
1080
+ createdAt: number;
1081
+ status: OrganizationInvitationStatus;
1082
+ tenantId: string;
1083
+ updatedAt: number;
1084
+ inviterId: string | null;
1085
+ invitee: string;
1086
+ acceptedUserId: string | null;
1087
+ organizationId: string;
1088
+ expiresAt: number;
1089
+ organizationRoles: OrganizationRoleEntity[];
1090
+ } & {
1091
+ inviterName?: string | undefined;
1092
+ })[]>;
1093
+ };
1094
+ post: {
1095
+ "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
1096
+ invitee: string | string[];
1097
+ roleName: TenantRole;
1098
+ expiresAt?: number | undefined;
1099
+ }, {
1100
+ id: string;
1101
+ createdAt: number;
1102
+ status: OrganizationInvitationStatus;
1103
+ tenantId: string;
1104
+ updatedAt: number;
1105
+ inviterId: string | null;
1106
+ invitee: string;
1107
+ acceptedUserId: string | null;
1108
+ organizationId: string;
1109
+ expiresAt: number;
1110
+ organizationRoles: OrganizationRoleEntity[];
1111
+ } | {
1112
+ id: string;
1113
+ createdAt: number;
1114
+ status: OrganizationInvitationStatus;
1115
+ tenantId: string;
1116
+ updatedAt: number;
1117
+ inviterId: string | null;
1118
+ invitee: string;
1119
+ acceptedUserId: string | null;
1120
+ organizationId: string;
1121
+ expiresAt: number;
1122
+ organizationRoles: OrganizationRoleEntity[];
1123
+ }[]>;
1124
+ } & {
1125
+ "/:tenantId/invitations/:invitationId/message": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/message", unknown, unknown, unknown>;
1126
+ };
1127
+ put: {
1128
+ "/:tenantId/members/:userId/roles": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/roles", unknown, {
1129
+ roleName: TenantRole;
1130
+ }, unknown>;
1131
+ };
1132
+ delete: {
1133
+ "/:tenantId/members/:userId": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId", unknown, unknown, unknown>;
1134
+ } & {
1135
+ "/:tenantId/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId", unknown, unknown, unknown>;
1136
+ };
1137
+ copy: {};
1138
+ head: {};
1139
+ }, "/api/tenants">>, "/api/tenants">;
1140
+
1141
+ export {
1142
+ router as default,
1143
+ };
1144
+
1145
+ export {};