@logto/cloud 0.2.5-94f7bcc → 0.2.5-a1a4d0e

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 +388 -41
  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,17 +112,19 @@ 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
+ };
125
+ createdAt: Date;
102
126
  usage: {
103
127
  activeUsers: number;
104
- cost: number;
105
- tokenUsage: number;
106
128
  };
107
129
  indicator: string;
108
130
  isSuspended: boolean;
@@ -112,7 +134,18 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
112
134
  planId: string;
113
135
  currentPeriodStart: Date;
114
136
  currentPeriodEnd: Date;
137
+ id?: string | undefined;
138
+ upcomingInvoice?: {
139
+ subtotal: number;
140
+ subtotalExcludingTax: number | null;
141
+ total: number;
142
+ totalExcludingTax: number | null;
143
+ } | null | undefined;
144
+ isAddOnAvailable?: boolean | undefined;
145
+ isAddOnVisibleToLegacyUsers?: boolean | undefined;
115
146
  };
147
+ regionName: RegionName;
148
+ tag: TenantTag;
116
149
  openInvoices: {
117
150
  status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
118
151
  id: string;
@@ -128,7 +161,6 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
128
161
  hostedInvoiceUrl: string | null;
129
162
  invoicePdf: string | null;
130
163
  }[];
131
- tag: TenantTag;
132
164
  }>;
133
165
  };
134
166
  options: {};
@@ -136,10 +168,12 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
136
168
  "/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
137
169
  id: string;
138
170
  name: string;
171
+ quota: {
172
+ mauLimit: number | null;
173
+ };
174
+ createdAt: Date;
139
175
  usage: {
140
176
  activeUsers: number;
141
- cost: number;
142
- tokenUsage: number;
143
177
  };
144
178
  indicator: string;
145
179
  isSuspended: boolean;
@@ -149,7 +183,18 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
149
183
  planId: string;
150
184
  currentPeriodStart: Date;
151
185
  currentPeriodEnd: Date;
186
+ id?: string | undefined;
187
+ upcomingInvoice?: {
188
+ subtotal: number;
189
+ subtotalExcludingTax: number | null;
190
+ total: number;
191
+ totalExcludingTax: number | null;
192
+ } | null | undefined;
193
+ isAddOnAvailable?: boolean | undefined;
194
+ isAddOnVisibleToLegacyUsers?: boolean | undefined;
152
195
  };
196
+ regionName: RegionName;
197
+ tag: TenantTag;
153
198
  openInvoices: {
154
199
  status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
155
200
  id: string;
@@ -165,20 +210,22 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
165
210
  hostedInvoiceUrl: string | null;
166
211
  invoicePdf: string | null;
167
212
  }[];
168
- tag: TenantTag;
169
213
  }[]>;
170
214
  };
171
215
  post: {
172
216
  "/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
173
217
  name?: string | undefined;
174
218
  tag?: TenantTag | undefined;
219
+ regionName?: RegionName | undefined;
175
220
  }, {
176
221
  id: string;
177
222
  name: string;
223
+ quota: {
224
+ mauLimit: number | null;
225
+ };
226
+ createdAt: Date;
178
227
  usage: {
179
228
  activeUsers: number;
180
- cost: number;
181
- tokenUsage: number;
182
229
  };
183
230
  indicator: string;
184
231
  isSuspended: boolean;
@@ -188,7 +235,18 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
188
235
  planId: string;
189
236
  currentPeriodStart: Date;
190
237
  currentPeriodEnd: Date;
238
+ id?: string | undefined;
239
+ upcomingInvoice?: {
240
+ subtotal: number;
241
+ subtotalExcludingTax: number | null;
242
+ total: number;
243
+ totalExcludingTax: number | null;
244
+ } | null | undefined;
245
+ isAddOnAvailable?: boolean | undefined;
246
+ isAddOnVisibleToLegacyUsers?: boolean | undefined;
191
247
  };
248
+ regionName: RegionName;
249
+ tag: TenantTag;
192
250
  openInvoices: {
193
251
  status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
194
252
  id: string;
@@ -204,7 +262,6 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
204
262
  hostedInvoiceUrl: string | null;
205
263
  invoicePdf: string | null;
206
264
  }[];
207
- tag: TenantTag;
208
265
  }>;
209
266
  };
210
267
  put: {};
@@ -222,6 +279,113 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
222
279
  planId: string;
223
280
  currentPeriodStart: Date;
224
281
  currentPeriodEnd: Date;
282
+ id?: string | undefined;
283
+ upcomingInvoice?: {
284
+ subtotal: number;
285
+ subtotalExcludingTax: number | null;
286
+ total: number;
287
+ totalExcludingTax: number | null;
288
+ } | null | undefined;
289
+ isAddOnAvailable?: boolean | undefined;
290
+ isAddOnVisibleToLegacyUsers?: boolean | undefined;
291
+ }>;
292
+ } & {
293
+ "/tenants/my/subscription/quota": import("@withtyped/server").PathGuard<"/my/subscription/quota", unknown, unknown, {
294
+ mauLimit: number | null;
295
+ tokenLimit: number | null;
296
+ applicationsLimit: number | null;
297
+ machineToMachineLimit: number | null;
298
+ resourcesLimit: number | null;
299
+ scopesPerResourceLimit: number | null;
300
+ socialConnectorsLimit: number | null;
301
+ machineToMachineRolesLimit: number | null;
302
+ scopesPerRoleLimit: number | null;
303
+ hooksLimit: number | null;
304
+ auditLogsRetentionDays: number | null;
305
+ mfaEnabled: boolean;
306
+ organizationsEnabled: boolean;
307
+ thirdPartyApplicationsLimit: number | null;
308
+ tenantMembersLimit: number | null;
309
+ customJwtEnabled: boolean;
310
+ subjectTokenEnabled: boolean;
311
+ bringYourUiEnabled: boolean;
312
+ userRolesLimit: number | null;
313
+ enterpriseSsoLimit: number | null;
314
+ }>;
315
+ } & {
316
+ "/tenants/my/subscription/usage": import("@withtyped/server").PathGuard<"/my/subscription/usage", unknown, unknown, {
317
+ applicationsLimit: number;
318
+ machineToMachineLimit: number;
319
+ resourcesLimit: number;
320
+ scopesPerResourceLimit: number;
321
+ socialConnectorsLimit: number;
322
+ machineToMachineRolesLimit: number;
323
+ scopesPerRoleLimit: number;
324
+ hooksLimit: number;
325
+ mfaEnabled: boolean;
326
+ organizationsEnabled: boolean;
327
+ thirdPartyApplicationsLimit: number;
328
+ tenantMembersLimit: number;
329
+ customJwtEnabled: boolean;
330
+ subjectTokenEnabled: boolean;
331
+ bringYourUiEnabled: boolean;
332
+ userRolesLimit: number;
333
+ enterpriseSsoLimit: number;
334
+ }>;
335
+ } & {
336
+ "/tenants/my/subscription/usage/:entityName/scopes": import("@withtyped/server").PathGuard<"/my/subscription/usage/:entityName/scopes", {
337
+ entityId?: string | undefined;
338
+ }, unknown, Record<string, number>>;
339
+ } & {
340
+ "/tenants/my/subscription-usage": import("@withtyped/server").PathGuard<"/my/subscription-usage", unknown, unknown, {
341
+ usage: {
342
+ applicationsLimit: number;
343
+ machineToMachineLimit: number;
344
+ resourcesLimit: number;
345
+ scopesPerResourceLimit: number;
346
+ socialConnectorsLimit: number;
347
+ machineToMachineRolesLimit: number;
348
+ scopesPerRoleLimit: number;
349
+ hooksLimit: number;
350
+ mfaEnabled: boolean;
351
+ organizationsEnabled: boolean;
352
+ thirdPartyApplicationsLimit: number;
353
+ tenantMembersLimit: number;
354
+ customJwtEnabled: boolean;
355
+ subjectTokenEnabled: boolean;
356
+ bringYourUiEnabled: boolean;
357
+ userRolesLimit: number;
358
+ enterpriseSsoLimit: number;
359
+ };
360
+ resources: Record<string, number>;
361
+ roles: Record<string, number>;
362
+ quota: {
363
+ mauLimit: number | null;
364
+ tokenLimit: number | null;
365
+ applicationsLimit: number | null;
366
+ machineToMachineLimit: number | null;
367
+ resourcesLimit: number | null;
368
+ scopesPerResourceLimit: number | null;
369
+ socialConnectorsLimit: number | null;
370
+ machineToMachineRolesLimit: number | null;
371
+ scopesPerRoleLimit: number | null;
372
+ hooksLimit: number | null;
373
+ auditLogsRetentionDays: number | null;
374
+ mfaEnabled: boolean;
375
+ organizationsEnabled: boolean;
376
+ thirdPartyApplicationsLimit: number | null;
377
+ tenantMembersLimit: number | null;
378
+ customJwtEnabled: boolean;
379
+ subjectTokenEnabled: boolean;
380
+ bringYourUiEnabled: boolean;
381
+ userRolesLimit: number | null;
382
+ enterpriseSsoLimit: number | null;
383
+ };
384
+ }>;
385
+ } & {
386
+ "/tenants/my/subscription/periodic-usage": import("@withtyped/server").PathGuard<"/my/subscription/periodic-usage", unknown, unknown, {
387
+ mauLimit: number;
388
+ tokenLimit: number;
225
389
  }>;
226
390
  } & {
227
391
  "/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
@@ -229,6 +393,113 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
229
393
  planId: string;
230
394
  currentPeriodStart: Date;
231
395
  currentPeriodEnd: Date;
396
+ id?: string | undefined;
397
+ upcomingInvoice?: {
398
+ subtotal: number;
399
+ subtotalExcludingTax: number | null;
400
+ total: number;
401
+ totalExcludingTax: number | null;
402
+ } | null | undefined;
403
+ isAddOnAvailable?: boolean | undefined;
404
+ isAddOnVisibleToLegacyUsers?: boolean | undefined;
405
+ }>;
406
+ } & {
407
+ "/tenants/:tenantId/subscription/quota": import("@withtyped/server").PathGuard<"/:tenantId/subscription/quota", unknown, unknown, {
408
+ mauLimit: number | null;
409
+ tokenLimit: number | null;
410
+ applicationsLimit: number | null;
411
+ machineToMachineLimit: number | null;
412
+ resourcesLimit: number | null;
413
+ scopesPerResourceLimit: number | null;
414
+ socialConnectorsLimit: number | null;
415
+ machineToMachineRolesLimit: number | null;
416
+ scopesPerRoleLimit: number | null;
417
+ hooksLimit: number | null;
418
+ auditLogsRetentionDays: number | null;
419
+ mfaEnabled: boolean;
420
+ organizationsEnabled: boolean;
421
+ thirdPartyApplicationsLimit: number | null;
422
+ tenantMembersLimit: number | null;
423
+ customJwtEnabled: boolean;
424
+ subjectTokenEnabled: boolean;
425
+ bringYourUiEnabled: boolean;
426
+ userRolesLimit: number | null;
427
+ enterpriseSsoLimit: number | null;
428
+ }>;
429
+ } & {
430
+ "/tenants/:tenantId/subscription/usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription/usage", unknown, unknown, {
431
+ applicationsLimit: number;
432
+ machineToMachineLimit: number;
433
+ resourcesLimit: number;
434
+ scopesPerResourceLimit: number;
435
+ socialConnectorsLimit: number;
436
+ machineToMachineRolesLimit: number;
437
+ scopesPerRoleLimit: number;
438
+ hooksLimit: number;
439
+ mfaEnabled: boolean;
440
+ organizationsEnabled: boolean;
441
+ thirdPartyApplicationsLimit: number;
442
+ tenantMembersLimit: number;
443
+ customJwtEnabled: boolean;
444
+ subjectTokenEnabled: boolean;
445
+ bringYourUiEnabled: boolean;
446
+ userRolesLimit: number;
447
+ enterpriseSsoLimit: number;
448
+ }>;
449
+ } & {
450
+ "/tenants/:tenantId/subscription/usage/:entityName/scopes": import("@withtyped/server").PathGuard<"/:tenantId/subscription/usage/:entityName/scopes", {
451
+ entityId?: string | undefined;
452
+ }, unknown, Record<string, number>>;
453
+ } & {
454
+ "/tenants/:tenantId/subscription-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription-usage", unknown, unknown, {
455
+ usage: {
456
+ applicationsLimit: number;
457
+ machineToMachineLimit: number;
458
+ resourcesLimit: number;
459
+ scopesPerResourceLimit: number;
460
+ socialConnectorsLimit: number;
461
+ machineToMachineRolesLimit: number;
462
+ scopesPerRoleLimit: number;
463
+ hooksLimit: number;
464
+ mfaEnabled: boolean;
465
+ organizationsEnabled: boolean;
466
+ thirdPartyApplicationsLimit: number;
467
+ tenantMembersLimit: number;
468
+ customJwtEnabled: boolean;
469
+ subjectTokenEnabled: boolean;
470
+ bringYourUiEnabled: boolean;
471
+ userRolesLimit: number;
472
+ enterpriseSsoLimit: number;
473
+ };
474
+ resources: Record<string, number>;
475
+ roles: Record<string, number>;
476
+ quota: {
477
+ mauLimit: number | null;
478
+ tokenLimit: number | null;
479
+ applicationsLimit: number | null;
480
+ machineToMachineLimit: number | null;
481
+ resourcesLimit: number | null;
482
+ scopesPerResourceLimit: number | null;
483
+ socialConnectorsLimit: number | null;
484
+ machineToMachineRolesLimit: number | null;
485
+ scopesPerRoleLimit: number | null;
486
+ hooksLimit: number | null;
487
+ auditLogsRetentionDays: number | null;
488
+ mfaEnabled: boolean;
489
+ organizationsEnabled: boolean;
490
+ thirdPartyApplicationsLimit: number | null;
491
+ tenantMembersLimit: number | null;
492
+ customJwtEnabled: boolean;
493
+ subjectTokenEnabled: boolean;
494
+ bringYourUiEnabled: boolean;
495
+ userRolesLimit: number | null;
496
+ enterpriseSsoLimit: number | null;
497
+ };
498
+ }>;
499
+ } & {
500
+ "/tenants/:tenantId/subscription/periodic-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription/periodic-usage", unknown, unknown, {
501
+ mauLimit: number;
502
+ tokenLimit: number;
232
503
  }>;
233
504
  } & {
234
505
  "/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
@@ -247,20 +518,21 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
247
518
  hostedInvoiceUrl: string | null;
248
519
  invoicePdf: string | null;
249
520
  planName: string | null;
521
+ skuId?: string | null | undefined;
250
522
  }[];
251
523
  }>;
252
524
  } & {
253
525
  "/tenants/:tenantId/invoices/:invoiceId/hosted-invoice-url": import("@withtyped/server").PathGuard<"/:tenantId/invoices/:invoiceId/hosted-invoice-url", unknown, unknown, {
254
526
  hostedInvoiceUrl: string;
255
527
  }>;
256
- } & {
257
- "/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
258
- activeUsers: number;
259
- cost: number;
260
- tokenUsage: number;
261
- }>;
262
528
  };
263
529
  post: {
530
+ "/tenants/my/subscription/item-updates": import("@withtyped/server").PathGuard<"/my/subscription/item-updates", unknown, {
531
+ usageKey: "tokenLimit" | "machineToMachineLimit" | "resourcesLimit" | "enterpriseSsoLimit" | "hooksLimit" | "tenantMembersLimit" | "mfaEnabled" | "organizationsEnabled";
532
+ }, {
533
+ message: string;
534
+ }>;
535
+ } & {
264
536
  "/tenants/:tenantId/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:tenantId/stripe-customer-portal", unknown, {
265
537
  callbackUrl?: string | undefined;
266
538
  }, {
@@ -310,11 +582,13 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
310
582
  };
311
583
  }, unknown>;
312
584
  } & {
313
- "/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", unknown, {
585
+ "/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", {
586
+ isTest?: string | undefined;
587
+ }, {
588
+ context: Record<string, Json>;
314
589
  script: string;
315
590
  tokenType: LogtoJwtTokenKeyType.AccessToken;
316
591
  token: Record<string, Json>;
317
- context: Record<string, Json>;
318
592
  environmentVariables?: Record<string, string> | undefined;
319
593
  } | {
320
594
  script: string;
@@ -325,13 +599,13 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
325
599
  };
326
600
  put: {
327
601
  "/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, {
328
- production?: {
329
- "jwt.accessToken"?: string | undefined;
330
- "jwt.clientCredentials"?: string | undefined;
602
+ "jwt.accessToken"?: {
603
+ production?: string | undefined;
604
+ test?: string | undefined;
331
605
  } | undefined;
332
- test?: {
333
- "jwt.accessToken"?: string | undefined;
334
- "jwt.clientCredentials"?: string | undefined;
606
+ "jwt.clientCredentials"?: {
607
+ production?: string | undefined;
608
+ test?: string | undefined;
335
609
  } | undefined;
336
610
  }, unknown>;
337
611
  };
@@ -349,18 +623,6 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
349
623
  createdAt: Date;
350
624
  name: string;
351
625
  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
626
  quota: {
365
627
  mauLimit: number | null;
366
628
  tokenLimit: number | null;
@@ -384,7 +646,63 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
384
646
  thirdPartyApplicationsLimit: number | null;
385
647
  tenantMembersLimit: number | null;
386
648
  customJwtEnabled: boolean;
649
+ subjectTokenEnabled: boolean;
650
+ bringYourUiEnabled: boolean;
651
+ };
652
+ stripeProducts: {
653
+ type: "flat" | "tier1" | "tier2" | "tier3";
654
+ id: string;
655
+ name: string;
656
+ price: {
657
+ id: string;
658
+ unitAmountDecimal: string;
659
+ quantity?: 1 | undefined;
660
+ unitAmount?: number | null | undefined;
661
+ };
662
+ description?: string | undefined;
663
+ }[];
664
+ }[]>;
665
+ };
666
+ post: {};
667
+ put: {};
668
+ delete: {};
669
+ copy: {};
670
+ head: {};
671
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
672
+ patch: {};
673
+ options: {};
674
+ get: {
675
+ "/skus": import("@withtyped/server").PathGuard<"/", {
676
+ type?: LogtoSkuType | undefined;
677
+ }, unknown, {
678
+ type: LogtoSkuType;
679
+ id: string;
680
+ name: string | null;
681
+ quota: {
682
+ mauLimit?: number | null | undefined;
683
+ tokenLimit?: number | null | undefined;
684
+ applicationsLimit?: number | null | undefined;
685
+ machineToMachineLimit?: number | null | undefined;
686
+ resourcesLimit?: number | null | undefined;
687
+ scopesPerResourceLimit?: number | null | undefined;
688
+ socialConnectorsLimit?: number | null | undefined;
689
+ machineToMachineRolesLimit?: number | null | undefined;
690
+ scopesPerRoleLimit?: number | null | undefined;
691
+ hooksLimit?: number | null | undefined;
692
+ auditLogsRetentionDays?: number | null | undefined;
693
+ mfaEnabled?: boolean | undefined;
694
+ organizationsEnabled?: boolean | undefined;
695
+ thirdPartyApplicationsLimit?: number | null | undefined;
696
+ tenantMembersLimit?: number | null | undefined;
697
+ customJwtEnabled?: boolean | undefined;
698
+ subjectTokenEnabled?: boolean | undefined;
699
+ bringYourUiEnabled?: boolean | undefined;
700
+ userRolesLimit?: number | null | undefined;
701
+ enterpriseSsoLimit?: number | null | undefined;
387
702
  };
703
+ createdAt: Date;
704
+ updatedAt: Date;
705
+ unitPrice: number | null;
388
706
  }[]>;
389
707
  };
390
708
  post: {};
@@ -404,6 +722,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
404
722
  tenantId: string | null;
405
723
  updatedAt: Date;
406
724
  planId: string;
725
+ skuId: string | null;
407
726
  }>;
408
727
  };
409
728
  post: {
@@ -411,9 +730,11 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
411
730
  planId: string;
412
731
  successCallbackUrl: string;
413
732
  tenantId?: string | undefined;
414
- cancelCallbackUrl?: string | undefined;
415
- tenantTag?: TenantTag | undefined;
733
+ skuId?: string | undefined;
416
734
  tenantName?: string | undefined;
735
+ tenantTag?: TenantTag | undefined;
736
+ tenantRegionName?: RegionName | undefined;
737
+ cancelCallbackUrl?: string | undefined;
417
738
  }, {
418
739
  sessionId: string;
419
740
  redirectUri?: string | null | undefined;
@@ -504,8 +825,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
504
825
  expiresAt: number;
505
826
  organizationRoles: OrganizationRoleEntity[];
506
827
  } & {
507
- tenantTag: TenantTag;
508
828
  tenantName: string;
829
+ tenantTag: TenantTag;
509
830
  })[]>;
510
831
  } & {
511
832
  "/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:invitationId", unknown, unknown, {
@@ -527,9 +848,21 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
527
848
  delete: {};
528
849
  copy: {};
529
850
  head: {};
851
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
852
+ patch: {};
853
+ options: {};
854
+ get: {};
855
+ post: {};
856
+ put: {};
857
+ delete: {
858
+ "/me": import("@withtyped/server").PathGuard<"/", unknown, unknown, unknown>;
859
+ };
860
+ copy: {};
861
+ head: {};
530
862
  }, "/api">>, "/api">;
531
863
  export declare const tenantAuthRouter: import("@withtyped/server").Router<RequestContext, import("@withtyped/server").WithBodyContext<import("@withtyped/server").BaseContext & {
532
864
  request: {
865
+ id?: string | undefined;
533
866
  method?: import("@withtyped/server").RequestMethod | undefined;
534
867
  headers: import("http").IncomingHttpHeaders;
535
868
  url: URL;
@@ -564,6 +897,8 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
564
897
  avatar: string | null;
565
898
  organizationRoles: OrganizationRoleEntity[];
566
899
  }[]>;
900
+ } & {
901
+ "/:tenantId/members/:userId/scopes": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/scopes", unknown, unknown, OrganizationScope[]>;
567
902
  } & {
568
903
  "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, unknown, ({
569
904
  id: string;
@@ -583,7 +918,7 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
583
918
  };
584
919
  post: {
585
920
  "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
586
- invitee: string;
921
+ invitee: string | string[];
587
922
  roleName: TenantRole;
588
923
  expiresAt?: number | undefined;
589
924
  }, {
@@ -598,7 +933,19 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
598
933
  organizationId: string;
599
934
  expiresAt: number;
600
935
  organizationRoles: OrganizationRoleEntity[];
601
- }>;
936
+ } | {
937
+ id: string;
938
+ createdAt: number;
939
+ status: OrganizationInvitationStatus;
940
+ tenantId: string;
941
+ updatedAt: number;
942
+ inviterId: string | null;
943
+ invitee: string;
944
+ acceptedUserId: string | null;
945
+ organizationId: string;
946
+ expiresAt: number;
947
+ organizationRoles: OrganizationRoleEntity[];
948
+ }[]>;
602
949
  } & {
603
950
  "/:tenantId/invitations/:invitationId/message": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/message", unknown, unknown, unknown>;
604
951
  };
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-a1a4d0e",
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",