@logto/cloud 0.2.5-25a9c6d → 0.2.5-4686b84

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,15 +32,15 @@ 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").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
44
44
  options: {};
45
45
  patch: {
46
46
  "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
@@ -74,9 +74,29 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
74
74
  currentPeriodStart: Date;
75
75
  currentPeriodEnd: Date;
76
76
  }>;
77
+ } & {
78
+ "/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
79
+ invoices: {
80
+ status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
81
+ createdAt: Date;
82
+ id: string;
83
+ updatedAt: Date;
84
+ customerId: string | null;
85
+ billingReason: string | null;
86
+ periodStart: Date;
87
+ periodEnd: Date;
88
+ amountDue: number;
89
+ amountPaid: number;
90
+ subscriptionId: string | null;
91
+ hostedInvoiceUrl: string | null;
92
+ invoicePdf: string | null;
93
+ planName: string | null;
94
+ }[];
95
+ }>;
77
96
  } & {
78
97
  "/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
79
98
  activeUsers: number;
99
+ cost: number;
80
100
  }>;
81
101
  };
82
102
  post: {
@@ -89,6 +109,12 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
89
109
  indicator: string;
90
110
  tag: TenantTag;
91
111
  }>;
112
+ } & {
113
+ "/tenants/:tenantId/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:tenantId/stripe-customer-portal", unknown, {
114
+ callbackUrl?: string | undefined;
115
+ } | undefined, {
116
+ redirectUri: string;
117
+ }>;
92
118
  };
93
119
  put: {};
94
120
  head: {};
@@ -104,7 +130,9 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
104
130
  get: {
105
131
  "/services/mails/usage": import("@withtyped/server").PathGuard<"/mails/usage", {
106
132
  from?: string | undefined;
107
- }, unknown, unknown>;
133
+ }, unknown, {
134
+ count: number;
135
+ }>;
108
136
  };
109
137
  post: {
110
138
  "/services/send-email": import("@withtyped/server").PathGuard<"/send-email", unknown, {
@@ -155,6 +183,7 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
155
183
  patch: {};
156
184
  get: {
157
185
  "/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
186
+ createdAt: Date;
158
187
  id: string;
159
188
  name: string;
160
189
  quota: {
@@ -175,9 +204,9 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
175
204
  };
176
205
  stripeProducts: {
177
206
  description?: string | undefined;
207
+ type: "flat" | "tier1" | "tier2" | "tier3";
178
208
  id: string;
179
209
  name: string;
180
- type: "flat" | "tier1" | "tier2" | "tier3";
181
210
  price: {
182
211
  quantity?: 1 | undefined;
183
212
  unitAmount?: number | null | undefined;
@@ -185,7 +214,6 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
185
214
  unitAmountDecimal: string;
186
215
  };
187
216
  }[];
188
- createdAt: Date;
189
217
  updatedAt: Date;
190
218
  }[]>;
191
219
  };
@@ -199,15 +227,13 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
199
227
  patch: {};
200
228
  get: {
201
229
  "/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
- };
230
+ status: "open" | "complete" | "expired";
231
+ createdAt: Date;
232
+ id: string;
233
+ userId: string;
234
+ updatedAt: Date;
235
+ tenantId: string | null;
236
+ planId: string;
211
237
  }>;
212
238
  };
213
239
  post: {
@@ -237,25 +263,56 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
237
263
  "/affiliates": import("@withtyped/server").PathGuard<"/", unknown, {
238
264
  name: string;
239
265
  }, {
266
+ createdAt: Date;
240
267
  id: string;
241
268
  name: string;
242
- createdAt: Date;
243
269
  }>;
244
270
  } & {
245
271
  "/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
272
+ value: string;
246
273
  type: "hostname" | "query";
274
+ }, {
247
275
  value: string;
248
- }, unknown>;
276
+ type: "hostname" | "query";
277
+ createdAt: Date;
278
+ affiliateId: string;
279
+ }>;
249
280
  };
250
281
  put: {};
251
282
  head: {};
252
283
  delete: {
253
284
  "/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
254
- type: "hostname" | "query";
255
285
  value: string;
286
+ type: "hostname" | "query";
256
287
  }, unknown>;
257
288
  };
258
289
  copy: {};
290
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
291
+ options: {};
292
+ patch: {};
293
+ get: {};
294
+ post: {
295
+ "/affiliate-logs": import("@withtyped/server").PathGuard<"/", unknown, {
296
+ hostname?: string | undefined;
297
+ query?: string | undefined;
298
+ createdAt: string;
299
+ userId: string;
300
+ }, {
301
+ createdAt: Date;
302
+ id: string;
303
+ affiliateId: string | null;
304
+ userId: string;
305
+ createdVia: {
306
+ hostname?: string | undefined;
307
+ query?: string | undefined;
308
+ createdAt: string;
309
+ };
310
+ }>;
311
+ };
312
+ put: {};
313
+ head: {};
314
+ delete: {};
315
+ copy: {};
259
316
  }, "/api">>, "/api">;
260
317
 
261
318
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/cloud",
3
- "version": "0.2.5-25a9c6d",
3
+ "version": "0.2.5-4686b84",
4
4
  "description": "Logto Cloud service.",
5
5
  "main": "build/index.js",
6
6
  "author": "Silverhand Inc. <contact@silverhand.io>",