@logto/cloud 0.2.5-81f06ea → 0.2.5-821690c

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.
@@ -37,6 +37,20 @@ 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
+ };
50
+ declare enum LogtoJwtTokenKeyType {
51
+ AccessToken = "access-token",
52
+ ClientCredentials = "client-credentials"
53
+ }
40
54
  /**
41
55
  * The simplified organization role entity that is returned in the `roles` field
42
56
  * of the organization.
@@ -52,8 +66,8 @@ declare enum TenantTag {
52
66
  declare enum TenantRole {
53
67
  /** Admin of the tenant, who has all permissions. */
54
68
  Admin = "admin",
55
- /** Member of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
56
- Member = "member"
69
+ /** Collaborator of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
70
+ Collaborator = "collaborator"
57
71
  }
58
72
  declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
59
73
  createdAt: Date;
@@ -308,13 +322,32 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
308
322
  } & {
309
323
  "/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", unknown, {
310
324
  script: string;
325
+ tokenType: LogtoJwtTokenKeyType.AccessToken;
311
326
  token: Record<string, Json>;
312
- envVars?: Record<string, string> | undefined;
313
- context?: Record<string, Json> | undefined;
327
+ context: Record<string, Json>;
328
+ environmentVariables?: Record<string, string> | undefined;
329
+ } | {
330
+ script: string;
331
+ tokenType: LogtoJwtTokenKeyType.ClientCredentials;
332
+ token: Record<string, Json>;
333
+ environmentVariables?: Record<string, string> | undefined;
314
334
  }, Record<string, unknown>>;
315
335
  };
316
- put: {};
317
- delete: {};
336
+ put: {
337
+ "/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, {
338
+ production?: {
339
+ "jwt.accessToken"?: string | undefined;
340
+ "jwt.clientCredentials"?: string | undefined;
341
+ } | undefined;
342
+ test?: {
343
+ "jwt.accessToken"?: string | undefined;
344
+ "jwt.clientCredentials"?: string | undefined;
345
+ } | undefined;
346
+ }, unknown>;
347
+ };
348
+ delete: {
349
+ "/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, unknown, unknown>;
350
+ };
318
351
  copy: {};
319
352
  head: {};
320
353
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
@@ -359,6 +392,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
359
392
  organizationsEnabled: boolean;
360
393
  ssoEnabled: boolean;
361
394
  thirdPartyApplicationsLimit: number | null;
395
+ tenantMembersLimit: number | null;
396
+ customJwtEnabled: boolean;
362
397
  };
363
398
  }[]>;
364
399
  };
@@ -472,11 +507,11 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
472
507
  status: OrganizationInvitationStatus;
473
508
  tenantId: string;
474
509
  updatedAt: number;
475
- organizationId: string;
476
510
  inviterId: string | null;
477
511
  invitee: string;
478
- expiresAt: number;
479
512
  acceptedUserId: string | null;
513
+ organizationId: string;
514
+ expiresAt: number;
480
515
  organizationRoles: OrganizationRoleEntity[];
481
516
  } & {
482
517
  tenantTag: TenantTag;
@@ -489,11 +524,11 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
489
524
  status: OrganizationInvitationStatus;
490
525
  tenantId: string;
491
526
  updatedAt: number;
492
- organizationId: string;
493
527
  inviterId: string | null;
494
528
  invitee: string;
495
- expiresAt: number;
496
529
  acceptedUserId: string | null;
530
+ organizationId: string;
531
+ expiresAt: number;
497
532
  organizationRoles: OrganizationRoleEntity[];
498
533
  }>;
499
534
  };
@@ -520,11 +555,11 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
520
555
  status: OrganizationInvitationStatus;
521
556
  tenantId: string;
522
557
  updatedAt: number;
523
- organizationId: string;
524
558
  inviterId: string | null;
525
559
  invitee: string;
526
- expiresAt: number;
527
560
  acceptedUserId: string | null;
561
+ organizationId: string;
562
+ expiresAt: number;
528
563
  organizationRoles: OrganizationRoleEntity[];
529
564
  }>;
530
565
  };
@@ -540,19 +575,23 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
540
575
  organizationRoles: OrganizationRoleEntity[];
541
576
  }[]>;
542
577
  } & {
543
- "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, unknown, {
578
+ "/:tenantId/members/:userId/scopes": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/scopes", unknown, unknown, OrganizationScope[]>;
579
+ } & {
580
+ "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, unknown, ({
544
581
  id: string;
545
582
  createdAt: number;
546
583
  status: OrganizationInvitationStatus;
547
584
  tenantId: string;
548
585
  updatedAt: number;
549
- organizationId: string;
550
586
  inviterId: string | null;
551
587
  invitee: string;
552
- expiresAt: number;
553
588
  acceptedUserId: string | null;
589
+ organizationId: string;
590
+ expiresAt: number;
554
591
  organizationRoles: OrganizationRoleEntity[];
555
- }[]>;
592
+ } & {
593
+ inviterName?: string | undefined;
594
+ })[]>;
556
595
  };
557
596
  post: {
558
597
  "/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
@@ -565,11 +604,11 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
565
604
  status: OrganizationInvitationStatus;
566
605
  tenantId: string;
567
606
  updatedAt: number;
568
- organizationId: string;
569
607
  inviterId: string | null;
570
608
  invitee: string;
571
- expiresAt: number;
572
609
  acceptedUserId: string | null;
610
+ organizationId: string;
611
+ expiresAt: number;
573
612
  organizationRoles: OrganizationRoleEntity[];
574
613
  }>;
575
614
  } & {
@@ -588,35 +627,6 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
588
627
  copy: {};
589
628
  head: {};
590
629
  }, "/api/tenants">>, "/api/tenants">;
591
- export declare const functionsRouter: import("@withtyped/server").Router<RequestContext, WithAuthContext<Omit<import("@withtyped/server").BaseContext & {
592
- request: {
593
- method?: import("@withtyped/server").RequestMethod | undefined;
594
- headers: import("http").IncomingHttpHeaders;
595
- url: URL;
596
- body?: unknown;
597
- };
598
- }, "request"> & {
599
- request: Record<string, unknown> & {
600
- method?: import("@withtyped/server").RequestMethod | undefined;
601
- headers: import("http").IncomingHttpHeaders;
602
- url: URL;
603
- body?: unknown;
604
- } & {
605
- body?: Json | undefined;
606
- bodyRaw?: Buffer | undefined;
607
- };
608
- }>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
609
- patch: {};
610
- options: {};
611
- get: {};
612
- post: {
613
- "/database-alteration": import("@withtyped/server").PathGuard<"/database-alteration", unknown, Json, unknown>;
614
- };
615
- put: {};
616
- delete: {};
617
- copy: {};
618
- head: {};
619
- }, "/functions">>, "/functions">;
620
630
 
621
631
  export {
622
632
  router as default,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/cloud",
3
- "version": "0.2.5-81f06ea",
3
+ "version": "0.2.5-821690c",
4
4
  "description": "Logto Cloud service.",
5
5
  "main": "build/index.js",
6
6
  "author": "Silverhand Inc. <contact@silverhand.io>",