@logto/cloud 0.2.5-6c090b2 → 0.2.5-708b3e3

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 +402 -68
  2. package/package.json +7 -7
@@ -37,7 +37,17 @@ declare enum OrganizationInvitationStatus {
37
37
  Expired = "Expired",
38
38
  Revoked = "Revoked"
39
39
  }
40
- declare enum LogtoJwtTokenPath {
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
+ };
50
+ declare enum LogtoJwtTokenKeyType {
41
51
  AccessToken = "access-token",
42
52
  ClientCredentials = "client-credentials"
43
53
  }
@@ -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,13 +112,14 @@ 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
+ createdAt: Date;
102
123
  usage: {
103
124
  activeUsers: number;
104
125
  cost: number;
@@ -112,7 +133,18 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
112
133
  planId: string;
113
134
  currentPeriodStart: Date;
114
135
  currentPeriodEnd: Date;
136
+ id?: string | undefined;
137
+ upcomingInvoice?: {
138
+ subtotal: number;
139
+ subtotalExcludingTax: number | null;
140
+ total: number;
141
+ totalExcludingTax: number | null;
142
+ } | null | undefined;
143
+ isAddOnAvailable?: boolean | undefined;
144
+ isAddOnVisibleToLegacyUsers?: boolean | undefined;
115
145
  };
146
+ regionName: RegionName;
147
+ tag: TenantTag;
116
148
  openInvoices: {
117
149
  status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
118
150
  id: string;
@@ -128,7 +160,6 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
128
160
  hostedInvoiceUrl: string | null;
129
161
  invoicePdf: string | null;
130
162
  }[];
131
- tag: TenantTag;
132
163
  }>;
133
164
  };
134
165
  options: {};
@@ -136,6 +167,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
136
167
  "/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
137
168
  id: string;
138
169
  name: string;
170
+ createdAt: Date;
139
171
  usage: {
140
172
  activeUsers: number;
141
173
  cost: number;
@@ -149,7 +181,18 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
149
181
  planId: string;
150
182
  currentPeriodStart: Date;
151
183
  currentPeriodEnd: Date;
184
+ id?: string | undefined;
185
+ upcomingInvoice?: {
186
+ subtotal: number;
187
+ subtotalExcludingTax: number | null;
188
+ total: number;
189
+ totalExcludingTax: number | null;
190
+ } | null | undefined;
191
+ isAddOnAvailable?: boolean | undefined;
192
+ isAddOnVisibleToLegacyUsers?: boolean | undefined;
152
193
  };
194
+ regionName: RegionName;
195
+ tag: TenantTag;
153
196
  openInvoices: {
154
197
  status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
155
198
  id: string;
@@ -165,16 +208,17 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
165
208
  hostedInvoiceUrl: string | null;
166
209
  invoicePdf: string | null;
167
210
  }[];
168
- tag: TenantTag;
169
211
  }[]>;
170
212
  };
171
213
  post: {
172
214
  "/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
173
215
  name?: string | undefined;
174
216
  tag?: TenantTag | undefined;
217
+ regionName?: RegionName | undefined;
175
218
  }, {
176
219
  id: string;
177
220
  name: string;
221
+ createdAt: Date;
178
222
  usage: {
179
223
  activeUsers: number;
180
224
  cost: number;
@@ -188,7 +232,18 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
188
232
  planId: string;
189
233
  currentPeriodStart: Date;
190
234
  currentPeriodEnd: Date;
235
+ id?: string | undefined;
236
+ upcomingInvoice?: {
237
+ subtotal: number;
238
+ subtotalExcludingTax: number | null;
239
+ total: number;
240
+ totalExcludingTax: number | null;
241
+ } | null | undefined;
242
+ isAddOnAvailable?: boolean | undefined;
243
+ isAddOnVisibleToLegacyUsers?: boolean | undefined;
191
244
  };
245
+ regionName: RegionName;
246
+ tag: TenantTag;
192
247
  openInvoices: {
193
248
  status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
194
249
  id: string;
@@ -204,7 +259,6 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
204
259
  hostedInvoiceUrl: string | null;
205
260
  invoicePdf: string | null;
206
261
  }[];
207
- tag: TenantTag;
208
262
  }>;
209
263
  };
210
264
  put: {};
@@ -222,6 +276,112 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
222
276
  planId: string;
223
277
  currentPeriodStart: Date;
224
278
  currentPeriodEnd: Date;
279
+ id?: string | undefined;
280
+ upcomingInvoice?: {
281
+ subtotal: number;
282
+ subtotalExcludingTax: number | null;
283
+ total: number;
284
+ totalExcludingTax: number | null;
285
+ } | null | undefined;
286
+ isAddOnAvailable?: boolean | undefined;
287
+ isAddOnVisibleToLegacyUsers?: boolean | undefined;
288
+ }>;
289
+ } & {
290
+ "/tenants/my/subscription/quota": import("@withtyped/server").PathGuard<"/my/subscription/quota", unknown, unknown, {
291
+ mauLimit: number | null;
292
+ tokenLimit: number | null;
293
+ applicationsLimit: number | null;
294
+ machineToMachineLimit: number | null;
295
+ resourcesLimit: number | null;
296
+ scopesPerResourceLimit: number | null;
297
+ socialConnectorsLimit: number | null;
298
+ machineToMachineRolesLimit: number | null;
299
+ scopesPerRoleLimit: number | null;
300
+ hooksLimit: number | null;
301
+ auditLogsRetentionDays: number | null;
302
+ mfaEnabled: boolean;
303
+ organizationsEnabled: boolean;
304
+ thirdPartyApplicationsLimit: number | null;
305
+ tenantMembersLimit: number | null;
306
+ customJwtEnabled: boolean;
307
+ subjectTokenEnabled: boolean;
308
+ bringYourUiEnabled: boolean;
309
+ userRolesLimit: number | null;
310
+ enterpriseSsoLimit: number | null;
311
+ }>;
312
+ } & {
313
+ "/tenants/my/subscription/usage": import("@withtyped/server").PathGuard<"/my/subscription/usage", unknown, unknown, {
314
+ mauLimit: number;
315
+ tokenLimit: number;
316
+ applicationsLimit: number;
317
+ machineToMachineLimit: number;
318
+ resourcesLimit: number;
319
+ scopesPerResourceLimit: number;
320
+ socialConnectorsLimit: number;
321
+ machineToMachineRolesLimit: number;
322
+ scopesPerRoleLimit: number;
323
+ hooksLimit: number;
324
+ mfaEnabled: boolean;
325
+ organizationsEnabled: boolean;
326
+ thirdPartyApplicationsLimit: number;
327
+ tenantMembersLimit: number;
328
+ customJwtEnabled: boolean;
329
+ subjectTokenEnabled: boolean;
330
+ bringYourUiEnabled: boolean;
331
+ userRolesLimit: number;
332
+ enterpriseSsoLimit: number;
333
+ }>;
334
+ } & {
335
+ "/tenants/my/subscription/usage/:entityName/scopes": import("@withtyped/server").PathGuard<"/my/subscription/usage/:entityName/scopes", {
336
+ entityId?: string | undefined;
337
+ }, unknown, Record<string, number>>;
338
+ } & {
339
+ "/tenants/my/subscription-usage": import("@withtyped/server").PathGuard<"/my/subscription-usage", unknown, unknown, {
340
+ usage: {
341
+ mauLimit: number;
342
+ tokenLimit: number;
343
+ applicationsLimit: number;
344
+ machineToMachineLimit: number;
345
+ resourcesLimit: number;
346
+ scopesPerResourceLimit: number;
347
+ socialConnectorsLimit: number;
348
+ machineToMachineRolesLimit: number;
349
+ scopesPerRoleLimit: number;
350
+ hooksLimit: number;
351
+ mfaEnabled: boolean;
352
+ organizationsEnabled: boolean;
353
+ thirdPartyApplicationsLimit: number;
354
+ tenantMembersLimit: number;
355
+ customJwtEnabled: boolean;
356
+ subjectTokenEnabled: boolean;
357
+ bringYourUiEnabled: boolean;
358
+ userRolesLimit: number;
359
+ enterpriseSsoLimit: number;
360
+ };
361
+ resources: Record<string, number>;
362
+ roles: Record<string, number>;
363
+ quota: {
364
+ mauLimit: number | null;
365
+ tokenLimit: number | null;
366
+ applicationsLimit: number | null;
367
+ machineToMachineLimit: number | null;
368
+ resourcesLimit: number | null;
369
+ scopesPerResourceLimit: number | null;
370
+ socialConnectorsLimit: number | null;
371
+ machineToMachineRolesLimit: number | null;
372
+ scopesPerRoleLimit: number | null;
373
+ hooksLimit: number | null;
374
+ auditLogsRetentionDays: number | null;
375
+ mfaEnabled: boolean;
376
+ organizationsEnabled: boolean;
377
+ thirdPartyApplicationsLimit: number | null;
378
+ tenantMembersLimit: number | null;
379
+ customJwtEnabled: boolean;
380
+ subjectTokenEnabled: boolean;
381
+ bringYourUiEnabled: boolean;
382
+ userRolesLimit: number | null;
383
+ enterpriseSsoLimit: number | null;
384
+ };
225
385
  }>;
226
386
  } & {
227
387
  "/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
@@ -229,6 +389,112 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
229
389
  planId: string;
230
390
  currentPeriodStart: Date;
231
391
  currentPeriodEnd: Date;
392
+ id?: string | undefined;
393
+ upcomingInvoice?: {
394
+ subtotal: number;
395
+ subtotalExcludingTax: number | null;
396
+ total: number;
397
+ totalExcludingTax: number | null;
398
+ } | null | undefined;
399
+ isAddOnAvailable?: boolean | undefined;
400
+ isAddOnVisibleToLegacyUsers?: boolean | undefined;
401
+ }>;
402
+ } & {
403
+ "/tenants/:tenantId/subscription/quota": import("@withtyped/server").PathGuard<"/:tenantId/subscription/quota", unknown, unknown, {
404
+ mauLimit: number | null;
405
+ tokenLimit: number | null;
406
+ applicationsLimit: number | null;
407
+ machineToMachineLimit: number | null;
408
+ resourcesLimit: number | null;
409
+ scopesPerResourceLimit: number | null;
410
+ socialConnectorsLimit: number | null;
411
+ machineToMachineRolesLimit: number | null;
412
+ scopesPerRoleLimit: number | null;
413
+ hooksLimit: number | null;
414
+ auditLogsRetentionDays: number | null;
415
+ mfaEnabled: boolean;
416
+ organizationsEnabled: boolean;
417
+ thirdPartyApplicationsLimit: number | null;
418
+ tenantMembersLimit: number | null;
419
+ customJwtEnabled: boolean;
420
+ subjectTokenEnabled: boolean;
421
+ bringYourUiEnabled: boolean;
422
+ userRolesLimit: number | null;
423
+ enterpriseSsoLimit: number | null;
424
+ }>;
425
+ } & {
426
+ "/tenants/:tenantId/subscription/usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription/usage", unknown, unknown, {
427
+ mauLimit: number;
428
+ tokenLimit: number;
429
+ applicationsLimit: number;
430
+ machineToMachineLimit: number;
431
+ resourcesLimit: number;
432
+ scopesPerResourceLimit: number;
433
+ socialConnectorsLimit: number;
434
+ machineToMachineRolesLimit: number;
435
+ scopesPerRoleLimit: number;
436
+ hooksLimit: number;
437
+ mfaEnabled: boolean;
438
+ organizationsEnabled: boolean;
439
+ thirdPartyApplicationsLimit: number;
440
+ tenantMembersLimit: number;
441
+ customJwtEnabled: boolean;
442
+ subjectTokenEnabled: boolean;
443
+ bringYourUiEnabled: boolean;
444
+ userRolesLimit: number;
445
+ enterpriseSsoLimit: number;
446
+ }>;
447
+ } & {
448
+ "/tenants/:tenantId/subscription/usage/:entityName/scopes": import("@withtyped/server").PathGuard<"/:tenantId/subscription/usage/:entityName/scopes", {
449
+ entityId?: string | undefined;
450
+ }, unknown, Record<string, number>>;
451
+ } & {
452
+ "/tenants/:tenantId/subscription-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription-usage", unknown, unknown, {
453
+ usage: {
454
+ mauLimit: number;
455
+ tokenLimit: number;
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
+ };
232
498
  }>;
233
499
  } & {
234
500
  "/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
@@ -247,6 +513,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
247
513
  hostedInvoiceUrl: string | null;
248
514
  invoicePdf: string | null;
249
515
  planName: string | null;
516
+ skuId?: string | null | undefined;
250
517
  }[];
251
518
  }>;
252
519
  } & {
@@ -261,6 +528,12 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
261
528
  }>;
262
529
  };
263
530
  post: {
531
+ "/tenants/my/subscription/item-updates": import("@withtyped/server").PathGuard<"/my/subscription/item-updates", unknown, {
532
+ usageKey: "tokenLimit" | "machineToMachineLimit" | "resourcesLimit" | "enterpriseSsoLimit" | "hooksLimit" | "tenantMembersLimit" | "mfaEnabled" | "organizationsEnabled";
533
+ }, {
534
+ message: string;
535
+ }>;
536
+ } & {
264
537
  "/tenants/:tenantId/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:tenantId/stripe-customer-portal", unknown, {
265
538
  callbackUrl?: string | undefined;
266
539
  }, {
@@ -310,21 +583,36 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
310
583
  };
311
584
  }, unknown>;
312
585
  } & {
313
- "/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", unknown, {
586
+ "/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", {
587
+ isTest?: string | undefined;
588
+ }, {
589
+ context: Record<string, Json>;
314
590
  script: string;
315
- tokenType: LogtoJwtTokenPath.AccessToken;
591
+ tokenType: LogtoJwtTokenKeyType.AccessToken;
316
592
  token: Record<string, Json>;
317
- context: Record<string, Json>;
318
- envVars?: Record<string, string> | undefined;
593
+ environmentVariables?: Record<string, string> | undefined;
319
594
  } | {
320
595
  script: string;
321
- tokenType: LogtoJwtTokenPath.ClientCredentials;
596
+ tokenType: LogtoJwtTokenKeyType.ClientCredentials;
322
597
  token: Record<string, Json>;
323
- envVars?: Record<string, string> | undefined;
598
+ environmentVariables?: Record<string, string> | undefined;
324
599
  }, Record<string, unknown>>;
325
600
  };
326
- put: {};
327
- delete: {};
601
+ put: {
602
+ "/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, {
603
+ "jwt.accessToken"?: {
604
+ production?: string | undefined;
605
+ test?: string | undefined;
606
+ } | undefined;
607
+ "jwt.clientCredentials"?: {
608
+ production?: string | undefined;
609
+ test?: string | undefined;
610
+ } | undefined;
611
+ }, unknown>;
612
+ };
613
+ delete: {
614
+ "/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, unknown, unknown>;
615
+ };
328
616
  copy: {};
329
617
  head: {};
330
618
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
@@ -336,18 +624,6 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
336
624
  createdAt: Date;
337
625
  name: string;
338
626
  updatedAt: Date;
339
- stripeProducts: {
340
- type: "flat" | "tier1" | "tier2" | "tier3";
341
- id: string;
342
- name: string;
343
- price: {
344
- id: string;
345
- unitAmountDecimal: string;
346
- quantity?: 1 | undefined;
347
- unitAmount?: number | null | undefined;
348
- };
349
- description?: string | undefined;
350
- }[];
351
627
  quota: {
352
628
  mauLimit: number | null;
353
629
  tokenLimit: number | null;
@@ -369,7 +645,65 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
369
645
  organizationsEnabled: boolean;
370
646
  ssoEnabled: boolean;
371
647
  thirdPartyApplicationsLimit: number | null;
648
+ tenantMembersLimit: number | null;
649
+ customJwtEnabled: boolean;
650
+ subjectTokenEnabled: boolean;
651
+ bringYourUiEnabled: boolean;
372
652
  };
653
+ stripeProducts: {
654
+ type: "flat" | "tier1" | "tier2" | "tier3";
655
+ id: string;
656
+ name: string;
657
+ price: {
658
+ id: string;
659
+ unitAmountDecimal: string;
660
+ quantity?: 1 | undefined;
661
+ unitAmount?: number | null | undefined;
662
+ };
663
+ description?: string | undefined;
664
+ }[];
665
+ }[]>;
666
+ };
667
+ post: {};
668
+ put: {};
669
+ delete: {};
670
+ copy: {};
671
+ head: {};
672
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
673
+ patch: {};
674
+ options: {};
675
+ get: {
676
+ "/skus": import("@withtyped/server").PathGuard<"/", {
677
+ type?: LogtoSkuType | undefined;
678
+ }, unknown, {
679
+ type: LogtoSkuType;
680
+ id: string;
681
+ name: string | null;
682
+ quota: {
683
+ mauLimit?: number | null | undefined;
684
+ tokenLimit?: number | null | undefined;
685
+ applicationsLimit?: number | null | undefined;
686
+ machineToMachineLimit?: number | null | undefined;
687
+ resourcesLimit?: number | null | undefined;
688
+ scopesPerResourceLimit?: number | null | undefined;
689
+ socialConnectorsLimit?: number | null | undefined;
690
+ machineToMachineRolesLimit?: number | null | undefined;
691
+ scopesPerRoleLimit?: number | null | undefined;
692
+ hooksLimit?: number | null | undefined;
693
+ auditLogsRetentionDays?: number | null | undefined;
694
+ mfaEnabled?: boolean | undefined;
695
+ organizationsEnabled?: boolean | undefined;
696
+ thirdPartyApplicationsLimit?: number | null | undefined;
697
+ tenantMembersLimit?: number | null | undefined;
698
+ customJwtEnabled?: boolean | undefined;
699
+ subjectTokenEnabled?: boolean | undefined;
700
+ bringYourUiEnabled?: boolean | undefined;
701
+ userRolesLimit?: number | null | undefined;
702
+ enterpriseSsoLimit?: number | null | undefined;
703
+ };
704
+ createdAt: Date;
705
+ updatedAt: Date;
706
+ unitPrice: number | null;
373
707
  }[]>;
374
708
  };
375
709
  post: {};
@@ -389,6 +723,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
389
723
  tenantId: string | null;
390
724
  updatedAt: Date;
391
725
  planId: string;
726
+ skuId: string | null;
392
727
  }>;
393
728
  };
394
729
  post: {
@@ -396,9 +731,11 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
396
731
  planId: string;
397
732
  successCallbackUrl: string;
398
733
  tenantId?: string | undefined;
399
- cancelCallbackUrl?: string | undefined;
400
- tenantTag?: TenantTag | undefined;
734
+ skuId?: string | undefined;
401
735
  tenantName?: string | undefined;
736
+ tenantTag?: TenantTag | undefined;
737
+ tenantRegionName?: RegionName | undefined;
738
+ cancelCallbackUrl?: string | undefined;
402
739
  }, {
403
740
  sessionId: string;
404
741
  redirectUri?: string | null | undefined;
@@ -482,15 +819,15 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
482
819
  status: OrganizationInvitationStatus;
483
820
  tenantId: string;
484
821
  updatedAt: number;
485
- organizationId: string;
486
822
  inviterId: string | null;
487
823
  invitee: string;
488
- expiresAt: number;
489
824
  acceptedUserId: string | null;
825
+ organizationId: string;
826
+ expiresAt: number;
490
827
  organizationRoles: OrganizationRoleEntity[];
491
828
  } & {
492
- tenantTag: TenantTag;
493
829
  tenantName: string;
830
+ tenantTag: TenantTag;
494
831
  })[]>;
495
832
  } & {
496
833
  "/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:invitationId", unknown, unknown, {
@@ -499,11 +836,11 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
499
836
  status: OrganizationInvitationStatus;
500
837
  tenantId: string;
501
838
  updatedAt: number;
502
- organizationId: string;
503
839
  inviterId: string | null;
504
840
  invitee: string;
505
- expiresAt: number;
506
841
  acceptedUserId: string | null;
842
+ organizationId: string;
843
+ expiresAt: number;
507
844
  organizationRoles: OrganizationRoleEntity[];
508
845
  }>;
509
846
  };
@@ -512,9 +849,21 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
512
849
  delete: {};
513
850
  copy: {};
514
851
  head: {};
852
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
853
+ patch: {};
854
+ options: {};
855
+ get: {};
856
+ post: {};
857
+ put: {};
858
+ delete: {
859
+ "/me": import("@withtyped/server").PathGuard<"/", unknown, unknown, unknown>;
860
+ };
861
+ copy: {};
862
+ head: {};
515
863
  }, "/api">>, "/api">;
516
864
  export declare const tenantAuthRouter: import("@withtyped/server").Router<RequestContext, import("@withtyped/server").WithBodyContext<import("@withtyped/server").BaseContext & {
517
865
  request: {
866
+ id?: string | undefined;
518
867
  method?: import("@withtyped/server").RequestMethod | undefined;
519
868
  headers: import("http").IncomingHttpHeaders;
520
869
  url: URL;
@@ -530,11 +879,11 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
530
879
  status: OrganizationInvitationStatus;
531
880
  tenantId: string;
532
881
  updatedAt: number;
533
- organizationId: string;
534
882
  inviterId: string | null;
535
883
  invitee: string;
536
- expiresAt: number;
537
884
  acceptedUserId: string | null;
885
+ organizationId: string;
886
+ expiresAt: number;
538
887
  organizationRoles: OrganizationRoleEntity[];
539
888
  }>;
540
889
  };
@@ -549,6 +898,8 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
549
898
  avatar: string | null;
550
899
  organizationRoles: OrganizationRoleEntity[];
551
900
  }[]>;
901
+ } & {
902
+ "/:tenantId/members/:userId/scopes": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/scopes", unknown, unknown, OrganizationScope[]>;
552
903
  } & {
553
904
  "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, unknown, ({
554
905
  id: string;
@@ -556,11 +907,11 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
556
907
  status: OrganizationInvitationStatus;
557
908
  tenantId: string;
558
909
  updatedAt: number;
559
- organizationId: string;
560
910
  inviterId: string | null;
561
911
  invitee: string;
562
- expiresAt: number;
563
912
  acceptedUserId: string | null;
913
+ organizationId: string;
914
+ expiresAt: number;
564
915
  organizationRoles: OrganizationRoleEntity[];
565
916
  } & {
566
917
  inviterName?: string | undefined;
@@ -568,7 +919,7 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
568
919
  };
569
920
  post: {
570
921
  "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
571
- invitee: string;
922
+ invitee: string | string[];
572
923
  roleName: TenantRole;
573
924
  expiresAt?: number | undefined;
574
925
  }, {
@@ -577,13 +928,25 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
577
928
  status: OrganizationInvitationStatus;
578
929
  tenantId: string;
579
930
  updatedAt: number;
580
- organizationId: string;
581
931
  inviterId: string | null;
582
932
  invitee: string;
933
+ acceptedUserId: string | null;
934
+ organizationId: string;
583
935
  expiresAt: number;
936
+ organizationRoles: OrganizationRoleEntity[];
937
+ } | {
938
+ id: string;
939
+ createdAt: number;
940
+ status: OrganizationInvitationStatus;
941
+ tenantId: string;
942
+ updatedAt: number;
943
+ inviterId: string | null;
944
+ invitee: string;
584
945
  acceptedUserId: string | null;
946
+ organizationId: string;
947
+ expiresAt: number;
585
948
  organizationRoles: OrganizationRoleEntity[];
586
- }>;
949
+ }[]>;
587
950
  } & {
588
951
  "/:tenantId/invitations/:invitationId/message": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/message", unknown, unknown, unknown>;
589
952
  };
@@ -600,35 +963,6 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
600
963
  copy: {};
601
964
  head: {};
602
965
  }, "/api/tenants">>, "/api/tenants">;
603
- export declare const functionsRouter: import("@withtyped/server").Router<RequestContext, WithAuthContext<Omit<import("@withtyped/server").BaseContext & {
604
- request: {
605
- method?: import("@withtyped/server").RequestMethod | undefined;
606
- headers: import("http").IncomingHttpHeaders;
607
- url: URL;
608
- body?: unknown;
609
- };
610
- }, "request"> & {
611
- request: Record<string, unknown> & {
612
- method?: import("@withtyped/server").RequestMethod | undefined;
613
- headers: import("http").IncomingHttpHeaders;
614
- url: URL;
615
- body?: unknown;
616
- } & {
617
- body?: Json | undefined;
618
- bodyRaw?: Buffer | undefined;
619
- };
620
- }>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
621
- patch: {};
622
- options: {};
623
- get: {};
624
- post: {
625
- "/database-alteration": import("@withtyped/server").PathGuard<"/database-alteration", unknown, Json, unknown>;
626
- };
627
- put: {};
628
- delete: {};
629
- copy: {};
630
- head: {};
631
- }, "/functions">>, "/functions">;
632
966
 
633
967
  export {
634
968
  router as default,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/cloud",
3
- "version": "0.2.5-6c090b2",
3
+ "version": "0.2.5-708b3e3",
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",