@logto/cloud 0.2.5-72891e6 → 0.2.5-73a3bfd

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 +407 -41
  2. package/package.json +5 -5
@@ -69,6 +69,23 @@ declare enum TenantRole {
69
69
  /** Collaborator of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
70
70
  Collaborator = "collaborator"
71
71
  }
72
+ declare const availableReportableUsageKeys: readonly [
73
+ "tokenLimit",
74
+ "machineToMachineLimit",
75
+ "resourcesLimit",
76
+ "enterpriseSsoLimit",
77
+ "hooksLimit",
78
+ "tenantMembersLimit",
79
+ "mfaEnabled",
80
+ "organizationsEnabled",
81
+ "organizationsLimit"
82
+ ];
83
+ export type ReportableUsageKey = (typeof availableReportableUsageKeys)[number];
84
+ export type RealtimeReportableUsageKey = Exclude<ReportableUsageKey, "tokenLimit">;
85
+ declare enum LogtoSkuType {
86
+ Basic = "Basic",
87
+ AddOn = "AddOn"
88
+ }
72
89
  declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
73
90
  createdAt: Date;
74
91
  affiliateId: string;
@@ -84,7 +101,8 @@ declare const Affiliates: import("@withtyped/server/lib/model/index.js").default
84
101
  export type Affiliate = InferModelType<typeof Affiliates>;
85
102
  declare enum RegionName {
86
103
  EU = "EU",
87
- US = "US"
104
+ US = "US",
105
+ AU = "AU"
88
106
  }
89
107
  export type AffiliateData = Affiliate & {
90
108
  properties: Array<Pick<AffiliateProperty, "type" | "value">>;
@@ -108,17 +126,20 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
108
126
  body?: Json | undefined;
109
127
  bodyRaw?: Buffer | undefined;
110
128
  };
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").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
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").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
112
130
  patch: {
113
131
  "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
114
132
  name?: string | undefined;
115
133
  }, {
116
134
  id: string;
117
135
  name: string;
136
+ quota: {
137
+ mauLimit: number | null;
138
+ tokenLimit: number | null;
139
+ };
118
140
  createdAt: Date;
119
141
  usage: {
120
142
  activeUsers: number;
121
- cost: number;
122
143
  tokenUsage: number;
123
144
  };
124
145
  indicator: string;
@@ -129,6 +150,15 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
129
150
  planId: string;
130
151
  currentPeriodStart: Date;
131
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
+ isAddOnAvailable?: boolean | undefined;
132
162
  };
133
163
  regionName: RegionName;
134
164
  tag: TenantTag;
@@ -154,10 +184,13 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
154
184
  "/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
155
185
  id: string;
156
186
  name: string;
187
+ quota: {
188
+ mauLimit: number | null;
189
+ tokenLimit: number | null;
190
+ };
157
191
  createdAt: Date;
158
192
  usage: {
159
193
  activeUsers: number;
160
- cost: number;
161
194
  tokenUsage: number;
162
195
  };
163
196
  indicator: string;
@@ -168,6 +201,15 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
168
201
  planId: string;
169
202
  currentPeriodStart: Date;
170
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
+ isAddOnAvailable?: boolean | undefined;
171
213
  };
172
214
  regionName: RegionName;
173
215
  tag: TenantTag;
@@ -196,10 +238,13 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
196
238
  }, {
197
239
  id: string;
198
240
  name: string;
241
+ quota: {
242
+ mauLimit: number | null;
243
+ tokenLimit: number | null;
244
+ };
199
245
  createdAt: Date;
200
246
  usage: {
201
247
  activeUsers: number;
202
- cost: number;
203
248
  tokenUsage: number;
204
249
  };
205
250
  indicator: string;
@@ -210,6 +255,15 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
210
255
  planId: string;
211
256
  currentPeriodStart: Date;
212
257
  currentPeriodEnd: Date;
258
+ isEnterprisePlan: boolean;
259
+ id?: string | undefined;
260
+ upcomingInvoice?: {
261
+ subtotal: number;
262
+ subtotalExcludingTax: number | null;
263
+ total: number;
264
+ totalExcludingTax: number | null;
265
+ } | null | undefined;
266
+ isAddOnAvailable?: boolean | undefined;
213
267
  };
214
268
  regionName: RegionName;
215
269
  tag: TenantTag;
@@ -245,6 +299,86 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
245
299
  planId: string;
246
300
  currentPeriodStart: Date;
247
301
  currentPeriodEnd: Date;
302
+ isEnterprisePlan: boolean;
303
+ id?: string | undefined;
304
+ upcomingInvoice?: {
305
+ subtotal: number;
306
+ subtotalExcludingTax: number | null;
307
+ total: number;
308
+ totalExcludingTax: number | null;
309
+ } | null | undefined;
310
+ isAddOnAvailable?: boolean | undefined;
311
+ }>;
312
+ } & {
313
+ "/tenants/my/subscription-usage": import("@withtyped/server").PathGuard<"/my/subscription-usage", unknown, unknown, {
314
+ usage: {
315
+ applicationsLimit: number;
316
+ machineToMachineLimit: number;
317
+ resourcesLimit: number;
318
+ scopesPerResourceLimit: number;
319
+ socialConnectorsLimit: number;
320
+ machineToMachineRolesLimit: number;
321
+ scopesPerRoleLimit: number;
322
+ hooksLimit: number;
323
+ mfaEnabled: boolean;
324
+ organizationsEnabled: boolean;
325
+ thirdPartyApplicationsLimit: number;
326
+ tenantMembersLimit: number;
327
+ customJwtEnabled: boolean;
328
+ subjectTokenEnabled: boolean;
329
+ bringYourUiEnabled: boolean;
330
+ userRolesLimit: number;
331
+ enterpriseSsoLimit: number;
332
+ organizationsLimit: number;
333
+ };
334
+ resources: Record<string, number>;
335
+ roles: Record<string, number>;
336
+ quota: {
337
+ mauLimit: number | null;
338
+ tokenLimit: number | null;
339
+ applicationsLimit: number | null;
340
+ machineToMachineLimit: number | null;
341
+ resourcesLimit: number | null;
342
+ scopesPerResourceLimit: number | null;
343
+ socialConnectorsLimit: number | null;
344
+ machineToMachineRolesLimit: number | null;
345
+ scopesPerRoleLimit: number | null;
346
+ hooksLimit: number | null;
347
+ auditLogsRetentionDays: number | null;
348
+ mfaEnabled: boolean;
349
+ organizationsEnabled: boolean;
350
+ thirdPartyApplicationsLimit: number | null;
351
+ tenantMembersLimit: number | null;
352
+ customJwtEnabled: boolean;
353
+ subjectTokenEnabled: boolean;
354
+ bringYourUiEnabled: boolean;
355
+ userRolesLimit: number | null;
356
+ enterpriseSsoLimit: number | null;
357
+ organizationsLimit: number | null;
358
+ };
359
+ basicQuota: {
360
+ mauLimit: number | null;
361
+ tokenLimit: number | null;
362
+ applicationsLimit: number | null;
363
+ machineToMachineLimit: number | null;
364
+ resourcesLimit: number | null;
365
+ scopesPerResourceLimit: number | null;
366
+ socialConnectorsLimit: number | null;
367
+ machineToMachineRolesLimit: number | null;
368
+ scopesPerRoleLimit: number | null;
369
+ hooksLimit: number | null;
370
+ auditLogsRetentionDays: number | null;
371
+ mfaEnabled: boolean;
372
+ organizationsEnabled: boolean;
373
+ thirdPartyApplicationsLimit: number | null;
374
+ tenantMembersLimit: number | null;
375
+ customJwtEnabled: boolean;
376
+ subjectTokenEnabled: boolean;
377
+ bringYourUiEnabled: boolean;
378
+ userRolesLimit: number | null;
379
+ enterpriseSsoLimit: number | null;
380
+ organizationsLimit: number | null;
381
+ };
248
382
  }>;
249
383
  } & {
250
384
  "/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
@@ -252,6 +386,91 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
252
386
  planId: string;
253
387
  currentPeriodStart: Date;
254
388
  currentPeriodEnd: Date;
389
+ isEnterprisePlan: boolean;
390
+ id?: string | undefined;
391
+ upcomingInvoice?: {
392
+ subtotal: number;
393
+ subtotalExcludingTax: number | null;
394
+ total: number;
395
+ totalExcludingTax: number | null;
396
+ } | null | undefined;
397
+ isAddOnAvailable?: boolean | undefined;
398
+ }>;
399
+ } & {
400
+ "/tenants/:tenantId/subscription-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription-usage", unknown, unknown, {
401
+ usage: {
402
+ applicationsLimit: number;
403
+ machineToMachineLimit: number;
404
+ resourcesLimit: number;
405
+ scopesPerResourceLimit: number;
406
+ socialConnectorsLimit: number;
407
+ machineToMachineRolesLimit: number;
408
+ scopesPerRoleLimit: number;
409
+ hooksLimit: number;
410
+ mfaEnabled: boolean;
411
+ organizationsEnabled: boolean;
412
+ thirdPartyApplicationsLimit: number;
413
+ tenantMembersLimit: number;
414
+ customJwtEnabled: boolean;
415
+ subjectTokenEnabled: boolean;
416
+ bringYourUiEnabled: boolean;
417
+ userRolesLimit: number;
418
+ enterpriseSsoLimit: number;
419
+ organizationsLimit: number;
420
+ };
421
+ resources: Record<string, number>;
422
+ roles: Record<string, number>;
423
+ quota: {
424
+ mauLimit: number | null;
425
+ tokenLimit: number | null;
426
+ applicationsLimit: number | null;
427
+ machineToMachineLimit: number | null;
428
+ resourcesLimit: number | null;
429
+ scopesPerResourceLimit: number | null;
430
+ socialConnectorsLimit: number | null;
431
+ machineToMachineRolesLimit: number | null;
432
+ scopesPerRoleLimit: number | null;
433
+ hooksLimit: number | null;
434
+ auditLogsRetentionDays: number | null;
435
+ mfaEnabled: boolean;
436
+ organizationsEnabled: boolean;
437
+ thirdPartyApplicationsLimit: number | null;
438
+ tenantMembersLimit: number | null;
439
+ customJwtEnabled: boolean;
440
+ subjectTokenEnabled: boolean;
441
+ bringYourUiEnabled: boolean;
442
+ userRolesLimit: number | null;
443
+ enterpriseSsoLimit: number | null;
444
+ organizationsLimit: number | null;
445
+ };
446
+ basicQuota: {
447
+ mauLimit: number | null;
448
+ tokenLimit: number | null;
449
+ applicationsLimit: number | null;
450
+ machineToMachineLimit: number | null;
451
+ resourcesLimit: number | null;
452
+ scopesPerResourceLimit: number | null;
453
+ socialConnectorsLimit: number | null;
454
+ machineToMachineRolesLimit: number | null;
455
+ scopesPerRoleLimit: number | null;
456
+ hooksLimit: number | null;
457
+ auditLogsRetentionDays: number | null;
458
+ mfaEnabled: boolean;
459
+ organizationsEnabled: boolean;
460
+ thirdPartyApplicationsLimit: number | null;
461
+ tenantMembersLimit: number | null;
462
+ customJwtEnabled: boolean;
463
+ subjectTokenEnabled: boolean;
464
+ bringYourUiEnabled: boolean;
465
+ userRolesLimit: number | null;
466
+ enterpriseSsoLimit: number | null;
467
+ organizationsLimit: number | null;
468
+ };
469
+ }>;
470
+ } & {
471
+ "/tenants/:tenantId/subscription/periodic-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription/periodic-usage", unknown, unknown, {
472
+ mauLimit: number;
473
+ tokenLimit: number;
255
474
  }>;
256
475
  } & {
257
476
  "/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
@@ -270,20 +489,57 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
270
489
  hostedInvoiceUrl: string | null;
271
490
  invoicePdf: string | null;
272
491
  planName: string | null;
492
+ skuId?: string | null | undefined;
273
493
  }[];
274
494
  }>;
495
+ } & {
496
+ "/tenants/:tenantId/available-skus": import("@withtyped/server").PathGuard<"/:tenantId/available-skus", {
497
+ type?: LogtoSkuType | undefined;
498
+ }, unknown, {
499
+ type: LogtoSkuType;
500
+ id: string;
501
+ name: string | null;
502
+ quota: {
503
+ mauLimit?: number | null | undefined;
504
+ tokenLimit?: number | null | undefined;
505
+ applicationsLimit?: number | null | undefined;
506
+ machineToMachineLimit?: number | null | undefined;
507
+ resourcesLimit?: number | null | undefined;
508
+ scopesPerResourceLimit?: number | null | undefined;
509
+ socialConnectorsLimit?: number | null | undefined;
510
+ machineToMachineRolesLimit?: number | null | undefined;
511
+ scopesPerRoleLimit?: number | null | undefined;
512
+ hooksLimit?: number | null | undefined;
513
+ auditLogsRetentionDays?: number | null | undefined;
514
+ mfaEnabled?: boolean | undefined;
515
+ organizationsEnabled?: boolean | undefined;
516
+ thirdPartyApplicationsLimit?: number | null | undefined;
517
+ tenantMembersLimit?: number | null | undefined;
518
+ customJwtEnabled?: boolean | undefined;
519
+ subjectTokenEnabled?: boolean | undefined;
520
+ bringYourUiEnabled?: boolean | undefined;
521
+ userRolesLimit?: number | null | undefined;
522
+ enterpriseSsoLimit?: number | null | undefined;
523
+ organizationsLimit?: number | null | undefined;
524
+ };
525
+ createdAt: Date;
526
+ updatedAt: Date;
527
+ defaultPriceId: string | null;
528
+ unitPrice: number | null;
529
+ productId: string | null;
530
+ }[]>;
275
531
  } & {
276
532
  "/tenants/:tenantId/invoices/:invoiceId/hosted-invoice-url": import("@withtyped/server").PathGuard<"/:tenantId/invoices/:invoiceId/hosted-invoice-url", unknown, unknown, {
277
533
  hostedInvoiceUrl: string;
278
534
  }>;
279
- } & {
280
- "/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
281
- activeUsers: number;
282
- cost: number;
283
- tokenUsage: number;
284
- }>;
285
535
  };
286
536
  post: {
537
+ "/tenants/my/subscription/item-updates": import("@withtyped/server").PathGuard<"/my/subscription/item-updates", unknown, {
538
+ usageKey: RealtimeReportableUsageKey;
539
+ }, {
540
+ message: string;
541
+ }>;
542
+ } & {
287
543
  "/tenants/:tenantId/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:tenantId/stripe-customer-portal", unknown, {
288
544
  callbackUrl?: string | undefined;
289
545
  }, {
@@ -336,10 +592,10 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
336
592
  "/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", {
337
593
  isTest?: string | undefined;
338
594
  }, {
595
+ context: Record<string, Json>;
339
596
  script: string;
340
597
  tokenType: LogtoJwtTokenKeyType.AccessToken;
341
598
  token: Record<string, Json>;
342
- context: Record<string, Json>;
343
599
  environmentVariables?: Record<string, string> | undefined;
344
600
  } | {
345
601
  script: string;
@@ -369,23 +625,70 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
369
625
  patch: {};
370
626
  options: {};
371
627
  get: {
372
- "/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
628
+ "/skus": import("@withtyped/server").PathGuard<"/", {
629
+ type?: LogtoSkuType | undefined;
630
+ }, unknown, {
631
+ type: LogtoSkuType;
373
632
  id: string;
633
+ name: string | null;
634
+ quota: {
635
+ mauLimit?: number | null | undefined;
636
+ tokenLimit?: number | null | undefined;
637
+ applicationsLimit?: number | null | undefined;
638
+ machineToMachineLimit?: number | null | undefined;
639
+ resourcesLimit?: number | null | undefined;
640
+ scopesPerResourceLimit?: number | null | undefined;
641
+ socialConnectorsLimit?: number | null | undefined;
642
+ machineToMachineRolesLimit?: number | null | undefined;
643
+ scopesPerRoleLimit?: number | null | undefined;
644
+ hooksLimit?: number | null | undefined;
645
+ auditLogsRetentionDays?: number | null | undefined;
646
+ mfaEnabled?: boolean | undefined;
647
+ organizationsEnabled?: boolean | undefined;
648
+ thirdPartyApplicationsLimit?: number | null | undefined;
649
+ tenantMembersLimit?: number | null | undefined;
650
+ customJwtEnabled?: boolean | undefined;
651
+ subjectTokenEnabled?: boolean | undefined;
652
+ bringYourUiEnabled?: boolean | undefined;
653
+ userRolesLimit?: number | null | undefined;
654
+ enterpriseSsoLimit?: number | null | undefined;
655
+ organizationsLimit?: number | null | undefined;
656
+ };
374
657
  createdAt: Date;
375
- name: string;
376
658
  updatedAt: Date;
377
- stripeProducts: {
378
- type: "flat" | "tier1" | "tier2" | "tier3";
379
- id: string;
380
- name: string;
381
- price: {
382
- id: string;
383
- unitAmountDecimal: string;
384
- quantity?: 1 | undefined;
385
- unitAmount?: number | null | undefined;
386
- };
387
- description?: string | undefined;
388
- }[];
659
+ defaultPriceId: string | null;
660
+ unitPrice: number | null;
661
+ productId: string | null;
662
+ }[]>;
663
+ };
664
+ post: {
665
+ "/skus": import("@withtyped/server").PathGuard<"/", unknown, {
666
+ type: LogtoSkuType.AddOn;
667
+ quota: {
668
+ tokenLimit?: number | null | undefined;
669
+ machineToMachineLimit?: number | null | undefined;
670
+ resourcesLimit?: number | null | undefined;
671
+ enterpriseSsoLimit?: number | null | undefined;
672
+ hooksLimit?: number | null | undefined;
673
+ tenantMembersLimit?: number | null | undefined;
674
+ mfaEnabled?: boolean | undefined;
675
+ organizationsEnabled?: boolean | undefined;
676
+ organizationsLimit?: number | null | undefined;
677
+ mauLimit?: number | null | undefined;
678
+ applicationsLimit?: number | null | undefined;
679
+ scopesPerResourceLimit?: number | null | undefined;
680
+ socialConnectorsLimit?: number | null | undefined;
681
+ machineToMachineRolesLimit?: number | null | undefined;
682
+ scopesPerRoleLimit?: number | null | undefined;
683
+ auditLogsRetentionDays?: number | null | undefined;
684
+ thirdPartyApplicationsLimit?: number | null | undefined;
685
+ customJwtEnabled?: boolean | undefined;
686
+ subjectTokenEnabled?: boolean | undefined;
687
+ bringYourUiEnabled?: boolean | undefined;
688
+ userRolesLimit?: number | null | undefined;
689
+ };
690
+ } | {
691
+ type: LogtoSkuType.Basic;
389
692
  quota: {
390
693
  mauLimit: number | null;
391
694
  tokenLimit: number | null;
@@ -393,28 +696,65 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
393
696
  machineToMachineLimit: number | null;
394
697
  resourcesLimit: number | null;
395
698
  scopesPerResourceLimit: number | null;
396
- customDomainEnabled: boolean;
397
- omniSignInEnabled: boolean;
398
- builtInEmailConnectorEnabled: boolean;
399
699
  socialConnectorsLimit: number | null;
400
- standardConnectorsLimit: number | null;
401
- rolesLimit: number | null;
402
700
  machineToMachineRolesLimit: number | null;
403
701
  scopesPerRoleLimit: number | null;
404
702
  hooksLimit: number | null;
405
703
  auditLogsRetentionDays: number | null;
406
704
  mfaEnabled: boolean;
407
705
  organizationsEnabled: boolean;
408
- ssoEnabled: boolean;
409
706
  thirdPartyApplicationsLimit: number | null;
410
707
  tenantMembersLimit: number | null;
411
708
  customJwtEnabled: boolean;
709
+ subjectTokenEnabled: boolean;
710
+ bringYourUiEnabled: boolean;
711
+ userRolesLimit: number | null;
712
+ enterpriseSsoLimit: number | null;
713
+ organizationsLimit: number | null;
412
714
  };
413
- }[]>;
715
+ }, {
716
+ id: string;
717
+ createdAt: Date;
718
+ type: LogtoSkuType;
719
+ updatedAt: Date;
720
+ quota: {
721
+ mauLimit?: number | null | undefined;
722
+ tokenLimit?: number | null | undefined;
723
+ applicationsLimit?: number | null | undefined;
724
+ machineToMachineLimit?: number | null | undefined;
725
+ resourcesLimit?: number | null | undefined;
726
+ scopesPerResourceLimit?: number | null | undefined;
727
+ socialConnectorsLimit?: number | null | undefined;
728
+ machineToMachineRolesLimit?: number | null | undefined;
729
+ scopesPerRoleLimit?: number | null | undefined;
730
+ hooksLimit?: number | null | undefined;
731
+ auditLogsRetentionDays?: number | null | undefined;
732
+ mfaEnabled?: boolean | undefined;
733
+ organizationsEnabled?: boolean | undefined;
734
+ thirdPartyApplicationsLimit?: number | null | undefined;
735
+ tenantMembersLimit?: number | null | undefined;
736
+ customJwtEnabled?: boolean | undefined;
737
+ subjectTokenEnabled?: boolean | undefined;
738
+ bringYourUiEnabled?: boolean | undefined;
739
+ userRolesLimit?: number | null | undefined;
740
+ enterpriseSsoLimit?: number | null | undefined;
741
+ organizationsLimit?: number | null | undefined;
742
+ };
743
+ }>;
744
+ } & {
745
+ "/skus/:skuId/products": import("@withtyped/server").PathGuard<"/:skuId/products", {
746
+ isOneTime?: string | undefined;
747
+ }, {
748
+ name: string;
749
+ unitPrice: number;
750
+ }, {
751
+ productId: string;
752
+ }>;
414
753
  };
415
- post: {};
416
754
  put: {};
417
- delete: {};
755
+ delete: {
756
+ "/skus/:skuId": import("@withtyped/server").PathGuard<"/:skuId", unknown, unknown, unknown>;
757
+ };
418
758
  copy: {};
419
759
  head: {};
420
760
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
@@ -428,17 +768,20 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
428
768
  status: "open" | "complete" | "expired";
429
769
  tenantId: string | null;
430
770
  updatedAt: Date;
431
- planId: string;
771
+ planId: string | null;
772
+ skuId: string | null;
432
773
  }>;
433
774
  };
434
775
  post: {
435
776
  "/checkout-session": import("@withtyped/server").PathGuard<"/", unknown, {
436
- planId: string;
437
777
  successCallbackUrl: string;
438
778
  tenantId?: string | undefined;
439
- cancelCallbackUrl?: string | undefined;
440
- tenantTag?: TenantTag | undefined;
779
+ planId?: string | undefined;
780
+ skuId?: string | undefined;
441
781
  tenantName?: string | undefined;
782
+ tenantTag?: TenantTag | undefined;
783
+ tenantRegionName?: RegionName | undefined;
784
+ cancelCallbackUrl?: string | undefined;
442
785
  }, {
443
786
  sessionId: string;
444
787
  redirectUri?: string | null | undefined;
@@ -552,6 +895,17 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
552
895
  delete: {};
553
896
  copy: {};
554
897
  head: {};
898
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
899
+ patch: {};
900
+ options: {};
901
+ get: {};
902
+ post: {};
903
+ put: {};
904
+ delete: {
905
+ "/me": import("@withtyped/server").PathGuard<"/", unknown, unknown, unknown>;
906
+ };
907
+ copy: {};
908
+ head: {};
555
909
  }, "/api">>, "/api">;
556
910
  export declare const tenantAuthRouter: import("@withtyped/server").Router<RequestContext, import("@withtyped/server").WithBodyContext<import("@withtyped/server").BaseContext & {
557
911
  request: {
@@ -611,7 +965,7 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
611
965
  };
612
966
  post: {
613
967
  "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
614
- invitee: string;
968
+ invitee: string | string[];
615
969
  roleName: TenantRole;
616
970
  expiresAt?: number | undefined;
617
971
  }, {
@@ -626,7 +980,19 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
626
980
  organizationId: string;
627
981
  expiresAt: number;
628
982
  organizationRoles: OrganizationRoleEntity[];
629
- }>;
983
+ } | {
984
+ id: string;
985
+ createdAt: number;
986
+ status: OrganizationInvitationStatus;
987
+ tenantId: string;
988
+ updatedAt: number;
989
+ inviterId: string | null;
990
+ invitee: string;
991
+ acceptedUserId: string | null;
992
+ organizationId: string;
993
+ expiresAt: number;
994
+ organizationRoles: OrganizationRoleEntity[];
995
+ }[]>;
630
996
  } & {
631
997
  "/:tenantId/invitations/:invitationId/message": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/message", unknown, unknown, unknown>;
632
998
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/cloud",
3
- "version": "0.2.5-72891e6",
3
+ "version": "0.2.5-73a3bfd",
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.0.0"
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.0",
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",