@logto/cloud 0.2.5-a7eedce → 0.2.5-aac51e9

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 +495 -53
  2. package/package.json +5 -5
@@ -16,6 +16,8 @@ declare enum VerificationCodeType {
16
16
  Register = "Register",
17
17
  ForgotPassword = "ForgotPassword",
18
18
  Generic = "Generic",
19
+ UserPermissionValidation = "UserPermissionValidation",
20
+ BindNewIdentifier = "BindNewIdentifier",
19
21
  /** @deprecated Use `Generic` type template for sending test sms/email use case */
20
22
  Test = "Test"
21
23
  }
@@ -29,7 +31,11 @@ declare enum TemplateType {
29
31
  /** The template for sending organization invitation. */
30
32
  OrganizationInvitation = "OrganizationInvitation",
31
33
  /** The template for generic usage. */
32
- Generic = "Generic"
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"
33
39
  }
34
40
  declare enum OrganizationInvitationStatus {
35
41
  Pending = "Pending",
@@ -69,6 +75,23 @@ declare enum TenantRole {
69
75
  /** Collaborator of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
70
76
  Collaborator = "collaborator"
71
77
  }
78
+ declare const availableReportableUsageKeys: readonly [
79
+ "tokenLimit",
80
+ "machineToMachineLimit",
81
+ "resourcesLimit",
82
+ "enterpriseSsoLimit",
83
+ "hooksLimit",
84
+ "tenantMembersLimit",
85
+ "mfaEnabled",
86
+ "organizationsEnabled",
87
+ "organizationsLimit"
88
+ ];
89
+ export type ReportableUsageKey = (typeof availableReportableUsageKeys)[number];
90
+ export type RealtimeReportableUsageKey = Exclude<ReportableUsageKey, "tokenLimit">;
91
+ declare enum LogtoSkuType {
92
+ Basic = "Basic",
93
+ AddOn = "AddOn"
94
+ }
72
95
  declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
73
96
  createdAt: Date;
74
97
  affiliateId: string;
@@ -84,7 +107,8 @@ declare const Affiliates: import("@withtyped/server/lib/model/index.js").default
84
107
  export type Affiliate = InferModelType<typeof Affiliates>;
85
108
  declare enum RegionName {
86
109
  EU = "EU",
87
- US = "US"
110
+ US = "US",
111
+ AU = "AU"
88
112
  }
89
113
  export type AffiliateData = Affiliate & {
90
114
  properties: Array<Pick<AffiliateProperty, "type" | "value">>;
@@ -108,7 +132,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
108
132
  body?: Json | undefined;
109
133
  bodyRaw?: Buffer | undefined;
110
134
  };
111
- }>, 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<{
135
+ }>, 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<{
112
136
  patch: {
113
137
  "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
114
138
  name?: string | undefined;
@@ -116,9 +140,12 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
116
140
  id: string;
117
141
  name: string;
118
142
  createdAt: Date;
143
+ quota: {
144
+ mauLimit: number | null;
145
+ tokenLimit: number | null;
146
+ };
119
147
  usage: {
120
148
  activeUsers: number;
121
- cost: number;
122
149
  tokenUsage: number;
123
150
  };
124
151
  indicator: string;
@@ -129,13 +156,21 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
129
156
  planId: string;
130
157
  currentPeriodStart: Date;
131
158
  currentPeriodEnd: Date;
159
+ isEnterprisePlan: boolean;
160
+ id?: string | undefined;
161
+ upcomingInvoice?: {
162
+ subtotal: number;
163
+ subtotalExcludingTax: number | null;
164
+ total: number;
165
+ totalExcludingTax: number | null;
166
+ } | null | undefined;
132
167
  };
133
168
  regionName: RegionName;
134
169
  tag: TenantTag;
135
170
  openInvoices: {
136
- status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
137
171
  id: string;
138
172
  createdAt: Date;
173
+ status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
139
174
  updatedAt: Date;
140
175
  customerId: string | null;
141
176
  billingReason: string | null;
@@ -143,6 +178,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
143
178
  periodEnd: Date;
144
179
  amountDue: number;
145
180
  amountPaid: number;
181
+ basicSkuId: string | null;
146
182
  subscriptionId: string | null;
147
183
  hostedInvoiceUrl: string | null;
148
184
  invoicePdf: string | null;
@@ -155,9 +191,12 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
155
191
  id: string;
156
192
  name: string;
157
193
  createdAt: Date;
194
+ quota: {
195
+ mauLimit: number | null;
196
+ tokenLimit: number | null;
197
+ };
158
198
  usage: {
159
199
  activeUsers: number;
160
- cost: number;
161
200
  tokenUsage: number;
162
201
  };
163
202
  indicator: string;
@@ -168,13 +207,21 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
168
207
  planId: string;
169
208
  currentPeriodStart: Date;
170
209
  currentPeriodEnd: Date;
210
+ isEnterprisePlan: boolean;
211
+ id?: string | undefined;
212
+ upcomingInvoice?: {
213
+ subtotal: number;
214
+ subtotalExcludingTax: number | null;
215
+ total: number;
216
+ totalExcludingTax: number | null;
217
+ } | null | undefined;
171
218
  };
172
219
  regionName: RegionName;
173
220
  tag: TenantTag;
174
221
  openInvoices: {
175
- status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
176
222
  id: string;
177
223
  createdAt: Date;
224
+ status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
178
225
  updatedAt: Date;
179
226
  customerId: string | null;
180
227
  billingReason: string | null;
@@ -182,6 +229,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
182
229
  periodEnd: Date;
183
230
  amountDue: number;
184
231
  amountPaid: number;
232
+ basicSkuId: string | null;
185
233
  subscriptionId: string | null;
186
234
  hostedInvoiceUrl: string | null;
187
235
  invoicePdf: string | null;
@@ -197,9 +245,12 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
197
245
  id: string;
198
246
  name: string;
199
247
  createdAt: Date;
248
+ quota: {
249
+ mauLimit: number | null;
250
+ tokenLimit: number | null;
251
+ };
200
252
  usage: {
201
253
  activeUsers: number;
202
- cost: number;
203
254
  tokenUsage: number;
204
255
  };
205
256
  indicator: string;
@@ -210,13 +261,21 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
210
261
  planId: string;
211
262
  currentPeriodStart: Date;
212
263
  currentPeriodEnd: Date;
264
+ isEnterprisePlan: boolean;
265
+ id?: string | undefined;
266
+ upcomingInvoice?: {
267
+ subtotal: number;
268
+ subtotalExcludingTax: number | null;
269
+ total: number;
270
+ totalExcludingTax: number | null;
271
+ } | null | undefined;
213
272
  };
214
273
  regionName: RegionName;
215
274
  tag: TenantTag;
216
275
  openInvoices: {
217
- status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
218
276
  id: string;
219
277
  createdAt: Date;
278
+ status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
220
279
  updatedAt: Date;
221
280
  customerId: string | null;
222
281
  billingReason: string | null;
@@ -224,6 +283,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
224
283
  periodEnd: Date;
225
284
  amountDue: number;
226
285
  amountPaid: number;
286
+ basicSkuId: string | null;
227
287
  subscriptionId: string | null;
228
288
  hostedInvoiceUrl: string | null;
229
289
  invoicePdf: string | null;
@@ -242,23 +302,268 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
242
302
  get: {
243
303
  "/tenants/my/subscription": import("@withtyped/server").PathGuard<"/my/subscription", unknown, unknown, {
244
304
  status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
305
+ quota: {
306
+ auditLogsRetentionDays: number | null;
307
+ mauLimit: number | null;
308
+ applicationsLimit: number | null;
309
+ thirdPartyApplicationsLimit: number | null;
310
+ scopesPerResourceLimit: number | null;
311
+ socialConnectorsLimit: number | null;
312
+ userRolesLimit: number | null;
313
+ machineToMachineRolesLimit: number | null;
314
+ scopesPerRoleLimit: number | null;
315
+ hooksLimit: number | null;
316
+ customJwtEnabled: boolean;
317
+ subjectTokenEnabled: boolean;
318
+ bringYourUiEnabled: boolean;
319
+ tokenLimit: number | null;
320
+ machineToMachineLimit: number | null;
321
+ resourcesLimit: number | null;
322
+ enterpriseSsoLimit: number | null;
323
+ tenantMembersLimit: number | null;
324
+ mfaEnabled: boolean;
325
+ organizationsEnabled: boolean;
326
+ organizationsLimit: number | null;
327
+ idpInitiatedSsoEnabled: boolean;
328
+ };
245
329
  planId: string;
246
330
  currentPeriodStart: Date;
247
331
  currentPeriodEnd: Date;
332
+ isEnterprisePlan: boolean;
333
+ id?: string | undefined;
334
+ upcomingInvoice?: {
335
+ subtotal: number;
336
+ subtotalExcludingTax: number | null;
337
+ total: number;
338
+ totalExcludingTax: number | null;
339
+ } | null | undefined;
248
340
  }>;
249
341
  } & {
342
+ "/tenants/my/subscription-usage": import("@withtyped/server").PathGuard<"/my/subscription-usage", unknown, unknown, {
343
+ usage: {
344
+ applicationsLimit: number;
345
+ thirdPartyApplicationsLimit: number;
346
+ scopesPerResourceLimit: number;
347
+ socialConnectorsLimit: number;
348
+ userRolesLimit: number;
349
+ machineToMachineRolesLimit: number;
350
+ scopesPerRoleLimit: number;
351
+ hooksLimit: number;
352
+ customJwtEnabled: boolean;
353
+ subjectTokenEnabled: boolean;
354
+ bringYourUiEnabled: boolean;
355
+ machineToMachineLimit: number;
356
+ resourcesLimit: number;
357
+ enterpriseSsoLimit: number;
358
+ tenantMembersLimit: number;
359
+ mfaEnabled: boolean;
360
+ organizationsEnabled: boolean;
361
+ organizationsLimit: number;
362
+ idpInitiatedSsoEnabled: boolean;
363
+ };
364
+ resources: Record<string, number>;
365
+ roles: Record<string, number>;
366
+ quota: {
367
+ auditLogsRetentionDays: number | null;
368
+ mauLimit: number | null;
369
+ applicationsLimit: number | null;
370
+ thirdPartyApplicationsLimit: number | null;
371
+ scopesPerResourceLimit: number | null;
372
+ socialConnectorsLimit: number | null;
373
+ userRolesLimit: number | null;
374
+ machineToMachineRolesLimit: number | null;
375
+ scopesPerRoleLimit: number | null;
376
+ hooksLimit: number | null;
377
+ customJwtEnabled: boolean;
378
+ subjectTokenEnabled: boolean;
379
+ bringYourUiEnabled: boolean;
380
+ tokenLimit: number | null;
381
+ machineToMachineLimit: number | null;
382
+ resourcesLimit: number | null;
383
+ enterpriseSsoLimit: number | null;
384
+ tenantMembersLimit: number | null;
385
+ mfaEnabled: boolean;
386
+ organizationsEnabled: boolean;
387
+ organizationsLimit: number | null;
388
+ idpInitiatedSsoEnabled: boolean;
389
+ };
390
+ basicQuota: {
391
+ auditLogsRetentionDays: number | null;
392
+ mauLimit: number | null;
393
+ applicationsLimit: number | null;
394
+ thirdPartyApplicationsLimit: number | null;
395
+ scopesPerResourceLimit: number | null;
396
+ socialConnectorsLimit: number | null;
397
+ userRolesLimit: number | null;
398
+ machineToMachineRolesLimit: number | null;
399
+ scopesPerRoleLimit: number | null;
400
+ hooksLimit: number | null;
401
+ customJwtEnabled: boolean;
402
+ subjectTokenEnabled: boolean;
403
+ bringYourUiEnabled: boolean;
404
+ tokenLimit: number | null;
405
+ machineToMachineLimit: number | null;
406
+ resourcesLimit: number | null;
407
+ enterpriseSsoLimit: number | null;
408
+ tenantMembersLimit: number | null;
409
+ mfaEnabled: boolean;
410
+ organizationsEnabled: boolean;
411
+ organizationsLimit: number | null;
412
+ idpInitiatedSsoEnabled: boolean;
413
+ };
414
+ }>;
415
+ };
416
+ post: {
417
+ "/tenants/my/subscription/item-updates": import("@withtyped/server").PathGuard<"/my/subscription/item-updates", unknown, {
418
+ usageKey: RealtimeReportableUsageKey;
419
+ }, {
420
+ message: string;
421
+ }>;
422
+ };
423
+ put: {};
424
+ delete: {};
425
+ copy: {};
426
+ head: {};
427
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
428
+ patch: {};
429
+ options: {};
430
+ get: {
250
431
  "/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
251
432
  status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
252
433
  planId: string;
253
434
  currentPeriodStart: Date;
254
435
  currentPeriodEnd: Date;
436
+ isEnterprisePlan: boolean;
437
+ id?: string | undefined;
438
+ upcomingInvoice?: {
439
+ subtotal: number;
440
+ subtotalExcludingTax: number | null;
441
+ total: number;
442
+ totalExcludingTax: number | null;
443
+ } | null | undefined;
444
+ }>;
445
+ } & {
446
+ "/tenants/:tenantId/subscription-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription-usage", unknown, unknown, {
447
+ usage: {
448
+ applicationsLimit: number;
449
+ thirdPartyApplicationsLimit: number;
450
+ scopesPerResourceLimit: number;
451
+ socialConnectorsLimit: number;
452
+ userRolesLimit: number;
453
+ machineToMachineRolesLimit: number;
454
+ scopesPerRoleLimit: number;
455
+ hooksLimit: number;
456
+ customJwtEnabled: boolean;
457
+ subjectTokenEnabled: boolean;
458
+ bringYourUiEnabled: boolean;
459
+ machineToMachineLimit: number;
460
+ resourcesLimit: number;
461
+ enterpriseSsoLimit: number;
462
+ tenantMembersLimit: number;
463
+ mfaEnabled: boolean;
464
+ organizationsEnabled: boolean;
465
+ organizationsLimit: number;
466
+ idpInitiatedSsoEnabled: boolean;
467
+ };
468
+ resources: Record<string, number>;
469
+ roles: Record<string, number>;
470
+ quota: {
471
+ auditLogsRetentionDays: number | null;
472
+ mauLimit: number | null;
473
+ applicationsLimit: number | null;
474
+ thirdPartyApplicationsLimit: number | null;
475
+ scopesPerResourceLimit: number | null;
476
+ socialConnectorsLimit: number | null;
477
+ userRolesLimit: number | null;
478
+ machineToMachineRolesLimit: number | null;
479
+ scopesPerRoleLimit: number | null;
480
+ hooksLimit: number | null;
481
+ customJwtEnabled: boolean;
482
+ subjectTokenEnabled: boolean;
483
+ bringYourUiEnabled: boolean;
484
+ tokenLimit: number | null;
485
+ machineToMachineLimit: number | null;
486
+ resourcesLimit: number | null;
487
+ enterpriseSsoLimit: number | null;
488
+ tenantMembersLimit: number | null;
489
+ mfaEnabled: boolean;
490
+ organizationsEnabled: boolean;
491
+ organizationsLimit: number | null;
492
+ idpInitiatedSsoEnabled: boolean;
493
+ };
494
+ basicQuota: {
495
+ auditLogsRetentionDays: number | null;
496
+ mauLimit: number | null;
497
+ applicationsLimit: number | null;
498
+ thirdPartyApplicationsLimit: number | null;
499
+ scopesPerResourceLimit: number | null;
500
+ socialConnectorsLimit: number | null;
501
+ userRolesLimit: number | null;
502
+ machineToMachineRolesLimit: number | null;
503
+ scopesPerRoleLimit: number | null;
504
+ hooksLimit: number | null;
505
+ customJwtEnabled: boolean;
506
+ subjectTokenEnabled: boolean;
507
+ bringYourUiEnabled: boolean;
508
+ tokenLimit: number | null;
509
+ machineToMachineLimit: number | null;
510
+ resourcesLimit: number | null;
511
+ enterpriseSsoLimit: number | null;
512
+ tenantMembersLimit: number | null;
513
+ mfaEnabled: boolean;
514
+ organizationsEnabled: boolean;
515
+ organizationsLimit: number | null;
516
+ idpInitiatedSsoEnabled: boolean;
517
+ };
518
+ }>;
519
+ } & {
520
+ "/tenants/:tenantId/subscription/periodic-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription/periodic-usage", unknown, unknown, {
521
+ mauLimit: number;
522
+ tokenLimit: number;
523
+ }>;
524
+ } & {
525
+ "/tenants/:tenantId/subscription/add-on-skus": import("@withtyped/server").PathGuard<"/:tenantId/subscription/add-on-skus", unknown, unknown, {
526
+ tokenLimit?: {
527
+ id: string;
528
+ name: string | null;
529
+ createdAt: Date;
530
+ defaultPriceId: string | null;
531
+ unitPrice: number | null;
532
+ type: LogtoSkuType;
533
+ quota: {
534
+ auditLogsRetentionDays?: number | null | undefined;
535
+ mauLimit?: number | null | undefined;
536
+ applicationsLimit?: number | null | undefined;
537
+ thirdPartyApplicationsLimit?: number | null | undefined;
538
+ scopesPerResourceLimit?: number | null | undefined;
539
+ socialConnectorsLimit?: number | null | undefined;
540
+ userRolesLimit?: number | null | undefined;
541
+ machineToMachineRolesLimit?: number | null | undefined;
542
+ scopesPerRoleLimit?: number | null | undefined;
543
+ hooksLimit?: number | null | undefined;
544
+ customJwtEnabled?: boolean | undefined;
545
+ subjectTokenEnabled?: boolean | undefined;
546
+ bringYourUiEnabled?: boolean | undefined;
547
+ tokenLimit?: number | null | undefined;
548
+ machineToMachineLimit?: number | null | undefined;
549
+ resourcesLimit?: number | null | undefined;
550
+ enterpriseSsoLimit?: number | null | undefined;
551
+ tenantMembersLimit?: number | null | undefined;
552
+ mfaEnabled?: boolean | undefined;
553
+ organizationsEnabled?: boolean | undefined;
554
+ organizationsLimit?: number | null | undefined;
555
+ idpInitiatedSsoEnabled?: boolean | undefined;
556
+ };
557
+ updatedAt: Date;
558
+ productId: string | null;
559
+ } | undefined;
255
560
  }>;
256
561
  } & {
257
562
  "/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
258
563
  invoices: {
259
- status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
260
564
  id: string;
261
565
  createdAt: Date;
566
+ status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
262
567
  updatedAt: Date;
263
568
  customerId: string | null;
264
569
  billingReason: string | null;
@@ -266,22 +571,55 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
266
571
  periodEnd: Date;
267
572
  amountDue: number;
268
573
  amountPaid: number;
574
+ basicSkuId: string | null;
269
575
  subscriptionId: string | null;
270
576
  hostedInvoiceUrl: string | null;
271
577
  invoicePdf: string | null;
272
578
  planName: string | null;
579
+ skuId?: string | null | undefined;
273
580
  }[];
274
581
  }>;
582
+ } & {
583
+ "/tenants/:tenantId/available-skus": import("@withtyped/server").PathGuard<"/:tenantId/available-skus", {
584
+ type?: LogtoSkuType | undefined;
585
+ }, unknown, {
586
+ id: string;
587
+ name: string | null;
588
+ createdAt: Date;
589
+ defaultPriceId: string | null;
590
+ unitPrice: number | null;
591
+ type: LogtoSkuType;
592
+ quota: {
593
+ auditLogsRetentionDays?: number | null | undefined;
594
+ mauLimit?: number | null | undefined;
595
+ applicationsLimit?: number | null | undefined;
596
+ thirdPartyApplicationsLimit?: number | null | undefined;
597
+ scopesPerResourceLimit?: number | null | undefined;
598
+ socialConnectorsLimit?: number | null | undefined;
599
+ userRolesLimit?: number | null | undefined;
600
+ machineToMachineRolesLimit?: number | null | undefined;
601
+ scopesPerRoleLimit?: number | null | undefined;
602
+ hooksLimit?: number | null | undefined;
603
+ customJwtEnabled?: boolean | undefined;
604
+ subjectTokenEnabled?: boolean | undefined;
605
+ bringYourUiEnabled?: boolean | undefined;
606
+ tokenLimit?: number | null | undefined;
607
+ machineToMachineLimit?: number | null | undefined;
608
+ resourcesLimit?: number | null | undefined;
609
+ enterpriseSsoLimit?: number | null | undefined;
610
+ tenantMembersLimit?: number | null | undefined;
611
+ mfaEnabled?: boolean | undefined;
612
+ organizationsEnabled?: boolean | undefined;
613
+ organizationsLimit?: number | null | undefined;
614
+ idpInitiatedSsoEnabled?: boolean | undefined;
615
+ };
616
+ updatedAt: Date;
617
+ productId: string | null;
618
+ }[]>;
275
619
  } & {
276
620
  "/tenants/:tenantId/invoices/:invoiceId/hosted-invoice-url": import("@withtyped/server").PathGuard<"/:tenantId/invoices/:invoiceId/hosted-invoice-url", unknown, unknown, {
277
621
  hostedInvoiceUrl: string;
278
622
  }>;
279
- } & {
280
- "/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
281
- activeUsers: number;
282
- cost: number;
283
- tokenUsage: number;
284
- }>;
285
623
  };
286
624
  post: {
287
625
  "/tenants/:tenantId/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:tenantId/stripe-customer-portal", unknown, {
@@ -336,10 +674,10 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
336
674
  "/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", {
337
675
  isTest?: string | undefined;
338
676
  }, {
677
+ context: Record<string, Json>;
339
678
  script: string;
340
679
  tokenType: LogtoJwtTokenKeyType.AccessToken;
341
680
  token: Record<string, Json>;
342
- context: Record<string, Json>;
343
681
  environmentVariables?: Record<string, string> | undefined;
344
682
  } | {
345
683
  script: string;
@@ -369,52 +707,143 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
369
707
  patch: {};
370
708
  options: {};
371
709
  get: {
372
- "/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
710
+ "/skus": import("@withtyped/server").PathGuard<"/", {
711
+ type?: LogtoSkuType | undefined;
712
+ }, unknown, {
373
713
  id: string;
714
+ name: string | null;
374
715
  createdAt: Date;
375
- name: string;
716
+ defaultPriceId: string | null;
717
+ unitPrice: number | null;
718
+ type: LogtoSkuType;
719
+ quota: {
720
+ auditLogsRetentionDays?: number | null | undefined;
721
+ mauLimit?: number | null | undefined;
722
+ applicationsLimit?: number | null | undefined;
723
+ thirdPartyApplicationsLimit?: number | null | undefined;
724
+ scopesPerResourceLimit?: number | null | undefined;
725
+ socialConnectorsLimit?: number | null | undefined;
726
+ userRolesLimit?: number | null | undefined;
727
+ machineToMachineRolesLimit?: number | null | undefined;
728
+ scopesPerRoleLimit?: number | null | undefined;
729
+ hooksLimit?: number | null | undefined;
730
+ customJwtEnabled?: boolean | undefined;
731
+ subjectTokenEnabled?: boolean | undefined;
732
+ bringYourUiEnabled?: boolean | undefined;
733
+ tokenLimit?: number | null | undefined;
734
+ machineToMachineLimit?: number | null | undefined;
735
+ resourcesLimit?: number | null | undefined;
736
+ enterpriseSsoLimit?: number | null | undefined;
737
+ tenantMembersLimit?: number | null | undefined;
738
+ mfaEnabled?: boolean | undefined;
739
+ organizationsEnabled?: boolean | undefined;
740
+ organizationsLimit?: number | null | undefined;
741
+ idpInitiatedSsoEnabled?: boolean | undefined;
742
+ };
376
743
  updatedAt: Date;
744
+ productId: string | null;
745
+ }[]>;
746
+ };
747
+ post: {
748
+ "/skus": import("@withtyped/server").PathGuard<"/", unknown, {
749
+ type: LogtoSkuType.AddOn;
750
+ quota: {
751
+ tokenLimit?: number | null | undefined;
752
+ machineToMachineLimit?: number | null | undefined;
753
+ resourcesLimit?: number | null | undefined;
754
+ enterpriseSsoLimit?: number | null | undefined;
755
+ hooksLimit?: number | null | undefined;
756
+ tenantMembersLimit?: number | null | undefined;
757
+ mfaEnabled?: boolean | undefined;
758
+ organizationsEnabled?: boolean | undefined;
759
+ organizationsLimit?: number | null | undefined;
760
+ auditLogsRetentionDays?: number | null | undefined;
761
+ mauLimit?: number | null | undefined;
762
+ applicationsLimit?: number | null | undefined;
763
+ thirdPartyApplicationsLimit?: number | null | undefined;
764
+ scopesPerResourceLimit?: number | null | undefined;
765
+ socialConnectorsLimit?: number | null | undefined;
766
+ userRolesLimit?: number | null | undefined;
767
+ machineToMachineRolesLimit?: number | null | undefined;
768
+ scopesPerRoleLimit?: number | null | undefined;
769
+ customJwtEnabled?: boolean | undefined;
770
+ subjectTokenEnabled?: boolean | undefined;
771
+ bringYourUiEnabled?: boolean | undefined;
772
+ idpInitiatedSsoEnabled?: boolean | undefined;
773
+ };
774
+ } | {
775
+ type: LogtoSkuType.Basic;
377
776
  quota: {
777
+ auditLogsRetentionDays: number | null;
378
778
  mauLimit: number | null;
379
- tokenLimit: number | null;
380
779
  applicationsLimit: number | null;
381
- machineToMachineLimit: number | null;
382
- resourcesLimit: number | null;
780
+ thirdPartyApplicationsLimit: number | null;
383
781
  scopesPerResourceLimit: number | null;
384
- customDomainEnabled: boolean;
385
- omniSignInEnabled: boolean;
386
- builtInEmailConnectorEnabled: boolean;
387
782
  socialConnectorsLimit: number | null;
388
- standardConnectorsLimit: number | null;
389
- rolesLimit: number | null;
783
+ userRolesLimit: number | null;
390
784
  machineToMachineRolesLimit: number | null;
391
785
  scopesPerRoleLimit: number | null;
392
786
  hooksLimit: number | null;
393
- auditLogsRetentionDays: number | null;
787
+ customJwtEnabled: boolean;
788
+ subjectTokenEnabled: boolean;
789
+ bringYourUiEnabled: boolean;
790
+ tokenLimit: number | null;
791
+ machineToMachineLimit: number | null;
792
+ resourcesLimit: number | null;
793
+ enterpriseSsoLimit: number | null;
794
+ tenantMembersLimit: number | null;
394
795
  mfaEnabled: boolean;
395
796
  organizationsEnabled: boolean;
396
- ssoEnabled: boolean;
397
- thirdPartyApplicationsLimit: number | null;
398
- tenantMembersLimit: number | null;
399
- customJwtEnabled: boolean;
797
+ organizationsLimit: number | null;
798
+ idpInitiatedSsoEnabled: boolean;
400
799
  };
401
- stripeProducts: {
402
- type: "flat" | "tier1" | "tier2" | "tier3";
403
- id: string;
404
- name: string;
405
- price: {
406
- id: string;
407
- unitAmountDecimal: string;
408
- quantity?: 1 | undefined;
409
- unitAmount?: number | null | undefined;
410
- };
411
- description?: string | undefined;
412
- }[];
413
- }[]>;
800
+ addOnRelations: {
801
+ tokenLimit: string;
802
+ };
803
+ }, {
804
+ id: string;
805
+ createdAt: Date;
806
+ type: LogtoSkuType;
807
+ updatedAt: Date;
808
+ quota: {
809
+ auditLogsRetentionDays?: number | null | undefined;
810
+ mauLimit?: number | null | undefined;
811
+ applicationsLimit?: number | null | undefined;
812
+ thirdPartyApplicationsLimit?: number | null | undefined;
813
+ scopesPerResourceLimit?: number | null | undefined;
814
+ socialConnectorsLimit?: number | null | undefined;
815
+ userRolesLimit?: number | null | undefined;
816
+ machineToMachineRolesLimit?: number | null | undefined;
817
+ scopesPerRoleLimit?: number | null | undefined;
818
+ hooksLimit?: number | null | undefined;
819
+ customJwtEnabled?: boolean | undefined;
820
+ subjectTokenEnabled?: boolean | undefined;
821
+ bringYourUiEnabled?: boolean | undefined;
822
+ tokenLimit?: number | null | undefined;
823
+ machineToMachineLimit?: number | null | undefined;
824
+ resourcesLimit?: number | null | undefined;
825
+ enterpriseSsoLimit?: number | null | undefined;
826
+ tenantMembersLimit?: number | null | undefined;
827
+ mfaEnabled?: boolean | undefined;
828
+ organizationsEnabled?: boolean | undefined;
829
+ organizationsLimit?: number | null | undefined;
830
+ idpInitiatedSsoEnabled?: boolean | undefined;
831
+ };
832
+ }>;
833
+ } & {
834
+ "/skus/:skuId/products": import("@withtyped/server").PathGuard<"/:skuId/products", {
835
+ isOneTime?: string | undefined;
836
+ }, {
837
+ name: string;
838
+ unitPrice: number;
839
+ }, {
840
+ productId: string;
841
+ }>;
414
842
  };
415
- post: {};
416
843
  put: {};
417
- delete: {};
844
+ delete: {
845
+ "/skus/:skuId": import("@withtyped/server").PathGuard<"/:skuId", unknown, unknown, unknown>;
846
+ };
418
847
  copy: {};
419
848
  head: {};
420
849
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
@@ -428,18 +857,19 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
428
857
  status: "open" | "complete" | "expired";
429
858
  tenantId: string | null;
430
859
  updatedAt: Date;
431
- planId: string;
860
+ skuId: string | null;
861
+ planId: string | null;
432
862
  }>;
433
863
  };
434
864
  post: {
435
865
  "/checkout-session": import("@withtyped/server").PathGuard<"/", unknown, {
436
- planId: string;
437
866
  successCallbackUrl: string;
438
867
  tenantId?: string | undefined;
439
- cancelCallbackUrl?: string | undefined;
440
- tenantTag?: TenantTag | undefined;
868
+ skuId?: string | undefined;
441
869
  tenantName?: string | undefined;
870
+ tenantTag?: TenantTag | undefined;
442
871
  tenantRegionName?: RegionName | undefined;
872
+ cancelCallbackUrl?: string | undefined;
443
873
  }, {
444
874
  sessionId: string;
445
875
  redirectUri?: string | null | undefined;
@@ -623,7 +1053,7 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
623
1053
  };
624
1054
  post: {
625
1055
  "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
626
- invitee: string;
1056
+ invitee: string | string[];
627
1057
  roleName: TenantRole;
628
1058
  expiresAt?: number | undefined;
629
1059
  }, {
@@ -638,7 +1068,19 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
638
1068
  organizationId: string;
639
1069
  expiresAt: number;
640
1070
  organizationRoles: OrganizationRoleEntity[];
641
- }>;
1071
+ } | {
1072
+ id: string;
1073
+ createdAt: number;
1074
+ status: OrganizationInvitationStatus;
1075
+ tenantId: string;
1076
+ updatedAt: number;
1077
+ inviterId: string | null;
1078
+ invitee: string;
1079
+ acceptedUserId: string | null;
1080
+ organizationId: string;
1081
+ expiresAt: number;
1082
+ organizationRoles: OrganizationRoleEntity[];
1083
+ }[]>;
642
1084
  } & {
643
1085
  "/:tenantId/invitations/:invitationId/message": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/message", unknown, unknown, unknown>;
644
1086
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/cloud",
3
- "version": "0.2.5-a7eedce",
3
+ "version": "0.2.5-aac51e9",
4
4
  "description": "Logto Cloud service.",
5
5
  "main": "build/index.js",
6
6
  "author": "Silverhand Inc. <contact@silverhand.io>",
@@ -29,8 +29,8 @@
29
29
  "nodemon": "^3.0.0",
30
30
  "prettier": "^3.0.0",
31
31
  "typescript": "^5.3.3",
32
- "vite-tsconfig-paths": "^4.3.1",
33
- "vitest": "^1.5.0"
32
+ "vite-tsconfig-paths": "^5.0.0",
33
+ "vitest": "^2.1.8"
34
34
  },
35
35
  "engines": {
36
36
  "node": "^20.9.0"
@@ -49,8 +49,8 @@
49
49
  "access": "public"
50
50
  },
51
51
  "dependencies": {
52
- "@silverhand/essentials": "^2.9.1",
53
- "@withtyped/server": "^0.13.6"
52
+ "@silverhand/essentials": "^2.9.2",
53
+ "@withtyped/server": "^0.14.0"
54
54
  },
55
55
  "scripts": {
56
56
  "precommit": "lint-staged",