@logto/cloud 0.2.5-4f1d80b → 0.2.5-582d792

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,983 @@
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
+ export type WithAuthContext<Context = RequestContext> = Context & {
7
+ auth: {
8
+ /** The ID of the authenticated subject (`sub`). */
9
+ id: string;
10
+ /** The scopes that the subject has (`scope`). */
11
+ scopes: string[];
12
+ };
13
+ };
14
+ declare enum VerificationCodeType {
15
+ SignIn = "SignIn",
16
+ Register = "Register",
17
+ ForgotPassword = "ForgotPassword",
18
+ Generic = "Generic",
19
+ /** @deprecated Use `Generic` type template for sending test sms/email use case */
20
+ Test = "Test"
21
+ }
22
+ declare enum TemplateType {
23
+ /** The template for sending verification code when user is signing in. */
24
+ SignIn = "SignIn",
25
+ /** The template for sending verification code when user is registering. */
26
+ Register = "Register",
27
+ /** The template for sending verification code when user is resetting password. */
28
+ ForgotPassword = "ForgotPassword",
29
+ /** The template for sending organization invitation. */
30
+ OrganizationInvitation = "OrganizationInvitation",
31
+ /** The template for generic usage. */
32
+ Generic = "Generic"
33
+ }
34
+ declare enum OrganizationInvitationStatus {
35
+ Pending = "Pending",
36
+ Accepted = "Accepted",
37
+ Expired = "Expired",
38
+ Revoked = "Revoked"
39
+ }
40
+ /** The scopes (permissions) defined by the organization template. */
41
+ export type OrganizationScope = {
42
+ tenantId: string;
43
+ /** The globally unique identifier of the organization scope. */
44
+ id: string;
45
+ /** The organization scope's name, unique within the organization template. */
46
+ name: string;
47
+ /** A brief description of the organization scope. */
48
+ description: string | null;
49
+ };
50
+ declare enum LogtoJwtTokenKeyType {
51
+ AccessToken = "access-token",
52
+ ClientCredentials = "client-credentials"
53
+ }
54
+ /**
55
+ * The simplified organization role entity that is returned in the `roles` field
56
+ * of the organization.
57
+ */
58
+ export type OrganizationRoleEntity = {
59
+ id: string;
60
+ name: string;
61
+ };
62
+ declare enum TenantTag {
63
+ Development = "development",
64
+ Production = "production"
65
+ }
66
+ declare enum TenantRole {
67
+ /** Admin of the tenant, who has all permissions. */
68
+ Admin = "admin",
69
+ /** Collaborator of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
70
+ Collaborator = "collaborator"
71
+ }
72
+ declare const availableReportableUsageKeys: readonly [
73
+ "tokenLimit",
74
+ "machineToMachineLimit",
75
+ "resourcesLimit",
76
+ "enterpriseSsoLimit",
77
+ "hooksLimit",
78
+ "tenantMembersLimit",
79
+ "mfaEnabled",
80
+ "organizationsEnabled"
81
+ ];
82
+ export type ReportableUsageKey = (typeof availableReportableUsageKeys)[number];
83
+ export type RealtimeReportableUsageKey = Exclude<ReportableUsageKey, "tokenLimit">;
84
+ declare enum LogtoSkuType {
85
+ Basic = "Basic",
86
+ AddOn = "AddOn"
87
+ }
88
+ declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
89
+ createdAt: Date;
90
+ affiliateId: string;
91
+ type: "hostname" | "query";
92
+ value: string;
93
+ }, "createdAt", "createdAt">;
94
+ export type AffiliateProperty = InferModelType<typeof AffiliateProperties>;
95
+ declare const Affiliates: import("@withtyped/server/lib/model/index.js").default<"affiliates", {
96
+ name: string;
97
+ createdAt: Date;
98
+ id: string;
99
+ }, "id" | "createdAt", "id" | "createdAt">;
100
+ export type Affiliate = InferModelType<typeof Affiliates>;
101
+ declare enum RegionName {
102
+ EU = "EU",
103
+ US = "US"
104
+ }
105
+ export type AffiliateData = Affiliate & {
106
+ properties: Array<Pick<AffiliateProperty, "type" | "value">>;
107
+ };
108
+ declare const router: import("@withtyped/server").Router<RequestContext, WithAuthContext<Omit<import("@withtyped/server").BaseContext & {
109
+ request: {
110
+ id?: string | undefined;
111
+ method?: import("@withtyped/server").RequestMethod | undefined;
112
+ headers: import("http").IncomingHttpHeaders;
113
+ url: URL;
114
+ body?: unknown;
115
+ };
116
+ }, "request"> & {
117
+ request: Record<string, unknown> & {
118
+ id?: string | undefined;
119
+ method?: import("@withtyped/server").RequestMethod | undefined;
120
+ headers: import("http").IncomingHttpHeaders;
121
+ url: URL;
122
+ body?: unknown;
123
+ } & {
124
+ body?: Json | undefined;
125
+ bodyRaw?: Buffer | undefined;
126
+ };
127
+ }>, 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<{
128
+ patch: {
129
+ "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
130
+ name?: string | undefined;
131
+ }, {
132
+ id: string;
133
+ name: string;
134
+ quota: {
135
+ mauLimit: number | null;
136
+ tokenLimit: number | null;
137
+ };
138
+ createdAt: Date;
139
+ usage: {
140
+ activeUsers: number;
141
+ tokenUsage: number;
142
+ };
143
+ indicator: string;
144
+ isSuspended: boolean;
145
+ planId: string;
146
+ subscription: {
147
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
148
+ planId: string;
149
+ currentPeriodStart: Date;
150
+ currentPeriodEnd: Date;
151
+ id?: string | undefined;
152
+ upcomingInvoice?: {
153
+ subtotal: number;
154
+ subtotalExcludingTax: number | null;
155
+ total: number;
156
+ totalExcludingTax: number | null;
157
+ } | null | undefined;
158
+ isAddOnAvailable?: boolean | undefined;
159
+ };
160
+ regionName: RegionName;
161
+ tag: TenantTag;
162
+ openInvoices: {
163
+ status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
164
+ id: string;
165
+ createdAt: Date;
166
+ updatedAt: Date;
167
+ customerId: string | null;
168
+ billingReason: string | null;
169
+ periodStart: Date;
170
+ periodEnd: Date;
171
+ amountDue: number;
172
+ amountPaid: number;
173
+ subscriptionId: string | null;
174
+ hostedInvoiceUrl: string | null;
175
+ invoicePdf: string | null;
176
+ }[];
177
+ }>;
178
+ };
179
+ options: {};
180
+ get: {
181
+ "/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
182
+ id: string;
183
+ name: string;
184
+ quota: {
185
+ mauLimit: number | null;
186
+ tokenLimit: number | null;
187
+ };
188
+ createdAt: Date;
189
+ usage: {
190
+ activeUsers: number;
191
+ tokenUsage: number;
192
+ };
193
+ indicator: string;
194
+ isSuspended: boolean;
195
+ planId: string;
196
+ subscription: {
197
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
198
+ planId: string;
199
+ currentPeriodStart: Date;
200
+ currentPeriodEnd: Date;
201
+ id?: string | undefined;
202
+ upcomingInvoice?: {
203
+ subtotal: number;
204
+ subtotalExcludingTax: number | null;
205
+ total: number;
206
+ totalExcludingTax: number | null;
207
+ } | null | undefined;
208
+ isAddOnAvailable?: boolean | undefined;
209
+ };
210
+ regionName: RegionName;
211
+ tag: TenantTag;
212
+ openInvoices: {
213
+ status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
214
+ id: string;
215
+ createdAt: Date;
216
+ updatedAt: Date;
217
+ customerId: string | null;
218
+ billingReason: string | null;
219
+ periodStart: Date;
220
+ periodEnd: Date;
221
+ amountDue: number;
222
+ amountPaid: number;
223
+ subscriptionId: string | null;
224
+ hostedInvoiceUrl: string | null;
225
+ invoicePdf: string | null;
226
+ }[];
227
+ }[]>;
228
+ };
229
+ post: {
230
+ "/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
231
+ name?: string | undefined;
232
+ tag?: TenantTag | undefined;
233
+ regionName?: RegionName | undefined;
234
+ }, {
235
+ id: string;
236
+ name: string;
237
+ quota: {
238
+ mauLimit: number | null;
239
+ tokenLimit: number | null;
240
+ };
241
+ createdAt: Date;
242
+ usage: {
243
+ activeUsers: number;
244
+ tokenUsage: number;
245
+ };
246
+ indicator: string;
247
+ isSuspended: boolean;
248
+ planId: string;
249
+ subscription: {
250
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
251
+ planId: string;
252
+ currentPeriodStart: Date;
253
+ currentPeriodEnd: Date;
254
+ id?: string | undefined;
255
+ upcomingInvoice?: {
256
+ subtotal: number;
257
+ subtotalExcludingTax: number | null;
258
+ total: number;
259
+ totalExcludingTax: number | null;
260
+ } | null | undefined;
261
+ isAddOnAvailable?: boolean | undefined;
262
+ };
263
+ regionName: RegionName;
264
+ tag: TenantTag;
265
+ openInvoices: {
266
+ status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
267
+ id: string;
268
+ createdAt: Date;
269
+ updatedAt: Date;
270
+ customerId: string | null;
271
+ billingReason: string | null;
272
+ periodStart: Date;
273
+ periodEnd: Date;
274
+ amountDue: number;
275
+ amountPaid: number;
276
+ subscriptionId: string | null;
277
+ hostedInvoiceUrl: string | null;
278
+ invoicePdf: string | null;
279
+ }[];
280
+ }>;
281
+ };
282
+ put: {};
283
+ delete: {
284
+ "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, unknown, unknown>;
285
+ };
286
+ copy: {};
287
+ head: {};
288
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
289
+ patch: {};
290
+ options: {};
291
+ get: {
292
+ "/tenants/my/subscription": import("@withtyped/server").PathGuard<"/my/subscription", unknown, unknown, {
293
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
294
+ planId: string;
295
+ currentPeriodStart: Date;
296
+ currentPeriodEnd: Date;
297
+ id?: string | undefined;
298
+ upcomingInvoice?: {
299
+ subtotal: number;
300
+ subtotalExcludingTax: number | null;
301
+ total: number;
302
+ totalExcludingTax: number | null;
303
+ } | null | undefined;
304
+ isAddOnAvailable?: boolean | undefined;
305
+ }>;
306
+ } & {
307
+ "/tenants/my/subscription/quota": import("@withtyped/server").PathGuard<"/my/subscription/quota", unknown, unknown, {
308
+ mauLimit: number | null;
309
+ tokenLimit: number | null;
310
+ applicationsLimit: number | null;
311
+ machineToMachineLimit: number | null;
312
+ resourcesLimit: number | null;
313
+ scopesPerResourceLimit: number | null;
314
+ socialConnectorsLimit: number | null;
315
+ machineToMachineRolesLimit: number | null;
316
+ scopesPerRoleLimit: number | null;
317
+ hooksLimit: number | null;
318
+ auditLogsRetentionDays: number | null;
319
+ mfaEnabled: boolean;
320
+ organizationsEnabled: boolean;
321
+ thirdPartyApplicationsLimit: number | null;
322
+ tenantMembersLimit: number | null;
323
+ customJwtEnabled: boolean;
324
+ subjectTokenEnabled: boolean;
325
+ bringYourUiEnabled: boolean;
326
+ userRolesLimit: number | null;
327
+ enterpriseSsoLimit: number | null;
328
+ }>;
329
+ } & {
330
+ "/tenants/my/subscription/usage": import("@withtyped/server").PathGuard<"/my/subscription/usage", unknown, unknown, {
331
+ applicationsLimit: number;
332
+ machineToMachineLimit: number;
333
+ resourcesLimit: number;
334
+ scopesPerResourceLimit: number;
335
+ socialConnectorsLimit: number;
336
+ machineToMachineRolesLimit: number;
337
+ scopesPerRoleLimit: number;
338
+ hooksLimit: number;
339
+ mfaEnabled: boolean;
340
+ organizationsEnabled: boolean;
341
+ thirdPartyApplicationsLimit: number;
342
+ tenantMembersLimit: number;
343
+ customJwtEnabled: boolean;
344
+ subjectTokenEnabled: boolean;
345
+ bringYourUiEnabled: boolean;
346
+ userRolesLimit: number;
347
+ enterpriseSsoLimit: number;
348
+ }>;
349
+ } & {
350
+ "/tenants/my/subscription/usage/:entityName/scopes": import("@withtyped/server").PathGuard<"/my/subscription/usage/:entityName/scopes", {
351
+ entityId?: string | undefined;
352
+ }, unknown, Record<string, number>>;
353
+ } & {
354
+ "/tenants/my/subscription-usage": import("@withtyped/server").PathGuard<"/my/subscription-usage", unknown, unknown, {
355
+ usage: {
356
+ applicationsLimit: number;
357
+ machineToMachineLimit: number;
358
+ resourcesLimit: number;
359
+ scopesPerResourceLimit: number;
360
+ socialConnectorsLimit: number;
361
+ machineToMachineRolesLimit: number;
362
+ scopesPerRoleLimit: number;
363
+ hooksLimit: number;
364
+ mfaEnabled: boolean;
365
+ organizationsEnabled: boolean;
366
+ thirdPartyApplicationsLimit: number;
367
+ tenantMembersLimit: number;
368
+ customJwtEnabled: boolean;
369
+ subjectTokenEnabled: boolean;
370
+ bringYourUiEnabled: boolean;
371
+ userRolesLimit: number;
372
+ enterpriseSsoLimit: number;
373
+ };
374
+ resources: Record<string, number>;
375
+ roles: Record<string, number>;
376
+ quota: {
377
+ mauLimit: number | null;
378
+ tokenLimit: number | null;
379
+ applicationsLimit: number | null;
380
+ machineToMachineLimit: number | null;
381
+ resourcesLimit: number | null;
382
+ scopesPerResourceLimit: number | null;
383
+ socialConnectorsLimit: number | null;
384
+ machineToMachineRolesLimit: number | null;
385
+ scopesPerRoleLimit: number | null;
386
+ hooksLimit: number | null;
387
+ auditLogsRetentionDays: number | null;
388
+ mfaEnabled: boolean;
389
+ organizationsEnabled: boolean;
390
+ thirdPartyApplicationsLimit: number | null;
391
+ tenantMembersLimit: number | null;
392
+ customJwtEnabled: boolean;
393
+ subjectTokenEnabled: boolean;
394
+ bringYourUiEnabled: boolean;
395
+ userRolesLimit: number | null;
396
+ enterpriseSsoLimit: number | null;
397
+ };
398
+ }>;
399
+ } & {
400
+ "/tenants/my/subscription/periodic-usage": import("@withtyped/server").PathGuard<"/my/subscription/periodic-usage", unknown, unknown, {
401
+ mauLimit: number;
402
+ tokenLimit: number;
403
+ }>;
404
+ } & {
405
+ "/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
406
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
407
+ planId: string;
408
+ currentPeriodStart: Date;
409
+ currentPeriodEnd: Date;
410
+ id?: string | undefined;
411
+ upcomingInvoice?: {
412
+ subtotal: number;
413
+ subtotalExcludingTax: number | null;
414
+ total: number;
415
+ totalExcludingTax: number | null;
416
+ } | null | undefined;
417
+ isAddOnAvailable?: boolean | undefined;
418
+ }>;
419
+ } & {
420
+ "/tenants/:tenantId/subscription/quota": import("@withtyped/server").PathGuard<"/:tenantId/subscription/quota", unknown, unknown, {
421
+ mauLimit: number | null;
422
+ tokenLimit: number | null;
423
+ applicationsLimit: number | null;
424
+ machineToMachineLimit: number | null;
425
+ resourcesLimit: number | null;
426
+ scopesPerResourceLimit: number | null;
427
+ socialConnectorsLimit: number | null;
428
+ machineToMachineRolesLimit: number | null;
429
+ scopesPerRoleLimit: number | null;
430
+ hooksLimit: number | null;
431
+ auditLogsRetentionDays: number | null;
432
+ mfaEnabled: boolean;
433
+ organizationsEnabled: boolean;
434
+ thirdPartyApplicationsLimit: number | null;
435
+ tenantMembersLimit: number | null;
436
+ customJwtEnabled: boolean;
437
+ subjectTokenEnabled: boolean;
438
+ bringYourUiEnabled: boolean;
439
+ userRolesLimit: number | null;
440
+ enterpriseSsoLimit: number | null;
441
+ }>;
442
+ } & {
443
+ "/tenants/:tenantId/subscription/usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription/usage", unknown, unknown, {
444
+ applicationsLimit: number;
445
+ machineToMachineLimit: number;
446
+ resourcesLimit: number;
447
+ scopesPerResourceLimit: number;
448
+ socialConnectorsLimit: number;
449
+ machineToMachineRolesLimit: number;
450
+ scopesPerRoleLimit: number;
451
+ hooksLimit: number;
452
+ mfaEnabled: boolean;
453
+ organizationsEnabled: boolean;
454
+ thirdPartyApplicationsLimit: number;
455
+ tenantMembersLimit: number;
456
+ customJwtEnabled: boolean;
457
+ subjectTokenEnabled: boolean;
458
+ bringYourUiEnabled: boolean;
459
+ userRolesLimit: number;
460
+ enterpriseSsoLimit: number;
461
+ }>;
462
+ } & {
463
+ "/tenants/:tenantId/subscription/usage/:entityName/scopes": import("@withtyped/server").PathGuard<"/:tenantId/subscription/usage/:entityName/scopes", {
464
+ entityId?: string | undefined;
465
+ }, unknown, Record<string, number>>;
466
+ } & {
467
+ "/tenants/:tenantId/subscription-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription-usage", unknown, unknown, {
468
+ usage: {
469
+ applicationsLimit: number;
470
+ machineToMachineLimit: number;
471
+ resourcesLimit: number;
472
+ scopesPerResourceLimit: number;
473
+ socialConnectorsLimit: number;
474
+ machineToMachineRolesLimit: number;
475
+ scopesPerRoleLimit: number;
476
+ hooksLimit: number;
477
+ mfaEnabled: boolean;
478
+ organizationsEnabled: boolean;
479
+ thirdPartyApplicationsLimit: number;
480
+ tenantMembersLimit: number;
481
+ customJwtEnabled: boolean;
482
+ subjectTokenEnabled: boolean;
483
+ bringYourUiEnabled: boolean;
484
+ userRolesLimit: number;
485
+ enterpriseSsoLimit: number;
486
+ };
487
+ resources: Record<string, number>;
488
+ roles: Record<string, number>;
489
+ quota: {
490
+ mauLimit: number | null;
491
+ tokenLimit: number | null;
492
+ applicationsLimit: number | null;
493
+ machineToMachineLimit: number | null;
494
+ resourcesLimit: number | null;
495
+ scopesPerResourceLimit: number | null;
496
+ socialConnectorsLimit: number | null;
497
+ machineToMachineRolesLimit: number | null;
498
+ scopesPerRoleLimit: number | null;
499
+ hooksLimit: number | null;
500
+ auditLogsRetentionDays: number | null;
501
+ mfaEnabled: boolean;
502
+ organizationsEnabled: boolean;
503
+ thirdPartyApplicationsLimit: number | null;
504
+ tenantMembersLimit: number | null;
505
+ customJwtEnabled: boolean;
506
+ subjectTokenEnabled: boolean;
507
+ bringYourUiEnabled: boolean;
508
+ userRolesLimit: number | null;
509
+ enterpriseSsoLimit: number | null;
510
+ };
511
+ }>;
512
+ } & {
513
+ "/tenants/:tenantId/subscription/periodic-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription/periodic-usage", unknown, unknown, {
514
+ mauLimit: number;
515
+ tokenLimit: number;
516
+ }>;
517
+ } & {
518
+ "/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
519
+ invoices: {
520
+ status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
521
+ id: string;
522
+ createdAt: Date;
523
+ updatedAt: Date;
524
+ customerId: string | null;
525
+ billingReason: string | null;
526
+ periodStart: Date;
527
+ periodEnd: Date;
528
+ amountDue: number;
529
+ amountPaid: number;
530
+ subscriptionId: string | null;
531
+ hostedInvoiceUrl: string | null;
532
+ invoicePdf: string | null;
533
+ planName: string | null;
534
+ skuId?: string | null | undefined;
535
+ }[];
536
+ }>;
537
+ } & {
538
+ "/tenants/:tenantId/invoices/:invoiceId/hosted-invoice-url": import("@withtyped/server").PathGuard<"/:tenantId/invoices/:invoiceId/hosted-invoice-url", unknown, unknown, {
539
+ hostedInvoiceUrl: string;
540
+ }>;
541
+ };
542
+ post: {
543
+ "/tenants/my/subscription/item-updates": import("@withtyped/server").PathGuard<"/my/subscription/item-updates", unknown, {
544
+ usageKey: RealtimeReportableUsageKey;
545
+ }, {
546
+ message: string;
547
+ }>;
548
+ } & {
549
+ "/tenants/:tenantId/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:tenantId/stripe-customer-portal", unknown, {
550
+ callbackUrl?: string | undefined;
551
+ }, {
552
+ redirectUri: string;
553
+ }>;
554
+ };
555
+ put: {};
556
+ delete: {
557
+ "/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, unknown>;
558
+ };
559
+ copy: {};
560
+ head: {};
561
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
562
+ patch: {};
563
+ options: {};
564
+ get: {
565
+ "/services/mails/usage": import("@withtyped/server").PathGuard<"/mails/usage", {
566
+ from?: string | undefined;
567
+ }, unknown, {
568
+ count: number;
569
+ }>;
570
+ };
571
+ post: {
572
+ "/services/mails": import("@withtyped/server").PathGuard<"/mails", unknown, {
573
+ data: {
574
+ type: TemplateType | VerificationCodeType;
575
+ payload: {
576
+ code?: string | undefined;
577
+ link?: string | undefined;
578
+ } & Record<string, string> & {
579
+ senderName?: string | undefined;
580
+ companyInformation?: string | undefined;
581
+ appLogo?: string | undefined;
582
+ };
583
+ to: string;
584
+ };
585
+ }, unknown>;
586
+ } & {
587
+ "/services/send-sms": import("@withtyped/server").PathGuard<"/send-sms", unknown, {
588
+ data: {
589
+ type: TemplateType | VerificationCodeType;
590
+ to: string;
591
+ payload: {
592
+ code?: string | undefined;
593
+ link?: string | undefined;
594
+ } & Record<string, string>;
595
+ };
596
+ }, unknown>;
597
+ } & {
598
+ "/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", {
599
+ isTest?: string | undefined;
600
+ }, {
601
+ context: Record<string, Json>;
602
+ script: string;
603
+ tokenType: LogtoJwtTokenKeyType.AccessToken;
604
+ token: Record<string, Json>;
605
+ environmentVariables?: Record<string, string> | undefined;
606
+ } | {
607
+ script: string;
608
+ tokenType: LogtoJwtTokenKeyType.ClientCredentials;
609
+ token: Record<string, Json>;
610
+ environmentVariables?: Record<string, string> | undefined;
611
+ }, Record<string, unknown>>;
612
+ };
613
+ put: {
614
+ "/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, {
615
+ "jwt.accessToken"?: {
616
+ production?: string | undefined;
617
+ test?: string | undefined;
618
+ } | undefined;
619
+ "jwt.clientCredentials"?: {
620
+ production?: string | undefined;
621
+ test?: string | undefined;
622
+ } | undefined;
623
+ }, unknown>;
624
+ };
625
+ delete: {
626
+ "/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, unknown, unknown>;
627
+ };
628
+ copy: {};
629
+ head: {};
630
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
631
+ patch: {};
632
+ options: {};
633
+ get: {
634
+ "/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
635
+ id: string;
636
+ createdAt: Date;
637
+ name: string;
638
+ updatedAt: Date;
639
+ quota: {
640
+ mauLimit: number | null;
641
+ tokenLimit: number | null;
642
+ applicationsLimit: number | null;
643
+ machineToMachineLimit: number | null;
644
+ resourcesLimit: number | null;
645
+ scopesPerResourceLimit: number | null;
646
+ customDomainEnabled: boolean;
647
+ omniSignInEnabled: boolean;
648
+ builtInEmailConnectorEnabled: boolean;
649
+ socialConnectorsLimit: number | null;
650
+ standardConnectorsLimit: number | null;
651
+ rolesLimit: number | null;
652
+ machineToMachineRolesLimit: number | null;
653
+ scopesPerRoleLimit: number | null;
654
+ hooksLimit: number | null;
655
+ auditLogsRetentionDays: number | null;
656
+ mfaEnabled: boolean;
657
+ organizationsEnabled: boolean;
658
+ ssoEnabled: boolean;
659
+ thirdPartyApplicationsLimit: number | null;
660
+ tenantMembersLimit: number | null;
661
+ customJwtEnabled: boolean;
662
+ subjectTokenEnabled: boolean;
663
+ bringYourUiEnabled: boolean;
664
+ };
665
+ stripeProducts: {
666
+ type: "flat" | "tier1" | "tier2" | "tier3";
667
+ id: string;
668
+ name: string;
669
+ price: {
670
+ id: string;
671
+ unitAmountDecimal: string;
672
+ quantity?: 1 | undefined;
673
+ unitAmount?: number | null | undefined;
674
+ };
675
+ description?: string | undefined;
676
+ }[];
677
+ }[]>;
678
+ };
679
+ post: {};
680
+ put: {};
681
+ delete: {};
682
+ copy: {};
683
+ head: {};
684
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
685
+ patch: {};
686
+ options: {};
687
+ get: {
688
+ "/skus": import("@withtyped/server").PathGuard<"/", {
689
+ type?: LogtoSkuType | undefined;
690
+ }, unknown, {
691
+ type: LogtoSkuType;
692
+ id: string;
693
+ name: string | null;
694
+ quota: {
695
+ mauLimit?: number | null | undefined;
696
+ tokenLimit?: number | null | undefined;
697
+ applicationsLimit?: number | null | undefined;
698
+ machineToMachineLimit?: number | null | undefined;
699
+ resourcesLimit?: number | null | undefined;
700
+ scopesPerResourceLimit?: number | null | undefined;
701
+ socialConnectorsLimit?: number | null | undefined;
702
+ machineToMachineRolesLimit?: number | null | undefined;
703
+ scopesPerRoleLimit?: number | null | undefined;
704
+ hooksLimit?: number | null | undefined;
705
+ auditLogsRetentionDays?: number | null | undefined;
706
+ mfaEnabled?: boolean | undefined;
707
+ organizationsEnabled?: boolean | undefined;
708
+ thirdPartyApplicationsLimit?: number | null | undefined;
709
+ tenantMembersLimit?: number | null | undefined;
710
+ customJwtEnabled?: boolean | undefined;
711
+ subjectTokenEnabled?: boolean | undefined;
712
+ bringYourUiEnabled?: boolean | undefined;
713
+ userRolesLimit?: number | null | undefined;
714
+ enterpriseSsoLimit?: number | null | undefined;
715
+ };
716
+ createdAt: Date;
717
+ updatedAt: Date;
718
+ unitPrice: number | null;
719
+ }[]>;
720
+ };
721
+ post: {};
722
+ put: {};
723
+ delete: {};
724
+ copy: {};
725
+ head: {};
726
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
727
+ patch: {};
728
+ options: {};
729
+ get: {
730
+ "/checkout-session/:id": import("@withtyped/server").PathGuard<"/:id", unknown, unknown, {
731
+ id: string;
732
+ createdAt: Date;
733
+ userId: string;
734
+ status: "open" | "complete" | "expired";
735
+ tenantId: string | null;
736
+ updatedAt: Date;
737
+ planId: string;
738
+ skuId: string | null;
739
+ }>;
740
+ };
741
+ post: {
742
+ "/checkout-session": import("@withtyped/server").PathGuard<"/", unknown, {
743
+ planId: string;
744
+ successCallbackUrl: string;
745
+ tenantId?: string | undefined;
746
+ skuId?: string | undefined;
747
+ tenantName?: string | undefined;
748
+ tenantTag?: TenantTag | undefined;
749
+ tenantRegionName?: RegionName | undefined;
750
+ cancelCallbackUrl?: string | undefined;
751
+ }, {
752
+ sessionId: string;
753
+ redirectUri?: string | null | undefined;
754
+ }>;
755
+ };
756
+ put: {};
757
+ delete: {};
758
+ copy: {};
759
+ head: {};
760
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
761
+ patch: {};
762
+ options: {};
763
+ get: {
764
+ "/affiliates": import("@withtyped/server").PathGuard<"/", unknown, unknown, AffiliateData[]>;
765
+ };
766
+ post: {
767
+ "/affiliates": import("@withtyped/server").PathGuard<"/", unknown, {
768
+ name: string;
769
+ }, {
770
+ id: string;
771
+ createdAt: Date;
772
+ name: string;
773
+ }>;
774
+ } & {
775
+ "/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
776
+ type: "hostname" | "query";
777
+ value: string;
778
+ }, {
779
+ createdAt: Date;
780
+ affiliateId: string;
781
+ type: "hostname" | "query";
782
+ value: string;
783
+ }>;
784
+ };
785
+ put: {};
786
+ delete: {
787
+ "/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
788
+ type: "hostname" | "query";
789
+ value: string;
790
+ }, unknown>;
791
+ };
792
+ copy: {};
793
+ head: {};
794
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
795
+ patch: {};
796
+ options: {};
797
+ get: {};
798
+ post: {
799
+ "/affiliate-logs": import("@withtyped/server").PathGuard<"/", unknown, {
800
+ createdAt: string;
801
+ userId: string;
802
+ hostname?: string | undefined;
803
+ query?: string | undefined;
804
+ }, {
805
+ id: string;
806
+ createdAt: Date;
807
+ affiliateId: string | null;
808
+ userId: string;
809
+ createdVia: {
810
+ createdAt: string;
811
+ hostname?: string | undefined;
812
+ query?: string | undefined;
813
+ };
814
+ }>;
815
+ };
816
+ put: {};
817
+ delete: {};
818
+ copy: {};
819
+ head: {};
820
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
821
+ patch: {
822
+ "/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:invitationId/status", unknown, {
823
+ status: OrganizationInvitationStatus.Accepted;
824
+ }, unknown>;
825
+ };
826
+ options: {};
827
+ get: {
828
+ "/invitations": import("@withtyped/server").PathGuard<"/", unknown, unknown, ({
829
+ id: string;
830
+ createdAt: number;
831
+ status: OrganizationInvitationStatus;
832
+ tenantId: string;
833
+ updatedAt: number;
834
+ inviterId: string | null;
835
+ invitee: string;
836
+ acceptedUserId: string | null;
837
+ organizationId: string;
838
+ expiresAt: number;
839
+ organizationRoles: OrganizationRoleEntity[];
840
+ } & {
841
+ tenantName: string;
842
+ tenantTag: TenantTag;
843
+ })[]>;
844
+ } & {
845
+ "/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:invitationId", unknown, unknown, {
846
+ id: string;
847
+ createdAt: number;
848
+ status: OrganizationInvitationStatus;
849
+ tenantId: string;
850
+ updatedAt: number;
851
+ inviterId: string | null;
852
+ invitee: string;
853
+ acceptedUserId: string | null;
854
+ organizationId: string;
855
+ expiresAt: number;
856
+ organizationRoles: OrganizationRoleEntity[];
857
+ }>;
858
+ };
859
+ post: {};
860
+ put: {};
861
+ delete: {};
862
+ copy: {};
863
+ head: {};
864
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
865
+ patch: {};
866
+ options: {};
867
+ get: {};
868
+ post: {};
869
+ put: {};
870
+ delete: {
871
+ "/me": import("@withtyped/server").PathGuard<"/", unknown, unknown, unknown>;
872
+ };
873
+ copy: {};
874
+ head: {};
875
+ }, "/api">>, "/api">;
876
+ export declare const tenantAuthRouter: import("@withtyped/server").Router<RequestContext, import("@withtyped/server").WithBodyContext<import("@withtyped/server").BaseContext & {
877
+ request: {
878
+ id?: string | undefined;
879
+ method?: import("@withtyped/server").RequestMethod | undefined;
880
+ headers: import("http").IncomingHttpHeaders;
881
+ url: URL;
882
+ body?: unknown;
883
+ };
884
+ }>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
885
+ patch: {
886
+ "/:tenantId/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/status", unknown, {
887
+ status: OrganizationInvitationStatus.Revoked;
888
+ }, {
889
+ id: string;
890
+ createdAt: number;
891
+ status: OrganizationInvitationStatus;
892
+ tenantId: string;
893
+ updatedAt: number;
894
+ inviterId: string | null;
895
+ invitee: string;
896
+ acceptedUserId: string | null;
897
+ organizationId: string;
898
+ expiresAt: number;
899
+ organizationRoles: OrganizationRoleEntity[];
900
+ }>;
901
+ };
902
+ options: {};
903
+ get: {
904
+ "/:tenantId/members": import("@withtyped/server").PathGuard<"/:tenantId/members", unknown, unknown, {
905
+ id: string;
906
+ name: string | null;
907
+ username: string | null;
908
+ primaryEmail: string | null;
909
+ primaryPhone: string | null;
910
+ avatar: string | null;
911
+ organizationRoles: OrganizationRoleEntity[];
912
+ }[]>;
913
+ } & {
914
+ "/:tenantId/members/:userId/scopes": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/scopes", unknown, unknown, OrganizationScope[]>;
915
+ } & {
916
+ "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, unknown, ({
917
+ id: string;
918
+ createdAt: number;
919
+ status: OrganizationInvitationStatus;
920
+ tenantId: string;
921
+ updatedAt: number;
922
+ inviterId: string | null;
923
+ invitee: string;
924
+ acceptedUserId: string | null;
925
+ organizationId: string;
926
+ expiresAt: number;
927
+ organizationRoles: OrganizationRoleEntity[];
928
+ } & {
929
+ inviterName?: string | undefined;
930
+ })[]>;
931
+ };
932
+ post: {
933
+ "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
934
+ invitee: string | string[];
935
+ roleName: TenantRole;
936
+ expiresAt?: number | undefined;
937
+ }, {
938
+ id: string;
939
+ createdAt: number;
940
+ status: OrganizationInvitationStatus;
941
+ tenantId: string;
942
+ updatedAt: number;
943
+ inviterId: string | null;
944
+ invitee: string;
945
+ acceptedUserId: string | null;
946
+ organizationId: string;
947
+ expiresAt: number;
948
+ organizationRoles: OrganizationRoleEntity[];
949
+ } | {
950
+ id: string;
951
+ createdAt: number;
952
+ status: OrganizationInvitationStatus;
953
+ tenantId: string;
954
+ updatedAt: number;
955
+ inviterId: string | null;
956
+ invitee: string;
957
+ acceptedUserId: string | null;
958
+ organizationId: string;
959
+ expiresAt: number;
960
+ organizationRoles: OrganizationRoleEntity[];
961
+ }[]>;
962
+ } & {
963
+ "/:tenantId/invitations/:invitationId/message": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/message", unknown, unknown, unknown>;
964
+ };
965
+ put: {
966
+ "/:tenantId/members/:userId/roles": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/roles", unknown, {
967
+ roleName: TenantRole;
968
+ }, unknown>;
969
+ };
970
+ delete: {
971
+ "/:tenantId/members/:userId": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId", unknown, unknown, unknown>;
972
+ } & {
973
+ "/:tenantId/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId", unknown, unknown, unknown>;
974
+ };
975
+ copy: {};
976
+ head: {};
977
+ }, "/api/tenants">>, "/api/tenants">;
978
+
979
+ export {
980
+ router as default,
981
+ };
982
+
983
+ export {};
package/package.json CHANGED
@@ -1,43 +1,45 @@
1
1
  {
2
2
  "name": "@logto/cloud",
3
- "version": "0.2.5-4f1d80b",
3
+ "version": "0.2.5-582d792",
4
4
  "description": "Logto Cloud service.",
5
5
  "main": "build/index.js",
6
6
  "author": "Silverhand Inc. <contact@silverhand.io>",
7
7
  "license": "Elastic-2.0",
8
8
  "type": "module",
9
9
  "files": [
10
- "build"
10
+ "lib"
11
11
  ],
12
12
  "exports": {
13
- "./routes": "./build/routes/index.js"
13
+ "./routes": "./lib/routes/index.js"
14
14
  },
15
15
  "imports": {
16
16
  "#src/*": "./build/*"
17
17
  },
18
18
  "devDependencies": {
19
- "@silverhand/eslint-config": "3.0.1",
20
- "@silverhand/jest-config": "3.0.0",
21
- "@silverhand/ts-config": "3.0.0",
19
+ "@silverhand/eslint-config": "6.0.1",
20
+ "@silverhand/ts-config": "6.0.0",
22
21
  "@types/accepts": "^1.3.5",
23
22
  "@types/http-proxy": "^1.17.9",
24
- "@types/jest": "^29.4.0",
25
23
  "@types/mime-types": "^2.1.1",
26
- "@types/node": "^18.11.18",
24
+ "@types/node": "^20.0.0",
27
25
  "@types/yargs": "^17.0.24",
28
- "dts-bundle-generator": "^8.0.1",
29
- "eslint": "^8.21.0",
30
- "jest": "^29.5.0",
31
- "lint-staged": "^13.0.0",
26
+ "dts-bundle-generator": "^9.3.1",
27
+ "eslint": "^8.57.0",
28
+ "lint-staged": "^15.0.0",
32
29
  "nodemon": "^3.0.0",
33
- "prettier": "^2.8.1",
34
- "typescript": "^5.0.0"
30
+ "prettier": "^3.0.0",
31
+ "typescript": "^5.3.3",
32
+ "vite-tsconfig-paths": "^4.3.1",
33
+ "vitest": "^2.0.0"
35
34
  },
36
35
  "engines": {
37
- "node": "^18.12.0"
36
+ "node": "^20.9.0"
38
37
  },
39
38
  "eslintConfig": {
40
39
  "extends": "@silverhand",
40
+ "rules": {
41
+ "no-console": "error"
42
+ },
41
43
  "ignorePatterns": [
42
44
  "types.test.ts"
43
45
  ]
@@ -47,22 +49,19 @@
47
49
  "access": "public"
48
50
  },
49
51
  "dependencies": {
50
- "@silverhand/essentials": "^2.7.0",
51
- "@withtyped/server": "^0.12.7"
52
+ "@silverhand/essentials": "^2.9.1",
53
+ "@withtyped/server": "^0.14.0"
52
54
  },
53
55
  "scripts": {
54
56
  "precommit": "lint-staged",
55
- "build": "rm -rf build/ && tsc -p tsconfig.build.json",
57
+ "build": "rm -rf build/ && tsc -p tsconfig.build.json && pnpm build:lib",
56
58
  "//": "It is not used to build the service itself.",
57
- "build:lib": "rm -rf build/ && dts-bundle-generator src/routes/index.ts --project tsconfig.build.json -o build/routes/index.d.ts",
58
- "build:test": "rm -rf build/ && tsc -p tsconfig.test.json --sourcemap",
59
+ "build:lib": "rm -rf lib/ && dts-bundle-generator src/routes/index.ts --project tsconfig.build.lib.json -o lib/routes/index.d.ts",
59
60
  "lint": "eslint --ext .ts src",
60
61
  "lint:report": "pnpm lint --format json --output-file report.json",
61
62
  "dev": "rm -rf build/ && nodemon",
62
63
  "start": "NODE_ENV=production node .",
63
- "test:only": "NODE_OPTIONS=\"--experimental-vm-modules --max_old_space_size=4096\" jest --logHeapUsage",
64
- "test": "pnpm build:test && pnpm test:only && pnpm build:lib && pnpm test:types",
65
- "test:ci": "pnpm test:only --coverage --silent",
64
+ "test": "vitest && pnpm build:lib && pnpm test:types",
66
65
  "test:types": "tsc -p tsconfig.test.types.json",
67
66
  "cli": "node ./build/cli/index.js"
68
67
  }
@@ -1,257 +0,0 @@
1
- // Generated by dts-bundle-generator v8.0.1
2
-
3
- import { RequestContext } from '@withtyped/server';
4
-
5
- export type WithAuthContext<Context = RequestContext> = Context & {
6
- auth: {
7
- id: string;
8
- scopes: string[];
9
- };
10
- };
11
- declare enum TenantTag {
12
- Development = "development",
13
- Staging = "staging",
14
- Production = "production"
15
- }
16
- declare enum VerificationCodeType {
17
- SignIn = "SignIn",
18
- Register = "Register",
19
- ForgotPassword = "ForgotPassword",
20
- /** @deprecated */
21
- Continue = "Continue",
22
- Generic = "Generic",
23
- /** @deprecated Use `Generic` type template for sending test sms/email use case */
24
- Test = "Test"
25
- }
26
- 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").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
27
- options: {};
28
- patch: {
29
- "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
30
- name?: string | undefined;
31
- tag?: TenantTag | undefined;
32
- }, {
33
- name: string;
34
- id: string;
35
- indicator: string;
36
- tag: TenantTag;
37
- }>;
38
- };
39
- get: {
40
- "/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
41
- id: string;
42
- name: string;
43
- indicator: string;
44
- tag: TenantTag;
45
- subscriptionPlan: {
46
- id: string;
47
- name: string;
48
- quota: {
49
- mauLimit: number | null;
50
- applicationsLimit: number;
51
- machineToMachineLimit: number;
52
- resourcesLimit: number;
53
- scopesPerResourceLimit: number;
54
- customDomainEnabled: boolean;
55
- omniSignInEnabled: boolean;
56
- builtInEmailConnectorEnabled: boolean;
57
- socialConnectorsLimit: number | null;
58
- standardConnectorsLimit: number;
59
- rolesLimit: number;
60
- scopesPerRoleLimit: number | null;
61
- hooksLimit: number;
62
- auditLogsRetentionDays: number;
63
- };
64
- stripeProducts: {
65
- description?: string | undefined;
66
- id: string;
67
- name: string;
68
- type: "flat" | "tier1" | "tier2" | "tier3";
69
- price: {
70
- quantity?: 1 | undefined;
71
- unitAmount?: number | null | undefined;
72
- id: string;
73
- unitAmountDecimal: string;
74
- };
75
- }[];
76
- createdAt: Date;
77
- updatedAt: Date;
78
- };
79
- }[]>;
80
- } & {
81
- "/tenants/my": import("@withtyped/server").PathGuard<"/my", unknown, unknown, {
82
- id: string;
83
- name: string;
84
- indicator: string;
85
- tag: TenantTag;
86
- subscriptionPlan: {
87
- id: string;
88
- name: string;
89
- quota: {
90
- mauLimit: number | null;
91
- applicationsLimit: number;
92
- machineToMachineLimit: number;
93
- resourcesLimit: number;
94
- scopesPerResourceLimit: number;
95
- customDomainEnabled: boolean;
96
- omniSignInEnabled: boolean;
97
- builtInEmailConnectorEnabled: boolean;
98
- socialConnectorsLimit: number | null;
99
- standardConnectorsLimit: number;
100
- rolesLimit: number;
101
- scopesPerRoleLimit: number | null;
102
- hooksLimit: number;
103
- auditLogsRetentionDays: number;
104
- };
105
- stripeProducts: {
106
- description?: string | undefined;
107
- id: string;
108
- name: string;
109
- type: "flat" | "tier1" | "tier2" | "tier3";
110
- price: {
111
- quantity?: 1 | undefined;
112
- unitAmount?: number | null | undefined;
113
- id: string;
114
- unitAmountDecimal: string;
115
- };
116
- }[];
117
- createdAt: Date;
118
- updatedAt: Date;
119
- };
120
- }>;
121
- };
122
- post: {
123
- "/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
124
- name?: string | undefined;
125
- tag?: TenantTag | undefined;
126
- }, {
127
- name: string;
128
- id: string;
129
- indicator: string;
130
- tag: TenantTag;
131
- }>;
132
- };
133
- put: {};
134
- head: {};
135
- delete: {
136
- "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, unknown, unknown>;
137
- };
138
- copy: {};
139
- }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
140
- options: {};
141
- patch: {};
142
- get: {
143
- "/services/mails/usage": import("@withtyped/server").PathGuard<"/mails/usage", {
144
- from?: string | undefined;
145
- }, unknown, unknown>;
146
- };
147
- post: {
148
- "/services/send-email": import("@withtyped/server").PathGuard<"/send-email", unknown, {
149
- data: {
150
- type: VerificationCodeType;
151
- to: string;
152
- payload: {
153
- senderName?: string | undefined;
154
- companyInformation?: string | undefined;
155
- appLogo?: string | undefined;
156
- code: string;
157
- };
158
- };
159
- }, unknown>;
160
- } & {
161
- "/services/mails": import("@withtyped/server").PathGuard<"/mails", unknown, {
162
- data: {
163
- type: VerificationCodeType;
164
- to: string;
165
- payload: {
166
- senderName?: string | undefined;
167
- companyInformation?: string | undefined;
168
- appLogo?: string | undefined;
169
- code: string;
170
- };
171
- };
172
- }, unknown>;
173
- } & {
174
- "/services/send-sms": import("@withtyped/server").PathGuard<"/send-sms", unknown, {
175
- data: {
176
- type: VerificationCodeType;
177
- to: string;
178
- payload: {
179
- senderName?: string | undefined;
180
- companyInformation?: string | undefined;
181
- appLogo?: string | undefined;
182
- code: string;
183
- };
184
- };
185
- }, unknown>;
186
- };
187
- put: {};
188
- head: {};
189
- delete: {};
190
- copy: {};
191
- }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
192
- options: {};
193
- patch: {};
194
- get: {
195
- "/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
196
- id: string;
197
- name: string;
198
- quota: {
199
- mauLimit: number | null;
200
- applicationsLimit: number;
201
- machineToMachineLimit: number;
202
- resourcesLimit: number;
203
- scopesPerResourceLimit: number;
204
- customDomainEnabled: boolean;
205
- omniSignInEnabled: boolean;
206
- builtInEmailConnectorEnabled: boolean;
207
- socialConnectorsLimit: number | null;
208
- standardConnectorsLimit: number;
209
- rolesLimit: number;
210
- scopesPerRoleLimit: number | null;
211
- hooksLimit: number;
212
- auditLogsRetentionDays: number;
213
- };
214
- stripeProducts: {
215
- description?: string | undefined;
216
- id: string;
217
- name: string;
218
- type: "flat" | "tier1" | "tier2" | "tier3";
219
- price: {
220
- quantity?: 1 | undefined;
221
- unitAmount?: number | null | undefined;
222
- id: string;
223
- unitAmountDecimal: string;
224
- };
225
- }[];
226
- createdAt: Date;
227
- updatedAt: Date;
228
- }[]>;
229
- };
230
- post: {};
231
- put: {};
232
- head: {};
233
- delete: {};
234
- copy: {};
235
- }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
236
- options: {};
237
- patch: {};
238
- get: {};
239
- post: {
240
- "/checkout-session": import("@withtyped/server").PathGuard<"/", unknown, {
241
- tenantId?: string | undefined;
242
- cancelCallbackUrl?: string | undefined;
243
- planId: string;
244
- successCallbackUrl: string;
245
- }, unknown>;
246
- };
247
- put: {};
248
- head: {};
249
- delete: {};
250
- copy: {};
251
- }, "/api">>, "/api">;
252
-
253
- export {
254
- router as default,
255
- };
256
-
257
- export {};