@logto/cloud 0.2.5-38aae44 → 0.2.5-3b703da

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 +179 -16
  2. package/package.json +3 -3
@@ -69,6 +69,10 @@ 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 enum LogtoSkuType {
73
+ Basic = "Basic",
74
+ AddOn = "AddOn"
75
+ }
72
76
  declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
73
77
  createdAt: Date;
74
78
  affiliateId: string;
@@ -108,7 +112,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
108
112
  body?: Json | undefined;
109
113
  bodyRaw?: Buffer | undefined;
110
114
  };
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<{
115
+ }>, 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
116
  patch: {
113
117
  "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
114
118
  name?: string | undefined;
@@ -129,6 +133,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
129
133
  planId: string;
130
134
  currentPeriodStart: Date;
131
135
  currentPeriodEnd: Date;
136
+ id?: string | undefined;
132
137
  };
133
138
  regionName: RegionName;
134
139
  tag: TenantTag;
@@ -168,6 +173,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
168
173
  planId: string;
169
174
  currentPeriodStart: Date;
170
175
  currentPeriodEnd: Date;
176
+ id?: string | undefined;
171
177
  };
172
178
  regionName: RegionName;
173
179
  tag: TenantTag;
@@ -210,6 +216,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
210
216
  planId: string;
211
217
  currentPeriodStart: Date;
212
218
  currentPeriodEnd: Date;
219
+ id?: string | undefined;
213
220
  };
214
221
  regionName: RegionName;
215
222
  tag: TenantTag;
@@ -245,14 +252,114 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
245
252
  planId: string;
246
253
  currentPeriodStart: Date;
247
254
  currentPeriodEnd: Date;
255
+ id?: string | undefined;
256
+ }>;
257
+ } & {
258
+ "/tenants/my/subscription/quota": import("@withtyped/server").PathGuard<"/my/subscription/quota", unknown, unknown, {
259
+ mauLimit: number | null;
260
+ tokenLimit: number | null;
261
+ applicationsLimit: number | null;
262
+ machineToMachineLimit: number | null;
263
+ resourcesLimit: number | null;
264
+ scopesPerResourceLimit: number | null;
265
+ socialConnectorsLimit: number | null;
266
+ machineToMachineRolesLimit: number | null;
267
+ scopesPerRoleLimit: number | null;
268
+ hooksLimit: number | null;
269
+ auditLogsRetentionDays: number | null;
270
+ mfaEnabled: boolean;
271
+ organizationsEnabled: boolean;
272
+ thirdPartyApplicationsLimit: number | null;
273
+ tenantMembersLimit: number | null;
274
+ customJwtEnabled: boolean;
275
+ subjectTokenEnabled: boolean;
276
+ bringYourUiEnabled: boolean;
277
+ userRolesLimit: number | null;
278
+ enterpriseSsoLimit: number | null;
279
+ }>;
280
+ } & {
281
+ "/tenants/my/subscription/usage": import("@withtyped/server").PathGuard<"/my/subscription/usage", unknown, unknown, {
282
+ mauLimit: number;
283
+ tokenLimit: number;
284
+ applicationsLimit: number;
285
+ machineToMachineLimit: number;
286
+ resourcesLimit: number;
287
+ scopesPerResourceLimit: number;
288
+ socialConnectorsLimit: number;
289
+ machineToMachineRolesLimit: number;
290
+ scopesPerRoleLimit: number;
291
+ hooksLimit: number;
292
+ mfaEnabled: boolean;
293
+ organizationsEnabled: boolean;
294
+ thirdPartyApplicationsLimit: number;
295
+ tenantMembersLimit: number;
296
+ customJwtEnabled: boolean;
297
+ subjectTokenEnabled: boolean;
298
+ bringYourUiEnabled: boolean;
299
+ userRolesLimit: number;
300
+ enterpriseSsoLimit: number;
248
301
  }>;
302
+ } & {
303
+ "/tenants/my/subscription/usage/:entityName/scopes": import("@withtyped/server").PathGuard<"/my/subscription/usage/:entityName/scopes", {
304
+ entityId?: string | undefined;
305
+ }, unknown, Record<string, number>>;
249
306
  } & {
250
307
  "/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
251
308
  status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
252
309
  planId: string;
253
310
  currentPeriodStart: Date;
254
311
  currentPeriodEnd: Date;
312
+ id?: string | undefined;
313
+ }>;
314
+ } & {
315
+ "/tenants/:tenantId/subscription/quota": import("@withtyped/server").PathGuard<"/:tenantId/subscription/quota", unknown, unknown, {
316
+ mauLimit: number | null;
317
+ tokenLimit: number | null;
318
+ applicationsLimit: number | null;
319
+ machineToMachineLimit: number | null;
320
+ resourcesLimit: number | null;
321
+ scopesPerResourceLimit: number | null;
322
+ socialConnectorsLimit: number | null;
323
+ machineToMachineRolesLimit: number | null;
324
+ scopesPerRoleLimit: number | null;
325
+ hooksLimit: number | null;
326
+ auditLogsRetentionDays: number | null;
327
+ mfaEnabled: boolean;
328
+ organizationsEnabled: boolean;
329
+ thirdPartyApplicationsLimit: number | null;
330
+ tenantMembersLimit: number | null;
331
+ customJwtEnabled: boolean;
332
+ subjectTokenEnabled: boolean;
333
+ bringYourUiEnabled: boolean;
334
+ userRolesLimit: number | null;
335
+ enterpriseSsoLimit: number | null;
336
+ }>;
337
+ } & {
338
+ "/tenants/:tenantId/subscription/usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription/usage", unknown, unknown, {
339
+ mauLimit: number;
340
+ tokenLimit: number;
341
+ applicationsLimit: number;
342
+ machineToMachineLimit: number;
343
+ resourcesLimit: number;
344
+ scopesPerResourceLimit: number;
345
+ socialConnectorsLimit: number;
346
+ machineToMachineRolesLimit: number;
347
+ scopesPerRoleLimit: number;
348
+ hooksLimit: number;
349
+ mfaEnabled: boolean;
350
+ organizationsEnabled: boolean;
351
+ thirdPartyApplicationsLimit: number;
352
+ tenantMembersLimit: number;
353
+ customJwtEnabled: boolean;
354
+ subjectTokenEnabled: boolean;
355
+ bringYourUiEnabled: boolean;
356
+ userRolesLimit: number;
357
+ enterpriseSsoLimit: number;
255
358
  }>;
359
+ } & {
360
+ "/tenants/:tenantId/subscription/usage/:entityName/scopes": import("@withtyped/server").PathGuard<"/:tenantId/subscription/usage/:entityName/scopes", {
361
+ entityId?: string | undefined;
362
+ }, unknown, Record<string, number>>;
256
363
  } & {
257
364
  "/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
258
365
  invoices: {
@@ -336,10 +443,10 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
336
443
  "/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", {
337
444
  isTest?: string | undefined;
338
445
  }, {
446
+ context: Record<string, Json>;
339
447
  script: string;
340
448
  tokenType: LogtoJwtTokenKeyType.AccessToken;
341
449
  token: Record<string, Json>;
342
- context: Record<string, Json>;
343
450
  environmentVariables?: Record<string, string> | undefined;
344
451
  } | {
345
452
  script: string;
@@ -374,18 +481,6 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
374
481
  createdAt: Date;
375
482
  name: string;
376
483
  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
- }[];
389
484
  quota: {
390
485
  mauLimit: number | null;
391
486
  tokenLimit: number | null;
@@ -409,7 +504,63 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
409
504
  thirdPartyApplicationsLimit: number | null;
410
505
  tenantMembersLimit: number | null;
411
506
  customJwtEnabled: boolean;
507
+ subjectTokenEnabled: boolean;
508
+ bringYourUiEnabled: boolean;
412
509
  };
510
+ stripeProducts: {
511
+ type: "flat" | "tier1" | "tier2" | "tier3";
512
+ id: string;
513
+ name: string;
514
+ price: {
515
+ id: string;
516
+ unitAmountDecimal: string;
517
+ quantity?: 1 | undefined;
518
+ unitAmount?: number | null | undefined;
519
+ };
520
+ description?: string | undefined;
521
+ }[];
522
+ }[]>;
523
+ };
524
+ post: {};
525
+ put: {};
526
+ delete: {};
527
+ copy: {};
528
+ head: {};
529
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
530
+ patch: {};
531
+ options: {};
532
+ get: {
533
+ "/skus": import("@withtyped/server").PathGuard<"/", {
534
+ type?: LogtoSkuType | undefined;
535
+ }, unknown, {
536
+ type: LogtoSkuType;
537
+ id: string;
538
+ name: string | null;
539
+ quota: {
540
+ mauLimit?: number | null | undefined;
541
+ tokenLimit?: number | null | undefined;
542
+ applicationsLimit?: number | null | undefined;
543
+ machineToMachineLimit?: number | null | undefined;
544
+ resourcesLimit?: number | null | undefined;
545
+ scopesPerResourceLimit?: number | null | undefined;
546
+ socialConnectorsLimit?: number | null | undefined;
547
+ machineToMachineRolesLimit?: number | null | undefined;
548
+ scopesPerRoleLimit?: number | null | undefined;
549
+ hooksLimit?: number | null | undefined;
550
+ auditLogsRetentionDays?: number | null | undefined;
551
+ mfaEnabled?: boolean | undefined;
552
+ organizationsEnabled?: boolean | undefined;
553
+ thirdPartyApplicationsLimit?: number | null | undefined;
554
+ tenantMembersLimit?: number | null | undefined;
555
+ customJwtEnabled?: boolean | undefined;
556
+ subjectTokenEnabled?: boolean | undefined;
557
+ bringYourUiEnabled?: boolean | undefined;
558
+ userRolesLimit?: number | null | undefined;
559
+ enterpriseSsoLimit?: number | null | undefined;
560
+ };
561
+ createdAt: Date;
562
+ updatedAt: Date;
563
+ unitPrice: number | null;
413
564
  }[]>;
414
565
  };
415
566
  post: {};
@@ -436,10 +587,11 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
436
587
  planId: string;
437
588
  successCallbackUrl: string;
438
589
  tenantId?: string | undefined;
439
- cancelCallbackUrl?: string | undefined;
440
- tenantTag?: TenantTag | undefined;
441
590
  tenantName?: string | undefined;
591
+ tenantTag?: TenantTag | undefined;
442
592
  tenantRegionName?: RegionName | undefined;
593
+ skuId?: string | undefined;
594
+ cancelCallbackUrl?: string | undefined;
443
595
  }, {
444
596
  sessionId: string;
445
597
  redirectUri?: string | null | undefined;
@@ -553,6 +705,17 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
553
705
  delete: {};
554
706
  copy: {};
555
707
  head: {};
708
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
709
+ patch: {};
710
+ options: {};
711
+ get: {};
712
+ post: {};
713
+ put: {};
714
+ delete: {
715
+ "/me": import("@withtyped/server").PathGuard<"/", unknown, unknown, unknown>;
716
+ };
717
+ copy: {};
718
+ head: {};
556
719
  }, "/api">>, "/api">;
557
720
  export declare const tenantAuthRouter: import("@withtyped/server").Router<RequestContext, import("@withtyped/server").WithBodyContext<import("@withtyped/server").BaseContext & {
558
721
  request: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/cloud",
3
- "version": "0.2.5-38aae44",
3
+ "version": "0.2.5-3b703da",
4
4
  "description": "Logto Cloud service.",
5
5
  "main": "build/index.js",
6
6
  "author": "Silverhand Inc. <contact@silverhand.io>",
@@ -30,7 +30,7 @@
30
30
  "prettier": "^3.0.0",
31
31
  "typescript": "^5.3.3",
32
32
  "vite-tsconfig-paths": "^4.3.1",
33
- "vitest": "^1.5.0"
33
+ "vitest": "^2.0.0"
34
34
  },
35
35
  "engines": {
36
36
  "node": "^20.9.0"
@@ -49,7 +49,7 @@
49
49
  "access": "public"
50
50
  },
51
51
  "dependencies": {
52
- "@silverhand/essentials": "^2.9.0",
52
+ "@silverhand/essentials": "^2.9.1",
53
53
  "@withtyped/server": "^0.13.6"
54
54
  },
55
55
  "scripts": {