@logto/cloud 0.2.5-50ff8fe → 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.
Files changed (2) hide show
  1. package/lib/routes/index.d.ts +146 -16
  2. package/package.json +2 -2
@@ -69,6 +69,18 @@ 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
+ ];
82
+ export type ReportableUsageKey = (typeof availableReportableUsageKeys)[number];
83
+ export type RealtimeReportableUsageKey = Exclude<ReportableUsageKey, "tokenLimit">;
72
84
  declare enum LogtoSkuType {
73
85
  Basic = "Basic",
74
86
  AddOn = "AddOn"
@@ -119,10 +131,13 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
119
131
  }, {
120
132
  id: string;
121
133
  name: string;
134
+ quota: {
135
+ mauLimit: number | null;
136
+ tokenLimit: number | null;
137
+ };
122
138
  createdAt: Date;
123
139
  usage: {
124
140
  activeUsers: number;
125
- cost: number;
126
141
  tokenUsage: number;
127
142
  };
128
143
  indicator: string;
@@ -140,6 +155,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
140
155
  total: number;
141
156
  totalExcludingTax: number | null;
142
157
  } | null | undefined;
158
+ isAddOnAvailable?: boolean | undefined;
143
159
  };
144
160
  regionName: RegionName;
145
161
  tag: TenantTag;
@@ -165,10 +181,13 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
165
181
  "/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
166
182
  id: string;
167
183
  name: string;
184
+ quota: {
185
+ mauLimit: number | null;
186
+ tokenLimit: number | null;
187
+ };
168
188
  createdAt: Date;
169
189
  usage: {
170
190
  activeUsers: number;
171
- cost: number;
172
191
  tokenUsage: number;
173
192
  };
174
193
  indicator: string;
@@ -186,6 +205,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
186
205
  total: number;
187
206
  totalExcludingTax: number | null;
188
207
  } | null | undefined;
208
+ isAddOnAvailable?: boolean | undefined;
189
209
  };
190
210
  regionName: RegionName;
191
211
  tag: TenantTag;
@@ -214,10 +234,13 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
214
234
  }, {
215
235
  id: string;
216
236
  name: string;
237
+ quota: {
238
+ mauLimit: number | null;
239
+ tokenLimit: number | null;
240
+ };
217
241
  createdAt: Date;
218
242
  usage: {
219
243
  activeUsers: number;
220
- cost: number;
221
244
  tokenUsage: number;
222
245
  };
223
246
  indicator: string;
@@ -235,6 +258,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
235
258
  total: number;
236
259
  totalExcludingTax: number | null;
237
260
  } | null | undefined;
261
+ isAddOnAvailable?: boolean | undefined;
238
262
  };
239
263
  regionName: RegionName;
240
264
  tag: TenantTag;
@@ -277,6 +301,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
277
301
  total: number;
278
302
  totalExcludingTax: number | null;
279
303
  } | null | undefined;
304
+ isAddOnAvailable?: boolean | undefined;
280
305
  }>;
281
306
  } & {
282
307
  "/tenants/my/subscription/quota": import("@withtyped/server").PathGuard<"/my/subscription/quota", unknown, unknown, {
@@ -303,8 +328,6 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
303
328
  }>;
304
329
  } & {
305
330
  "/tenants/my/subscription/usage": import("@withtyped/server").PathGuard<"/my/subscription/usage", unknown, unknown, {
306
- mauLimit: number;
307
- tokenLimit: number;
308
331
  applicationsLimit: number;
309
332
  machineToMachineLimit: number;
310
333
  resourcesLimit: number;
@@ -327,6 +350,57 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
327
350
  "/tenants/my/subscription/usage/:entityName/scopes": import("@withtyped/server").PathGuard<"/my/subscription/usage/:entityName/scopes", {
328
351
  entityId?: string | undefined;
329
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
+ }>;
330
404
  } & {
331
405
  "/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
332
406
  status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
@@ -340,6 +414,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
340
414
  total: number;
341
415
  totalExcludingTax: number | null;
342
416
  } | null | undefined;
417
+ isAddOnAvailable?: boolean | undefined;
343
418
  }>;
344
419
  } & {
345
420
  "/tenants/:tenantId/subscription/quota": import("@withtyped/server").PathGuard<"/:tenantId/subscription/quota", unknown, unknown, {
@@ -366,8 +441,6 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
366
441
  }>;
367
442
  } & {
368
443
  "/tenants/:tenantId/subscription/usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription/usage", unknown, unknown, {
369
- mauLimit: number;
370
- tokenLimit: number;
371
444
  applicationsLimit: number;
372
445
  machineToMachineLimit: number;
373
446
  resourcesLimit: number;
@@ -390,6 +463,57 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
390
463
  "/tenants/:tenantId/subscription/usage/:entityName/scopes": import("@withtyped/server").PathGuard<"/:tenantId/subscription/usage/:entityName/scopes", {
391
464
  entityId?: string | undefined;
392
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
+ }>;
393
517
  } & {
394
518
  "/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
395
519
  invoices: {
@@ -414,16 +538,10 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
414
538
  "/tenants/:tenantId/invoices/:invoiceId/hosted-invoice-url": import("@withtyped/server").PathGuard<"/:tenantId/invoices/:invoiceId/hosted-invoice-url", unknown, unknown, {
415
539
  hostedInvoiceUrl: string;
416
540
  }>;
417
- } & {
418
- "/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
419
- activeUsers: number;
420
- cost: number;
421
- tokenUsage: number;
422
- }>;
423
541
  };
424
542
  post: {
425
543
  "/tenants/my/subscription/item-updates": import("@withtyped/server").PathGuard<"/my/subscription/item-updates", unknown, {
426
- usageKey: "tokenLimit" | "machineToMachineLimit" | "resourcesLimit" | "enterpriseSsoLimit" | "tenantMembersLimit" | "mfaEnabled" | "organizationsEnabled";
544
+ usageKey: RealtimeReportableUsageKey;
427
545
  }, {
428
546
  message: string;
429
547
  }>;
@@ -813,7 +931,7 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
813
931
  };
814
932
  post: {
815
933
  "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
816
- invitee: string;
934
+ invitee: string | string[];
817
935
  roleName: TenantRole;
818
936
  expiresAt?: number | undefined;
819
937
  }, {
@@ -828,7 +946,19 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
828
946
  organizationId: string;
829
947
  expiresAt: number;
830
948
  organizationRoles: OrganizationRoleEntity[];
831
- }>;
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
+ }[]>;
832
962
  } & {
833
963
  "/:tenantId/invitations/:invitationId/message": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/message", unknown, unknown, unknown>;
834
964
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/cloud",
3
- "version": "0.2.5-50ff8fe",
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>",
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "@silverhand/essentials": "^2.9.1",
53
- "@withtyped/server": "^0.13.6"
53
+ "@withtyped/server": "^0.14.0"
54
54
  },
55
55
  "scripts": {
56
56
  "precommit": "lint-staged",