@logto/cloud 0.2.5-94f7bcc → 0.2.5-9a1b047

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 +391 -38
  2. package/package.json +7 -7
@@ -37,6 +37,16 @@ declare enum OrganizationInvitationStatus {
37
37
  Expired = "Expired",
38
38
  Revoked = "Revoked"
39
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
+ };
40
50
  declare enum LogtoJwtTokenKeyType {
41
51
  AccessToken = "access-token",
42
52
  ClientCredentials = "client-credentials"
@@ -59,6 +69,10 @@ declare enum TenantRole {
59
69
  /** Collaborator of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
60
70
  Collaborator = "collaborator"
61
71
  }
72
+ declare enum LogtoSkuType {
73
+ Basic = "Basic",
74
+ AddOn = "AddOn"
75
+ }
62
76
  declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
63
77
  createdAt: Date;
64
78
  affiliateId: string;
@@ -72,11 +86,16 @@ declare const Affiliates: import("@withtyped/server/lib/model/index.js").default
72
86
  id: string;
73
87
  }, "id" | "createdAt", "id" | "createdAt">;
74
88
  export type Affiliate = InferModelType<typeof Affiliates>;
89
+ declare enum RegionName {
90
+ EU = "EU",
91
+ US = "US"
92
+ }
75
93
  export type AffiliateData = Affiliate & {
76
94
  properties: Array<Pick<AffiliateProperty, "type" | "value">>;
77
95
  };
78
96
  declare const router: import("@withtyped/server").Router<RequestContext, WithAuthContext<Omit<import("@withtyped/server").BaseContext & {
79
97
  request: {
98
+ id?: string | undefined;
80
99
  method?: import("@withtyped/server").RequestMethod | undefined;
81
100
  headers: import("http").IncomingHttpHeaders;
82
101
  url: URL;
@@ -84,6 +103,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
84
103
  };
85
104
  }, "request"> & {
86
105
  request: Record<string, unknown> & {
106
+ id?: string | undefined;
87
107
  method?: import("@withtyped/server").RequestMethod | undefined;
88
108
  headers: import("http").IncomingHttpHeaders;
89
109
  url: URL;
@@ -92,16 +112,20 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
92
112
  body?: Json | undefined;
93
113
  bodyRaw?: Buffer | undefined;
94
114
  };
95
- }>, 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<{
96
116
  patch: {
97
117
  "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
98
118
  name?: string | undefined;
99
119
  }, {
100
120
  id: string;
101
121
  name: string;
122
+ quota: {
123
+ mauLimit: number | null;
124
+ tokenLimit: number | null;
125
+ };
126
+ createdAt: Date;
102
127
  usage: {
103
128
  activeUsers: number;
104
- cost: number;
105
129
  tokenUsage: number;
106
130
  };
107
131
  indicator: string;
@@ -112,7 +136,18 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
112
136
  planId: string;
113
137
  currentPeriodStart: Date;
114
138
  currentPeriodEnd: Date;
139
+ id?: string | undefined;
140
+ upcomingInvoice?: {
141
+ subtotal: number;
142
+ subtotalExcludingTax: number | null;
143
+ total: number;
144
+ totalExcludingTax: number | null;
145
+ } | null | undefined;
146
+ isAddOnAvailable?: boolean | undefined;
147
+ isAddOnVisibleToLegacyUsers?: boolean | undefined;
115
148
  };
149
+ regionName: RegionName;
150
+ tag: TenantTag;
116
151
  openInvoices: {
117
152
  status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
118
153
  id: string;
@@ -128,7 +163,6 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
128
163
  hostedInvoiceUrl: string | null;
129
164
  invoicePdf: string | null;
130
165
  }[];
131
- tag: TenantTag;
132
166
  }>;
133
167
  };
134
168
  options: {};
@@ -136,9 +170,13 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
136
170
  "/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
137
171
  id: string;
138
172
  name: string;
173
+ quota: {
174
+ mauLimit: number | null;
175
+ tokenLimit: number | null;
176
+ };
177
+ createdAt: Date;
139
178
  usage: {
140
179
  activeUsers: number;
141
- cost: number;
142
180
  tokenUsage: number;
143
181
  };
144
182
  indicator: string;
@@ -149,7 +187,18 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
149
187
  planId: string;
150
188
  currentPeriodStart: Date;
151
189
  currentPeriodEnd: Date;
190
+ id?: string | undefined;
191
+ upcomingInvoice?: {
192
+ subtotal: number;
193
+ subtotalExcludingTax: number | null;
194
+ total: number;
195
+ totalExcludingTax: number | null;
196
+ } | null | undefined;
197
+ isAddOnAvailable?: boolean | undefined;
198
+ isAddOnVisibleToLegacyUsers?: boolean | undefined;
152
199
  };
200
+ regionName: RegionName;
201
+ tag: TenantTag;
153
202
  openInvoices: {
154
203
  status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
155
204
  id: string;
@@ -165,19 +214,23 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
165
214
  hostedInvoiceUrl: string | null;
166
215
  invoicePdf: string | null;
167
216
  }[];
168
- tag: TenantTag;
169
217
  }[]>;
170
218
  };
171
219
  post: {
172
220
  "/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
173
221
  name?: string | undefined;
174
222
  tag?: TenantTag | undefined;
223
+ regionName?: RegionName | undefined;
175
224
  }, {
176
225
  id: string;
177
226
  name: string;
227
+ quota: {
228
+ mauLimit: number | null;
229
+ tokenLimit: number | null;
230
+ };
231
+ createdAt: Date;
178
232
  usage: {
179
233
  activeUsers: number;
180
- cost: number;
181
234
  tokenUsage: number;
182
235
  };
183
236
  indicator: string;
@@ -188,7 +241,18 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
188
241
  planId: string;
189
242
  currentPeriodStart: Date;
190
243
  currentPeriodEnd: Date;
244
+ id?: string | undefined;
245
+ upcomingInvoice?: {
246
+ subtotal: number;
247
+ subtotalExcludingTax: number | null;
248
+ total: number;
249
+ totalExcludingTax: number | null;
250
+ } | null | undefined;
251
+ isAddOnAvailable?: boolean | undefined;
252
+ isAddOnVisibleToLegacyUsers?: boolean | undefined;
191
253
  };
254
+ regionName: RegionName;
255
+ tag: TenantTag;
192
256
  openInvoices: {
193
257
  status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
194
258
  id: string;
@@ -204,7 +268,6 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
204
268
  hostedInvoiceUrl: string | null;
205
269
  invoicePdf: string | null;
206
270
  }[];
207
- tag: TenantTag;
208
271
  }>;
209
272
  };
210
273
  put: {};
@@ -222,6 +285,113 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
222
285
  planId: string;
223
286
  currentPeriodStart: Date;
224
287
  currentPeriodEnd: Date;
288
+ id?: string | undefined;
289
+ upcomingInvoice?: {
290
+ subtotal: number;
291
+ subtotalExcludingTax: number | null;
292
+ total: number;
293
+ totalExcludingTax: number | null;
294
+ } | null | undefined;
295
+ isAddOnAvailable?: boolean | undefined;
296
+ isAddOnVisibleToLegacyUsers?: boolean | undefined;
297
+ }>;
298
+ } & {
299
+ "/tenants/my/subscription/quota": import("@withtyped/server").PathGuard<"/my/subscription/quota", unknown, unknown, {
300
+ mauLimit: number | null;
301
+ tokenLimit: number | null;
302
+ applicationsLimit: number | null;
303
+ machineToMachineLimit: number | null;
304
+ resourcesLimit: number | null;
305
+ scopesPerResourceLimit: number | null;
306
+ socialConnectorsLimit: number | null;
307
+ machineToMachineRolesLimit: number | null;
308
+ scopesPerRoleLimit: number | null;
309
+ hooksLimit: number | null;
310
+ auditLogsRetentionDays: number | null;
311
+ mfaEnabled: boolean;
312
+ organizationsEnabled: boolean;
313
+ thirdPartyApplicationsLimit: number | null;
314
+ tenantMembersLimit: number | null;
315
+ customJwtEnabled: boolean;
316
+ subjectTokenEnabled: boolean;
317
+ bringYourUiEnabled: boolean;
318
+ userRolesLimit: number | null;
319
+ enterpriseSsoLimit: number | null;
320
+ }>;
321
+ } & {
322
+ "/tenants/my/subscription/usage": import("@withtyped/server").PathGuard<"/my/subscription/usage", unknown, unknown, {
323
+ applicationsLimit: number;
324
+ machineToMachineLimit: number;
325
+ resourcesLimit: number;
326
+ scopesPerResourceLimit: number;
327
+ socialConnectorsLimit: number;
328
+ machineToMachineRolesLimit: number;
329
+ scopesPerRoleLimit: number;
330
+ hooksLimit: number;
331
+ mfaEnabled: boolean;
332
+ organizationsEnabled: boolean;
333
+ thirdPartyApplicationsLimit: number;
334
+ tenantMembersLimit: number;
335
+ customJwtEnabled: boolean;
336
+ subjectTokenEnabled: boolean;
337
+ bringYourUiEnabled: boolean;
338
+ userRolesLimit: number;
339
+ enterpriseSsoLimit: number;
340
+ }>;
341
+ } & {
342
+ "/tenants/my/subscription/usage/:entityName/scopes": import("@withtyped/server").PathGuard<"/my/subscription/usage/:entityName/scopes", {
343
+ entityId?: string | undefined;
344
+ }, unknown, Record<string, number>>;
345
+ } & {
346
+ "/tenants/my/subscription-usage": import("@withtyped/server").PathGuard<"/my/subscription-usage", unknown, unknown, {
347
+ usage: {
348
+ applicationsLimit: number;
349
+ machineToMachineLimit: number;
350
+ resourcesLimit: number;
351
+ scopesPerResourceLimit: number;
352
+ socialConnectorsLimit: number;
353
+ machineToMachineRolesLimit: number;
354
+ scopesPerRoleLimit: number;
355
+ hooksLimit: number;
356
+ mfaEnabled: boolean;
357
+ organizationsEnabled: boolean;
358
+ thirdPartyApplicationsLimit: number;
359
+ tenantMembersLimit: number;
360
+ customJwtEnabled: boolean;
361
+ subjectTokenEnabled: boolean;
362
+ bringYourUiEnabled: boolean;
363
+ userRolesLimit: number;
364
+ enterpriseSsoLimit: number;
365
+ };
366
+ resources: Record<string, number>;
367
+ roles: Record<string, number>;
368
+ quota: {
369
+ mauLimit: number | null;
370
+ tokenLimit: number | null;
371
+ applicationsLimit: number | null;
372
+ machineToMachineLimit: number | null;
373
+ resourcesLimit: number | null;
374
+ scopesPerResourceLimit: number | null;
375
+ socialConnectorsLimit: number | null;
376
+ machineToMachineRolesLimit: number | null;
377
+ scopesPerRoleLimit: number | null;
378
+ hooksLimit: number | null;
379
+ auditLogsRetentionDays: number | null;
380
+ mfaEnabled: boolean;
381
+ organizationsEnabled: boolean;
382
+ thirdPartyApplicationsLimit: number | null;
383
+ tenantMembersLimit: number | null;
384
+ customJwtEnabled: boolean;
385
+ subjectTokenEnabled: boolean;
386
+ bringYourUiEnabled: boolean;
387
+ userRolesLimit: number | null;
388
+ enterpriseSsoLimit: number | null;
389
+ };
390
+ }>;
391
+ } & {
392
+ "/tenants/my/subscription/periodic-usage": import("@withtyped/server").PathGuard<"/my/subscription/periodic-usage", unknown, unknown, {
393
+ mauLimit: number;
394
+ tokenLimit: number;
225
395
  }>;
226
396
  } & {
227
397
  "/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
@@ -229,6 +399,113 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
229
399
  planId: string;
230
400
  currentPeriodStart: Date;
231
401
  currentPeriodEnd: Date;
402
+ id?: string | undefined;
403
+ upcomingInvoice?: {
404
+ subtotal: number;
405
+ subtotalExcludingTax: number | null;
406
+ total: number;
407
+ totalExcludingTax: number | null;
408
+ } | null | undefined;
409
+ isAddOnAvailable?: boolean | undefined;
410
+ isAddOnVisibleToLegacyUsers?: boolean | undefined;
411
+ }>;
412
+ } & {
413
+ "/tenants/:tenantId/subscription/quota": import("@withtyped/server").PathGuard<"/:tenantId/subscription/quota", unknown, unknown, {
414
+ mauLimit: number | null;
415
+ tokenLimit: number | null;
416
+ applicationsLimit: number | null;
417
+ machineToMachineLimit: number | null;
418
+ resourcesLimit: number | null;
419
+ scopesPerResourceLimit: number | null;
420
+ socialConnectorsLimit: number | null;
421
+ machineToMachineRolesLimit: number | null;
422
+ scopesPerRoleLimit: number | null;
423
+ hooksLimit: number | null;
424
+ auditLogsRetentionDays: number | null;
425
+ mfaEnabled: boolean;
426
+ organizationsEnabled: boolean;
427
+ thirdPartyApplicationsLimit: number | null;
428
+ tenantMembersLimit: number | null;
429
+ customJwtEnabled: boolean;
430
+ subjectTokenEnabled: boolean;
431
+ bringYourUiEnabled: boolean;
432
+ userRolesLimit: number | null;
433
+ enterpriseSsoLimit: number | null;
434
+ }>;
435
+ } & {
436
+ "/tenants/:tenantId/subscription/usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription/usage", unknown, unknown, {
437
+ applicationsLimit: number;
438
+ machineToMachineLimit: number;
439
+ resourcesLimit: number;
440
+ scopesPerResourceLimit: number;
441
+ socialConnectorsLimit: number;
442
+ machineToMachineRolesLimit: number;
443
+ scopesPerRoleLimit: number;
444
+ hooksLimit: number;
445
+ mfaEnabled: boolean;
446
+ organizationsEnabled: boolean;
447
+ thirdPartyApplicationsLimit: number;
448
+ tenantMembersLimit: number;
449
+ customJwtEnabled: boolean;
450
+ subjectTokenEnabled: boolean;
451
+ bringYourUiEnabled: boolean;
452
+ userRolesLimit: number;
453
+ enterpriseSsoLimit: number;
454
+ }>;
455
+ } & {
456
+ "/tenants/:tenantId/subscription/usage/:entityName/scopes": import("@withtyped/server").PathGuard<"/:tenantId/subscription/usage/:entityName/scopes", {
457
+ entityId?: string | undefined;
458
+ }, unknown, Record<string, number>>;
459
+ } & {
460
+ "/tenants/:tenantId/subscription-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription-usage", unknown, unknown, {
461
+ usage: {
462
+ applicationsLimit: number;
463
+ machineToMachineLimit: number;
464
+ resourcesLimit: number;
465
+ scopesPerResourceLimit: number;
466
+ socialConnectorsLimit: number;
467
+ machineToMachineRolesLimit: number;
468
+ scopesPerRoleLimit: number;
469
+ hooksLimit: number;
470
+ mfaEnabled: boolean;
471
+ organizationsEnabled: boolean;
472
+ thirdPartyApplicationsLimit: number;
473
+ tenantMembersLimit: number;
474
+ customJwtEnabled: boolean;
475
+ subjectTokenEnabled: boolean;
476
+ bringYourUiEnabled: boolean;
477
+ userRolesLimit: number;
478
+ enterpriseSsoLimit: number;
479
+ };
480
+ resources: Record<string, number>;
481
+ roles: Record<string, number>;
482
+ quota: {
483
+ mauLimit: number | null;
484
+ tokenLimit: number | null;
485
+ applicationsLimit: number | null;
486
+ machineToMachineLimit: number | null;
487
+ resourcesLimit: number | null;
488
+ scopesPerResourceLimit: number | null;
489
+ socialConnectorsLimit: number | null;
490
+ machineToMachineRolesLimit: number | null;
491
+ scopesPerRoleLimit: number | null;
492
+ hooksLimit: number | null;
493
+ auditLogsRetentionDays: number | null;
494
+ mfaEnabled: boolean;
495
+ organizationsEnabled: boolean;
496
+ thirdPartyApplicationsLimit: number | null;
497
+ tenantMembersLimit: number | null;
498
+ customJwtEnabled: boolean;
499
+ subjectTokenEnabled: boolean;
500
+ bringYourUiEnabled: boolean;
501
+ userRolesLimit: number | null;
502
+ enterpriseSsoLimit: number | null;
503
+ };
504
+ }>;
505
+ } & {
506
+ "/tenants/:tenantId/subscription/periodic-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription/periodic-usage", unknown, unknown, {
507
+ mauLimit: number;
508
+ tokenLimit: number;
232
509
  }>;
233
510
  } & {
234
511
  "/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
@@ -247,20 +524,21 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
247
524
  hostedInvoiceUrl: string | null;
248
525
  invoicePdf: string | null;
249
526
  planName: string | null;
527
+ skuId?: string | null | undefined;
250
528
  }[];
251
529
  }>;
252
530
  } & {
253
531
  "/tenants/:tenantId/invoices/:invoiceId/hosted-invoice-url": import("@withtyped/server").PathGuard<"/:tenantId/invoices/:invoiceId/hosted-invoice-url", unknown, unknown, {
254
532
  hostedInvoiceUrl: string;
255
533
  }>;
256
- } & {
257
- "/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
258
- activeUsers: number;
259
- cost: number;
260
- tokenUsage: number;
261
- }>;
262
534
  };
263
535
  post: {
536
+ "/tenants/my/subscription/item-updates": import("@withtyped/server").PathGuard<"/my/subscription/item-updates", unknown, {
537
+ usageKey: "tokenLimit" | "machineToMachineLimit" | "resourcesLimit" | "enterpriseSsoLimit" | "hooksLimit" | "tenantMembersLimit" | "mfaEnabled" | "organizationsEnabled";
538
+ }, {
539
+ message: string;
540
+ }>;
541
+ } & {
264
542
  "/tenants/:tenantId/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:tenantId/stripe-customer-portal", unknown, {
265
543
  callbackUrl?: string | undefined;
266
544
  }, {
@@ -310,11 +588,13 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
310
588
  };
311
589
  }, unknown>;
312
590
  } & {
313
- "/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", unknown, {
591
+ "/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", {
592
+ isTest?: string | undefined;
593
+ }, {
594
+ context: Record<string, Json>;
314
595
  script: string;
315
596
  tokenType: LogtoJwtTokenKeyType.AccessToken;
316
597
  token: Record<string, Json>;
317
- context: Record<string, Json>;
318
598
  environmentVariables?: Record<string, string> | undefined;
319
599
  } | {
320
600
  script: string;
@@ -325,13 +605,13 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
325
605
  };
326
606
  put: {
327
607
  "/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, {
328
- production?: {
329
- "jwt.accessToken"?: string | undefined;
330
- "jwt.clientCredentials"?: string | undefined;
608
+ "jwt.accessToken"?: {
609
+ production?: string | undefined;
610
+ test?: string | undefined;
331
611
  } | undefined;
332
- test?: {
333
- "jwt.accessToken"?: string | undefined;
334
- "jwt.clientCredentials"?: string | undefined;
612
+ "jwt.clientCredentials"?: {
613
+ production?: string | undefined;
614
+ test?: string | undefined;
335
615
  } | undefined;
336
616
  }, unknown>;
337
617
  };
@@ -349,18 +629,6 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
349
629
  createdAt: Date;
350
630
  name: string;
351
631
  updatedAt: Date;
352
- stripeProducts: {
353
- type: "flat" | "tier1" | "tier2" | "tier3";
354
- id: string;
355
- name: string;
356
- price: {
357
- id: string;
358
- unitAmountDecimal: string;
359
- quantity?: 1 | undefined;
360
- unitAmount?: number | null | undefined;
361
- };
362
- description?: string | undefined;
363
- }[];
364
632
  quota: {
365
633
  mauLimit: number | null;
366
634
  tokenLimit: number | null;
@@ -384,7 +652,63 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
384
652
  thirdPartyApplicationsLimit: number | null;
385
653
  tenantMembersLimit: number | null;
386
654
  customJwtEnabled: boolean;
655
+ subjectTokenEnabled: boolean;
656
+ bringYourUiEnabled: boolean;
657
+ };
658
+ stripeProducts: {
659
+ type: "flat" | "tier1" | "tier2" | "tier3";
660
+ id: string;
661
+ name: string;
662
+ price: {
663
+ id: string;
664
+ unitAmountDecimal: string;
665
+ quantity?: 1 | undefined;
666
+ unitAmount?: number | null | undefined;
667
+ };
668
+ description?: string | undefined;
669
+ }[];
670
+ }[]>;
671
+ };
672
+ post: {};
673
+ put: {};
674
+ delete: {};
675
+ copy: {};
676
+ head: {};
677
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
678
+ patch: {};
679
+ options: {};
680
+ get: {
681
+ "/skus": import("@withtyped/server").PathGuard<"/", {
682
+ type?: LogtoSkuType | undefined;
683
+ }, unknown, {
684
+ type: LogtoSkuType;
685
+ id: string;
686
+ name: string | null;
687
+ quota: {
688
+ mauLimit?: number | null | undefined;
689
+ tokenLimit?: number | null | undefined;
690
+ applicationsLimit?: number | null | undefined;
691
+ machineToMachineLimit?: number | null | undefined;
692
+ resourcesLimit?: number | null | undefined;
693
+ scopesPerResourceLimit?: number | null | undefined;
694
+ socialConnectorsLimit?: number | null | undefined;
695
+ machineToMachineRolesLimit?: number | null | undefined;
696
+ scopesPerRoleLimit?: number | null | undefined;
697
+ hooksLimit?: number | null | undefined;
698
+ auditLogsRetentionDays?: number | null | undefined;
699
+ mfaEnabled?: boolean | undefined;
700
+ organizationsEnabled?: boolean | undefined;
701
+ thirdPartyApplicationsLimit?: number | null | undefined;
702
+ tenantMembersLimit?: number | null | undefined;
703
+ customJwtEnabled?: boolean | undefined;
704
+ subjectTokenEnabled?: boolean | undefined;
705
+ bringYourUiEnabled?: boolean | undefined;
706
+ userRolesLimit?: number | null | undefined;
707
+ enterpriseSsoLimit?: number | null | undefined;
387
708
  };
709
+ createdAt: Date;
710
+ updatedAt: Date;
711
+ unitPrice: number | null;
388
712
  }[]>;
389
713
  };
390
714
  post: {};
@@ -404,6 +728,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
404
728
  tenantId: string | null;
405
729
  updatedAt: Date;
406
730
  planId: string;
731
+ skuId: string | null;
407
732
  }>;
408
733
  };
409
734
  post: {
@@ -411,9 +736,11 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
411
736
  planId: string;
412
737
  successCallbackUrl: string;
413
738
  tenantId?: string | undefined;
414
- cancelCallbackUrl?: string | undefined;
415
- tenantTag?: TenantTag | undefined;
739
+ skuId?: string | undefined;
416
740
  tenantName?: string | undefined;
741
+ tenantTag?: TenantTag | undefined;
742
+ tenantRegionName?: RegionName | undefined;
743
+ cancelCallbackUrl?: string | undefined;
417
744
  }, {
418
745
  sessionId: string;
419
746
  redirectUri?: string | null | undefined;
@@ -504,8 +831,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
504
831
  expiresAt: number;
505
832
  organizationRoles: OrganizationRoleEntity[];
506
833
  } & {
507
- tenantTag: TenantTag;
508
834
  tenantName: string;
835
+ tenantTag: TenantTag;
509
836
  })[]>;
510
837
  } & {
511
838
  "/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:invitationId", unknown, unknown, {
@@ -527,9 +854,21 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
527
854
  delete: {};
528
855
  copy: {};
529
856
  head: {};
857
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
858
+ patch: {};
859
+ options: {};
860
+ get: {};
861
+ post: {};
862
+ put: {};
863
+ delete: {
864
+ "/me": import("@withtyped/server").PathGuard<"/", unknown, unknown, unknown>;
865
+ };
866
+ copy: {};
867
+ head: {};
530
868
  }, "/api">>, "/api">;
531
869
  export declare const tenantAuthRouter: import("@withtyped/server").Router<RequestContext, import("@withtyped/server").WithBodyContext<import("@withtyped/server").BaseContext & {
532
870
  request: {
871
+ id?: string | undefined;
533
872
  method?: import("@withtyped/server").RequestMethod | undefined;
534
873
  headers: import("http").IncomingHttpHeaders;
535
874
  url: URL;
@@ -564,6 +903,8 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
564
903
  avatar: string | null;
565
904
  organizationRoles: OrganizationRoleEntity[];
566
905
  }[]>;
906
+ } & {
907
+ "/:tenantId/members/:userId/scopes": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/scopes", unknown, unknown, OrganizationScope[]>;
567
908
  } & {
568
909
  "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, unknown, ({
569
910
  id: string;
@@ -583,7 +924,7 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
583
924
  };
584
925
  post: {
585
926
  "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
586
- invitee: string;
927
+ invitee: string | string[];
587
928
  roleName: TenantRole;
588
929
  expiresAt?: number | undefined;
589
930
  }, {
@@ -598,7 +939,19 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
598
939
  organizationId: string;
599
940
  expiresAt: number;
600
941
  organizationRoles: OrganizationRoleEntity[];
601
- }>;
942
+ } | {
943
+ id: string;
944
+ createdAt: number;
945
+ status: OrganizationInvitationStatus;
946
+ tenantId: string;
947
+ updatedAt: number;
948
+ inviterId: string | null;
949
+ invitee: string;
950
+ acceptedUserId: string | null;
951
+ organizationId: string;
952
+ expiresAt: number;
953
+ organizationRoles: OrganizationRoleEntity[];
954
+ }[]>;
602
955
  } & {
603
956
  "/:tenantId/invitations/:invitationId/message": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/message", unknown, unknown, unknown>;
604
957
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/cloud",
3
- "version": "0.2.5-94f7bcc",
3
+ "version": "0.2.5-9a1b047",
4
4
  "description": "Logto Cloud service.",
5
5
  "main": "build/index.js",
6
6
  "author": "Silverhand Inc. <contact@silverhand.io>",
@@ -16,21 +16,21 @@
16
16
  "#src/*": "./build/*"
17
17
  },
18
18
  "devDependencies": {
19
- "@silverhand/eslint-config": "5.0.0",
20
- "@silverhand/ts-config": "5.0.0",
19
+ "@silverhand/eslint-config": "6.0.1",
20
+ "@silverhand/ts-config": "6.0.0",
21
21
  "@types/accepts": "^1.3.5",
22
22
  "@types/http-proxy": "^1.17.9",
23
23
  "@types/mime-types": "^2.1.1",
24
24
  "@types/node": "^20.0.0",
25
25
  "@types/yargs": "^17.0.24",
26
26
  "dts-bundle-generator": "^9.3.1",
27
- "eslint": "^8.44.0",
27
+ "eslint": "^8.57.0",
28
28
  "lint-staged": "^15.0.0",
29
29
  "nodemon": "^3.0.0",
30
30
  "prettier": "^3.0.0",
31
31
  "typescript": "^5.3.3",
32
32
  "vite-tsconfig-paths": "^4.3.1",
33
- "vitest": "^1.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.3"
52
+ "@silverhand/essentials": "^2.9.1",
53
+ "@withtyped/server": "^0.13.6"
54
54
  },
55
55
  "scripts": {
56
56
  "precommit": "lint-staged",