@logto/cloud 0.2.5-bf6e59e → 0.2.5-c1f6f94

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.
@@ -3,14 +3,23 @@
3
3
  import { Json, JsonObject, RequestContext } from '@withtyped/server';
4
4
  import { InferModelType } from '@withtyped/server/model';
5
5
 
6
- export type WithAuthContext<Context = RequestContext> = Context & {
7
- auth: {
8
- /** The ID of the authenticated subject (`sub`). */
9
- id: string;
10
- /** The scopes that the subject has (`scope`). */
11
- scopes: string[];
12
- };
13
- };
6
+ declare const availableReportableUsageKeys: readonly [
7
+ "tokenLimit",
8
+ "machineToMachineLimit",
9
+ "resourcesLimit",
10
+ "enterpriseSsoLimit",
11
+ "hooksLimit",
12
+ "tenantMembersLimit",
13
+ "mfaEnabled",
14
+ "organizationsEnabled",
15
+ "organizationsLimit"
16
+ ];
17
+ export type ReportableUsageKey = (typeof availableReportableUsageKeys)[number];
18
+ export type RealtimeReportableUsageKey = Exclude<ReportableUsageKey, "tokenLimit">;
19
+ declare enum LogtoSkuType {
20
+ Basic = "Basic",
21
+ AddOn = "AddOn"
22
+ }
14
23
  declare enum TemplateType {
15
24
  /** The template for sending verification code when user is signing in. */
16
25
  SignIn = "SignIn",
@@ -65,23 +74,6 @@ declare enum TenantRole {
65
74
  /** Collaborator of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
66
75
  Collaborator = "collaborator"
67
76
  }
68
- declare const availableReportableUsageKeys: readonly [
69
- "tokenLimit",
70
- "machineToMachineLimit",
71
- "resourcesLimit",
72
- "enterpriseSsoLimit",
73
- "hooksLimit",
74
- "tenantMembersLimit",
75
- "mfaEnabled",
76
- "organizationsEnabled",
77
- "organizationsLimit"
78
- ];
79
- export type ReportableUsageKey = (typeof availableReportableUsageKeys)[number];
80
- export type RealtimeReportableUsageKey = Exclude<ReportableUsageKey, "tokenLimit">;
81
- declare enum LogtoSkuType {
82
- Basic = "Basic",
83
- AddOn = "AddOn"
84
- }
85
77
  declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
86
78
  createdAt: Date;
87
79
  affiliateId: string;
@@ -99,8 +91,27 @@ declare enum RegionName {
99
91
  EU = "EU",
100
92
  US = "US",
101
93
  AU = "AU",
94
+ JP = "JP",
102
95
  CrescLabJP = "CRESCLAB_JP"
103
96
  }
97
+ declare const publicRegionNames: readonly [
98
+ "EU",
99
+ "US",
100
+ "AU",
101
+ "JP"
102
+ ];
103
+ /**
104
+ * The type of region names for the public cloud.
105
+ */
106
+ export type PublicRegionName = (typeof publicRegionNames)[number];
107
+ export type WithAuthContext<Context = RequestContext> = Context & {
108
+ auth: {
109
+ /** The ID of the authenticated subject (`sub`). */
110
+ id: string;
111
+ /** The scopes that the subject has (`scope`). */
112
+ scopes: string[];
113
+ };
114
+ };
104
115
  export type AffiliateData = Affiliate & {
105
116
  properties: Array<Pick<AffiliateProperty, "type" | "value">>;
106
117
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/cloud",
3
- "version": "0.2.5-bf6e59e",
3
+ "version": "0.2.5-c1f6f94",
4
4
  "description": "Logto Cloud service.",
5
5
  "main": "build/index.js",
6
6
  "author": "Silverhand Inc. <contact@silverhand.io>",
@@ -21,7 +21,7 @@
21
21
  "@types/accepts": "^1.3.5",
22
22
  "@types/http-proxy": "^1.17.9",
23
23
  "@types/mime-types": "^2.1.1",
24
- "@types/node": "^20.0.0",
24
+ "@types/node": "^22.14.0",
25
25
  "@types/yargs": "^17.0.24",
26
26
  "dts-bundle-generator": "^9.3.1",
27
27
  "eslint": "^8.57.0",
@@ -30,10 +30,10 @@
30
30
  "prettier": "^3.0.0",
31
31
  "typescript": "^5.3.3",
32
32
  "vite-tsconfig-paths": "^5.0.0",
33
- "vitest": "^2.1.8"
33
+ "vitest": "^3.1.1"
34
34
  },
35
35
  "engines": {
36
- "node": "^20.9.0"
36
+ "node": "^22.14.0"
37
37
  },
38
38
  "eslintConfig": {
39
39
  "extends": "@silverhand",