@logto/cloud 0.2.5-4f1d80b → 0.2.5-70aa370
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.
- package/build/routes/index.d.ts +146 -78
- package/package.json +4 -1
package/build/routes/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v8.0.1
|
|
2
2
|
|
|
3
3
|
import { RequestContext } from '@withtyped/server';
|
|
4
|
+
import { InferModelType } from '@withtyped/server/model';
|
|
4
5
|
|
|
5
6
|
export type WithAuthContext<Context = RequestContext> = Context & {
|
|
6
7
|
auth: {
|
|
@@ -23,16 +24,33 @@ declare enum VerificationCodeType {
|
|
|
23
24
|
/** @deprecated Use `Generic` type template for sending test sms/email use case */
|
|
24
25
|
Test = "Test"
|
|
25
26
|
}
|
|
26
|
-
declare const
|
|
27
|
+
declare const AffiliateProperties: import("@withtyped/server/model").default<"affiliate_properties", {
|
|
28
|
+
createdAt: Date;
|
|
29
|
+
affiliateId: string;
|
|
30
|
+
type: "hostname" | "query";
|
|
31
|
+
value: string;
|
|
32
|
+
}, "createdAt", "createdAt">;
|
|
33
|
+
export type AffiliateProperty = InferModelType<typeof AffiliateProperties>;
|
|
34
|
+
declare const Affiliates: import("@withtyped/server/model").default<"affiliates", {
|
|
35
|
+
id: string;
|
|
36
|
+
createdAt: Date;
|
|
37
|
+
name: string;
|
|
38
|
+
}, "createdAt" | "id", "createdAt" | "id">;
|
|
39
|
+
export type Affiliate = InferModelType<typeof Affiliates>;
|
|
40
|
+
export type AffiliateData = Affiliate & {
|
|
41
|
+
properties: Array<Pick<AffiliateProperty, "type" | "value">>;
|
|
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").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
|
|
27
44
|
options: {};
|
|
28
45
|
patch: {
|
|
29
46
|
"/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
|
|
30
47
|
name?: string | undefined;
|
|
31
48
|
tag?: TenantTag | undefined;
|
|
32
49
|
}, {
|
|
33
|
-
name: string;
|
|
34
50
|
id: string;
|
|
51
|
+
name: string;
|
|
35
52
|
indicator: string;
|
|
53
|
+
planId: string;
|
|
36
54
|
tag: TenantTag;
|
|
37
55
|
}>;
|
|
38
56
|
};
|
|
@@ -41,82 +59,46 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
41
59
|
id: string;
|
|
42
60
|
name: string;
|
|
43
61
|
indicator: string;
|
|
62
|
+
planId: string;
|
|
44
63
|
tag: TenantTag;
|
|
45
|
-
subscriptionPlan: {
|
|
46
|
-
id: string;
|
|
47
|
-
name: string;
|
|
48
|
-
quota: {
|
|
49
|
-
mauLimit: number | null;
|
|
50
|
-
applicationsLimit: number;
|
|
51
|
-
machineToMachineLimit: number;
|
|
52
|
-
resourcesLimit: number;
|
|
53
|
-
scopesPerResourceLimit: number;
|
|
54
|
-
customDomainEnabled: boolean;
|
|
55
|
-
omniSignInEnabled: boolean;
|
|
56
|
-
builtInEmailConnectorEnabled: boolean;
|
|
57
|
-
socialConnectorsLimit: number | null;
|
|
58
|
-
standardConnectorsLimit: number;
|
|
59
|
-
rolesLimit: number;
|
|
60
|
-
scopesPerRoleLimit: number | null;
|
|
61
|
-
hooksLimit: number;
|
|
62
|
-
auditLogsRetentionDays: number;
|
|
63
|
-
};
|
|
64
|
-
stripeProducts: {
|
|
65
|
-
description?: string | undefined;
|
|
66
|
-
id: string;
|
|
67
|
-
name: string;
|
|
68
|
-
type: "flat" | "tier1" | "tier2" | "tier3";
|
|
69
|
-
price: {
|
|
70
|
-
quantity?: 1 | undefined;
|
|
71
|
-
unitAmount?: number | null | undefined;
|
|
72
|
-
id: string;
|
|
73
|
-
unitAmountDecimal: string;
|
|
74
|
-
};
|
|
75
|
-
}[];
|
|
76
|
-
createdAt: Date;
|
|
77
|
-
updatedAt: Date;
|
|
78
|
-
};
|
|
79
64
|
}[]>;
|
|
80
65
|
} & {
|
|
81
|
-
"/tenants/my": import("@withtyped/server").PathGuard<"/my", unknown, unknown, {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
socialConnectorsLimit: number | null;
|
|
99
|
-
standardConnectorsLimit: number;
|
|
100
|
-
rolesLimit: number;
|
|
101
|
-
scopesPerRoleLimit: number | null;
|
|
102
|
-
hooksLimit: number;
|
|
103
|
-
auditLogsRetentionDays: number;
|
|
104
|
-
};
|
|
105
|
-
stripeProducts: {
|
|
106
|
-
description?: string | undefined;
|
|
107
|
-
id: string;
|
|
108
|
-
name: string;
|
|
109
|
-
type: "flat" | "tier1" | "tier2" | "tier3";
|
|
110
|
-
price: {
|
|
111
|
-
quantity?: 1 | undefined;
|
|
112
|
-
unitAmount?: number | null | undefined;
|
|
113
|
-
id: string;
|
|
114
|
-
unitAmountDecimal: string;
|
|
115
|
-
};
|
|
116
|
-
}[];
|
|
66
|
+
"/tenants/my/subscription": import("@withtyped/server").PathGuard<"/my/subscription", unknown, unknown, {
|
|
67
|
+
status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
|
|
68
|
+
planId: string;
|
|
69
|
+
currentPeriodStart: Date;
|
|
70
|
+
currentPeriodEnd: Date;
|
|
71
|
+
}>;
|
|
72
|
+
} & {
|
|
73
|
+
"/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
|
|
74
|
+
status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
|
|
75
|
+
planId: string;
|
|
76
|
+
currentPeriodStart: Date;
|
|
77
|
+
currentPeriodEnd: Date;
|
|
78
|
+
}>;
|
|
79
|
+
} & {
|
|
80
|
+
"/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
|
|
81
|
+
invoices: {
|
|
82
|
+
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
117
83
|
createdAt: Date;
|
|
84
|
+
id: string;
|
|
118
85
|
updatedAt: Date;
|
|
119
|
-
|
|
86
|
+
customerId: string | null;
|
|
87
|
+
billingReason: string | null;
|
|
88
|
+
periodStart: Date;
|
|
89
|
+
periodEnd: Date;
|
|
90
|
+
amountDue: number;
|
|
91
|
+
amountPaid: number;
|
|
92
|
+
subscriptionId: string | null;
|
|
93
|
+
hostedInvoiceUrl: string | null;
|
|
94
|
+
invoicePdf: string | null;
|
|
95
|
+
planName: string | null;
|
|
96
|
+
}[];
|
|
97
|
+
}>;
|
|
98
|
+
} & {
|
|
99
|
+
"/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
|
|
100
|
+
activeUsers: number;
|
|
101
|
+
cost: number;
|
|
120
102
|
}>;
|
|
121
103
|
};
|
|
122
104
|
post: {
|
|
@@ -124,15 +106,24 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
124
106
|
name?: string | undefined;
|
|
125
107
|
tag?: TenantTag | undefined;
|
|
126
108
|
}, {
|
|
127
|
-
name: string;
|
|
128
109
|
id: string;
|
|
110
|
+
name: string;
|
|
129
111
|
indicator: string;
|
|
112
|
+
planId: string;
|
|
130
113
|
tag: TenantTag;
|
|
131
114
|
}>;
|
|
115
|
+
} & {
|
|
116
|
+
"/tenants/:tenantId/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:tenantId/stripe-customer-portal", unknown, {
|
|
117
|
+
callbackUrl?: string | undefined;
|
|
118
|
+
} | undefined, {
|
|
119
|
+
redirectUri: string;
|
|
120
|
+
}>;
|
|
132
121
|
};
|
|
133
122
|
put: {};
|
|
134
123
|
head: {};
|
|
135
124
|
delete: {
|
|
125
|
+
"/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, unknown>;
|
|
126
|
+
} & {
|
|
136
127
|
"/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, unknown, unknown>;
|
|
137
128
|
};
|
|
138
129
|
copy: {};
|
|
@@ -142,7 +133,9 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
142
133
|
get: {
|
|
143
134
|
"/services/mails/usage": import("@withtyped/server").PathGuard<"/mails/usage", {
|
|
144
135
|
from?: string | undefined;
|
|
145
|
-
}, unknown,
|
|
136
|
+
}, unknown, {
|
|
137
|
+
count: number;
|
|
138
|
+
}>;
|
|
146
139
|
};
|
|
147
140
|
post: {
|
|
148
141
|
"/services/send-email": import("@withtyped/server").PathGuard<"/send-email", unknown, {
|
|
@@ -193,6 +186,7 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
193
186
|
patch: {};
|
|
194
187
|
get: {
|
|
195
188
|
"/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
|
|
189
|
+
createdAt: Date;
|
|
196
190
|
id: string;
|
|
197
191
|
name: string;
|
|
198
192
|
quota: {
|
|
@@ -213,9 +207,9 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
213
207
|
};
|
|
214
208
|
stripeProducts: {
|
|
215
209
|
description?: string | undefined;
|
|
210
|
+
type: "flat" | "tier1" | "tier2" | "tier3";
|
|
216
211
|
id: string;
|
|
217
212
|
name: string;
|
|
218
|
-
type: "flat" | "tier1" | "tier2" | "tier3";
|
|
219
213
|
price: {
|
|
220
214
|
quantity?: 1 | undefined;
|
|
221
215
|
unitAmount?: number | null | undefined;
|
|
@@ -223,7 +217,6 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
223
217
|
unitAmountDecimal: string;
|
|
224
218
|
};
|
|
225
219
|
}[];
|
|
226
|
-
createdAt: Date;
|
|
227
220
|
updatedAt: Date;
|
|
228
221
|
}[]>;
|
|
229
222
|
};
|
|
@@ -235,15 +228,90 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
235
228
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
236
229
|
options: {};
|
|
237
230
|
patch: {};
|
|
238
|
-
get: {
|
|
231
|
+
get: {
|
|
232
|
+
"/checkout-session/:id": import("@withtyped/server").PathGuard<"/:id", unknown, unknown, {
|
|
233
|
+
status: "open" | "complete" | "expired";
|
|
234
|
+
createdAt: Date;
|
|
235
|
+
id: string;
|
|
236
|
+
userId: string;
|
|
237
|
+
updatedAt: Date;
|
|
238
|
+
tenantId: string | null;
|
|
239
|
+
planId: string;
|
|
240
|
+
}>;
|
|
241
|
+
};
|
|
239
242
|
post: {
|
|
240
243
|
"/checkout-session": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
241
244
|
tenantId?: string | undefined;
|
|
245
|
+
tenantTag?: TenantTag | undefined;
|
|
246
|
+
tenantName?: string | undefined;
|
|
242
247
|
cancelCallbackUrl?: string | undefined;
|
|
243
248
|
planId: string;
|
|
244
249
|
successCallbackUrl: string;
|
|
250
|
+
}, {
|
|
251
|
+
redirectUri?: string | null | undefined;
|
|
252
|
+
sessionId: string;
|
|
253
|
+
}>;
|
|
254
|
+
};
|
|
255
|
+
put: {};
|
|
256
|
+
head: {};
|
|
257
|
+
delete: {};
|
|
258
|
+
copy: {};
|
|
259
|
+
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
260
|
+
options: {};
|
|
261
|
+
patch: {};
|
|
262
|
+
get: {
|
|
263
|
+
"/affiliates": import("@withtyped/server").PathGuard<"/", unknown, unknown, AffiliateData[]>;
|
|
264
|
+
};
|
|
265
|
+
post: {
|
|
266
|
+
"/affiliates": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
267
|
+
name: string;
|
|
268
|
+
}, {
|
|
269
|
+
createdAt: Date;
|
|
270
|
+
id: string;
|
|
271
|
+
name: string;
|
|
272
|
+
}>;
|
|
273
|
+
} & {
|
|
274
|
+
"/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
|
|
275
|
+
value: string;
|
|
276
|
+
type: "hostname" | "query";
|
|
277
|
+
}, {
|
|
278
|
+
value: string;
|
|
279
|
+
type: "hostname" | "query";
|
|
280
|
+
createdAt: Date;
|
|
281
|
+
affiliateId: string;
|
|
282
|
+
}>;
|
|
283
|
+
};
|
|
284
|
+
put: {};
|
|
285
|
+
head: {};
|
|
286
|
+
delete: {
|
|
287
|
+
"/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
|
|
288
|
+
value: string;
|
|
289
|
+
type: "hostname" | "query";
|
|
245
290
|
}, unknown>;
|
|
246
291
|
};
|
|
292
|
+
copy: {};
|
|
293
|
+
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
294
|
+
options: {};
|
|
295
|
+
patch: {};
|
|
296
|
+
get: {};
|
|
297
|
+
post: {
|
|
298
|
+
"/affiliate-logs": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
299
|
+
hostname?: string | undefined;
|
|
300
|
+
query?: string | undefined;
|
|
301
|
+
createdAt: string;
|
|
302
|
+
userId: string;
|
|
303
|
+
}, {
|
|
304
|
+
createdAt: Date;
|
|
305
|
+
id: string;
|
|
306
|
+
affiliateId: string | null;
|
|
307
|
+
userId: string;
|
|
308
|
+
createdVia: {
|
|
309
|
+
hostname?: string | undefined;
|
|
310
|
+
query?: string | undefined;
|
|
311
|
+
createdAt: string;
|
|
312
|
+
};
|
|
313
|
+
}>;
|
|
314
|
+
};
|
|
247
315
|
put: {};
|
|
248
316
|
head: {};
|
|
249
317
|
delete: {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logto/cloud",
|
|
3
|
-
"version": "0.2.5-
|
|
3
|
+
"version": "0.2.5-70aa370",
|
|
4
4
|
"description": "Logto Cloud service.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
|
@@ -38,6 +38,9 @@
|
|
|
38
38
|
},
|
|
39
39
|
"eslintConfig": {
|
|
40
40
|
"extends": "@silverhand",
|
|
41
|
+
"rules": {
|
|
42
|
+
"no-console": "error"
|
|
43
|
+
},
|
|
41
44
|
"ignorePatterns": [
|
|
42
45
|
"types.test.ts"
|
|
43
46
|
]
|