@logto/cloud 0.2.5-25a9c6d → 0.2.5-33a6965

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.
@@ -32,35 +32,59 @@ declare const AffiliateProperties: import("@withtyped/server/model").default<"af
32
32
  }, "createdAt", "createdAt">;
33
33
  export type AffiliateProperty = InferModelType<typeof AffiliateProperties>;
34
34
  declare const Affiliates: import("@withtyped/server/model").default<"affiliates", {
35
- name: string;
36
- createdAt: Date;
37
35
  id: string;
38
- }, "id" | "createdAt", "id" | "createdAt">;
36
+ createdAt: Date;
37
+ name: string;
38
+ }, "createdAt" | "id", "createdAt" | "id">;
39
39
  export type Affiliate = InferModelType<typeof Affiliates>;
40
40
  export type AffiliateData = Affiliate & {
41
41
  properties: Array<Pick<AffiliateProperty, "type" | "value">>;
42
42
  };
43
- declare const router: import("@withtyped/server").Router<WithAuthContext, 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<{
43
+ declare const router: import("@withtyped/server").Router<WithAuthContext, 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<{
44
44
  options: {};
45
45
  patch: {
46
46
  "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
47
47
  name?: string | undefined;
48
48
  tag?: TenantTag | undefined;
49
49
  }, {
50
- name: string;
51
50
  id: string;
51
+ name: string;
52
52
  indicator: string;
53
+ planId: string;
53
54
  tag: TenantTag;
54
55
  }>;
55
56
  };
56
57
  get: {
57
58
  "/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
58
- name: string;
59
59
  id: string;
60
+ name: string;
60
61
  indicator: string;
62
+ planId: string;
61
63
  tag: TenantTag;
62
64
  }[]>;
63
- } & {
65
+ };
66
+ post: {
67
+ "/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
68
+ name?: string | undefined;
69
+ tag?: TenantTag | undefined;
70
+ }, {
71
+ id: string;
72
+ name: string;
73
+ indicator: string;
74
+ planId: string;
75
+ tag: TenantTag;
76
+ }>;
77
+ };
78
+ put: {};
79
+ head: {};
80
+ delete: {
81
+ "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, unknown, unknown>;
82
+ };
83
+ copy: {};
84
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
85
+ options: {};
86
+ patch: {};
87
+ get: {
64
88
  "/tenants/my/subscription": import("@withtyped/server").PathGuard<"/my/subscription", unknown, unknown, {
65
89
  status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
66
90
  planId: string;
@@ -74,28 +98,42 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
74
98
  currentPeriodStart: Date;
75
99
  currentPeriodEnd: Date;
76
100
  }>;
101
+ } & {
102
+ "/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
103
+ invoices: {
104
+ status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
105
+ createdAt: Date;
106
+ id: string;
107
+ updatedAt: Date;
108
+ customerId: string | null;
109
+ billingReason: string | null;
110
+ periodStart: Date;
111
+ periodEnd: Date;
112
+ amountDue: number;
113
+ amountPaid: number;
114
+ subscriptionId: string | null;
115
+ hostedInvoiceUrl: string | null;
116
+ invoicePdf: string | null;
117
+ planName: string | null;
118
+ }[];
119
+ }>;
77
120
  } & {
78
121
  "/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
79
122
  activeUsers: number;
123
+ cost: number;
80
124
  }>;
81
125
  };
82
126
  post: {
83
- "/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
84
- name?: string | undefined;
85
- tag?: TenantTag | undefined;
127
+ "/tenants/:tenantId/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:tenantId/stripe-customer-portal", unknown, {
128
+ callbackUrl?: string | undefined;
86
129
  }, {
87
- name: string;
88
- id: string;
89
- indicator: string;
90
- tag: TenantTag;
130
+ redirectUri: string;
91
131
  }>;
92
132
  };
93
133
  put: {};
94
134
  head: {};
95
135
  delete: {
96
136
  "/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, unknown>;
97
- } & {
98
- "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, unknown, unknown>;
99
137
  };
100
138
  copy: {};
101
139
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
@@ -104,22 +142,11 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
104
142
  get: {
105
143
  "/services/mails/usage": import("@withtyped/server").PathGuard<"/mails/usage", {
106
144
  from?: string | undefined;
107
- }, unknown, unknown>;
145
+ }, unknown, {
146
+ count: number;
147
+ }>;
108
148
  };
109
149
  post: {
110
- "/services/send-email": import("@withtyped/server").PathGuard<"/send-email", unknown, {
111
- data: {
112
- type: VerificationCodeType;
113
- to: string;
114
- payload: {
115
- senderName?: string | undefined;
116
- companyInformation?: string | undefined;
117
- appLogo?: string | undefined;
118
- code: string;
119
- };
120
- };
121
- }, unknown>;
122
- } & {
123
150
  "/services/mails": import("@withtyped/server").PathGuard<"/mails", unknown, {
124
151
  data: {
125
152
  type: VerificationCodeType;
@@ -155,29 +182,30 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
155
182
  patch: {};
156
183
  get: {
157
184
  "/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
185
+ createdAt: Date;
158
186
  id: string;
159
187
  name: string;
160
188
  quota: {
161
189
  mauLimit: number | null;
162
- applicationsLimit: number;
163
- machineToMachineLimit: number;
164
- resourcesLimit: number;
165
- scopesPerResourceLimit: number;
190
+ applicationsLimit: number | null;
191
+ machineToMachineLimit: number | null;
192
+ resourcesLimit: number | null;
193
+ scopesPerResourceLimit: number | null;
166
194
  customDomainEnabled: boolean;
167
195
  omniSignInEnabled: boolean;
168
196
  builtInEmailConnectorEnabled: boolean;
169
197
  socialConnectorsLimit: number | null;
170
- standardConnectorsLimit: number;
171
- rolesLimit: number;
198
+ standardConnectorsLimit: number | null;
199
+ rolesLimit: number | null;
172
200
  scopesPerRoleLimit: number | null;
173
- hooksLimit: number;
174
- auditLogsRetentionDays: number;
201
+ hooksLimit: number | null;
202
+ auditLogsRetentionDays: number | null;
175
203
  };
176
204
  stripeProducts: {
177
205
  description?: string | undefined;
206
+ type: "flat" | "tier1" | "tier2" | "tier3";
178
207
  id: string;
179
208
  name: string;
180
- type: "flat" | "tier1" | "tier2" | "tier3";
181
209
  price: {
182
210
  quantity?: 1 | undefined;
183
211
  unitAmount?: number | null | undefined;
@@ -185,7 +213,6 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
185
213
  unitAmountDecimal: string;
186
214
  };
187
215
  }[];
188
- createdAt: Date;
189
216
  updatedAt: Date;
190
217
  }[]>;
191
218
  };
@@ -199,15 +226,13 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
199
226
  patch: {};
200
227
  get: {
201
228
  "/checkout-session/:id": import("@withtyped/server").PathGuard<"/:id", unknown, unknown, {
202
- stripeCheckoutSession: {
203
- id: string;
204
- status: "open" | "complete" | "expired";
205
- createdAt: Date;
206
- updatedAt: Date;
207
- userId: string;
208
- tenantId: string | null;
209
- planId: string;
210
- };
229
+ status: "open" | "complete" | "expired";
230
+ createdAt: Date;
231
+ id: string;
232
+ userId: string;
233
+ updatedAt: Date;
234
+ tenantId: string | null;
235
+ planId: string;
211
236
  }>;
212
237
  };
213
238
  post: {
@@ -237,25 +262,56 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
237
262
  "/affiliates": import("@withtyped/server").PathGuard<"/", unknown, {
238
263
  name: string;
239
264
  }, {
265
+ createdAt: Date;
240
266
  id: string;
241
267
  name: string;
242
- createdAt: Date;
243
268
  }>;
244
269
  } & {
245
270
  "/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
271
+ value: string;
246
272
  type: "hostname" | "query";
273
+ }, {
247
274
  value: string;
248
- }, unknown>;
275
+ type: "hostname" | "query";
276
+ createdAt: Date;
277
+ affiliateId: string;
278
+ }>;
249
279
  };
250
280
  put: {};
251
281
  head: {};
252
282
  delete: {
253
283
  "/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
254
- type: "hostname" | "query";
255
284
  value: string;
285
+ type: "hostname" | "query";
256
286
  }, unknown>;
257
287
  };
258
288
  copy: {};
289
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
290
+ options: {};
291
+ patch: {};
292
+ get: {};
293
+ post: {
294
+ "/affiliate-logs": import("@withtyped/server").PathGuard<"/", unknown, {
295
+ hostname?: string | undefined;
296
+ query?: string | undefined;
297
+ createdAt: string;
298
+ userId: string;
299
+ }, {
300
+ createdAt: Date;
301
+ id: string;
302
+ affiliateId: string | null;
303
+ userId: string;
304
+ createdVia: {
305
+ hostname?: string | undefined;
306
+ query?: string | undefined;
307
+ createdAt: string;
308
+ };
309
+ }>;
310
+ };
311
+ put: {};
312
+ head: {};
313
+ delete: {};
314
+ copy: {};
259
315
  }, "/api">>, "/api">;
260
316
 
261
317
  export {
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@logto/cloud",
3
- "version": "0.2.5-25a9c6d",
3
+ "version": "0.2.5-33a6965",
4
4
  "description": "Logto Cloud service.",
5
5
  "main": "build/index.js",
6
6
  "author": "Silverhand Inc. <contact@silverhand.io>",
7
7
  "license": "Elastic-2.0",
8
8
  "type": "module",
9
9
  "files": [
10
- "build"
10
+ "lib"
11
11
  ],
12
12
  "exports": {
13
- "./routes": "./build/routes/index.js"
13
+ "./routes": "./lib/routes/index.js"
14
14
  },
15
15
  "imports": {
16
16
  "#src/*": "./build/*"
@@ -55,9 +55,9 @@
55
55
  },
56
56
  "scripts": {
57
57
  "precommit": "lint-staged",
58
- "build": "rm -rf build/ && tsc -p tsconfig.build.json",
58
+ "build": "rm -rf build/ && tsc -p tsconfig.build.json && pnpm build:lib",
59
59
  "//": "It is not used to build the service itself.",
60
- "build:lib": "rm -rf build/ && dts-bundle-generator src/routes/index.ts --project tsconfig.build.json -o build/routes/index.d.ts",
60
+ "build:lib": "rm -rf lib/ && dts-bundle-generator src/routes/index.ts --project tsconfig.build.json -o lib/routes/index.d.ts",
61
61
  "build:test": "rm -rf build/ && tsc -p tsconfig.test.json --sourcemap",
62
62
  "lint": "eslint --ext .ts src",
63
63
  "lint:report": "pnpm lint --format json --output-file report.json",