@logto/cloud 0.2.5-4d5e389 → 0.2.5-4ef0b45

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.
@@ -0,0 +1,464 @@
1
+ // Generated by dts-bundle-generator v9.3.1
2
+
3
+ import { Json, JsonObject, RequestContext } from '@withtyped/server';
4
+ import { InferModelType } from '@withtyped/server/model';
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
+ };
14
+ declare enum VerificationCodeType {
15
+ SignIn = "SignIn",
16
+ Register = "Register",
17
+ ForgotPassword = "ForgotPassword",
18
+ Generic = "Generic",
19
+ /** @deprecated Use `Generic` type template for sending test sms/email use case */
20
+ Test = "Test"
21
+ }
22
+ declare enum TemplateType {
23
+ /** The template for sending verification code when user is signing in. */
24
+ SignIn = "SignIn",
25
+ /** The template for sending verification code when user is registering. */
26
+ Register = "Register",
27
+ /** The template for sending verification code when user is resetting password. */
28
+ ForgotPassword = "ForgotPassword",
29
+ /** The template for sending organization invitation. */
30
+ OrganizationInvitation = "OrganizationInvitation",
31
+ /** The template for generic usage. */
32
+ Generic = "Generic"
33
+ }
34
+ declare enum TenantTag {
35
+ Development = "development",
36
+ Production = "production"
37
+ }
38
+ declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
39
+ createdAt: Date;
40
+ affiliateId: string;
41
+ type: "hostname" | "query";
42
+ value: string;
43
+ }, "createdAt", "createdAt">;
44
+ export type AffiliateProperty = InferModelType<typeof AffiliateProperties>;
45
+ declare const Affiliates: import("@withtyped/server/lib/model/index.js").default<"affiliates", {
46
+ id: string;
47
+ createdAt: Date;
48
+ name: string;
49
+ }, "createdAt" | "id", "createdAt" | "id">;
50
+ export type Affiliate = InferModelType<typeof Affiliates>;
51
+ export type AffiliateData = Affiliate & {
52
+ properties: Array<Pick<AffiliateProperty, "type" | "value">>;
53
+ };
54
+ declare const router: import("@withtyped/server").Router<RequestContext, WithAuthContext<Omit<import("@withtyped/server").BaseContext & {
55
+ request: {
56
+ method?: import("@withtyped/server").RequestMethod | undefined;
57
+ headers: import("http").IncomingHttpHeaders;
58
+ url: URL;
59
+ body?: unknown;
60
+ };
61
+ }, "request"> & {
62
+ request: Record<string, unknown> & {
63
+ method?: import("@withtyped/server").RequestMethod | undefined;
64
+ headers: import("http").IncomingHttpHeaders;
65
+ url: URL;
66
+ body?: unknown;
67
+ } & {
68
+ body?: Json | undefined;
69
+ bodyRaw?: Buffer | undefined;
70
+ };
71
+ }>, 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").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
72
+ options: {};
73
+ patch: {
74
+ "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
75
+ name?: string | undefined;
76
+ }, {
77
+ id: string;
78
+ name: string;
79
+ usage: {
80
+ activeUsers: number;
81
+ cost: number;
82
+ tokenUsage: number;
83
+ };
84
+ indicator: string;
85
+ isSuspended: boolean;
86
+ planId: string;
87
+ subscription: {
88
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
89
+ planId: string;
90
+ currentPeriodStart: Date;
91
+ currentPeriodEnd: Date;
92
+ };
93
+ tag: TenantTag;
94
+ openInvoices: {
95
+ status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
96
+ createdAt: Date;
97
+ id: string;
98
+ updatedAt: Date;
99
+ customerId: string | null;
100
+ billingReason: string | null;
101
+ periodStart: Date;
102
+ periodEnd: Date;
103
+ amountDue: number;
104
+ amountPaid: number;
105
+ subscriptionId: string | null;
106
+ hostedInvoiceUrl: string | null;
107
+ invoicePdf: string | null;
108
+ }[];
109
+ }>;
110
+ };
111
+ get: {
112
+ "/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
113
+ id: string;
114
+ name: string;
115
+ usage: {
116
+ activeUsers: number;
117
+ cost: number;
118
+ tokenUsage: number;
119
+ };
120
+ indicator: string;
121
+ isSuspended: boolean;
122
+ planId: string;
123
+ subscription: {
124
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
125
+ planId: string;
126
+ currentPeriodStart: Date;
127
+ currentPeriodEnd: Date;
128
+ };
129
+ tag: TenantTag;
130
+ openInvoices: {
131
+ status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
132
+ createdAt: Date;
133
+ id: string;
134
+ updatedAt: Date;
135
+ customerId: string | null;
136
+ billingReason: string | null;
137
+ periodStart: Date;
138
+ periodEnd: Date;
139
+ amountDue: number;
140
+ amountPaid: number;
141
+ subscriptionId: string | null;
142
+ hostedInvoiceUrl: string | null;
143
+ invoicePdf: string | null;
144
+ }[];
145
+ }[]>;
146
+ };
147
+ post: {
148
+ "/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
149
+ name?: string | undefined;
150
+ tag?: TenantTag | undefined;
151
+ }, {
152
+ id: string;
153
+ name: string;
154
+ usage: {
155
+ activeUsers: number;
156
+ cost: number;
157
+ tokenUsage: number;
158
+ };
159
+ indicator: string;
160
+ isSuspended: boolean;
161
+ planId: string;
162
+ subscription: {
163
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
164
+ planId: string;
165
+ currentPeriodStart: Date;
166
+ currentPeriodEnd: Date;
167
+ };
168
+ tag: TenantTag;
169
+ openInvoices: {
170
+ status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
171
+ createdAt: Date;
172
+ id: string;
173
+ updatedAt: Date;
174
+ customerId: string | null;
175
+ billingReason: string | null;
176
+ periodStart: Date;
177
+ periodEnd: Date;
178
+ amountDue: number;
179
+ amountPaid: number;
180
+ subscriptionId: string | null;
181
+ hostedInvoiceUrl: string | null;
182
+ invoicePdf: string | null;
183
+ }[];
184
+ }>;
185
+ };
186
+ put: {};
187
+ delete: {
188
+ "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, unknown, unknown>;
189
+ };
190
+ copy: {};
191
+ head: {};
192
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
193
+ options: {};
194
+ patch: {};
195
+ get: {
196
+ "/tenants/my/subscription": import("@withtyped/server").PathGuard<"/my/subscription", unknown, unknown, {
197
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
198
+ planId: string;
199
+ currentPeriodStart: Date;
200
+ currentPeriodEnd: Date;
201
+ }>;
202
+ } & {
203
+ "/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
204
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
205
+ planId: string;
206
+ currentPeriodStart: Date;
207
+ currentPeriodEnd: Date;
208
+ }>;
209
+ } & {
210
+ "/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
211
+ invoices: {
212
+ status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
213
+ createdAt: Date;
214
+ id: string;
215
+ updatedAt: Date;
216
+ customerId: string | null;
217
+ billingReason: string | null;
218
+ periodStart: Date;
219
+ periodEnd: Date;
220
+ amountDue: number;
221
+ amountPaid: number;
222
+ subscriptionId: string | null;
223
+ hostedInvoiceUrl: string | null;
224
+ invoicePdf: string | null;
225
+ planName: string | null;
226
+ }[];
227
+ }>;
228
+ } & {
229
+ "/tenants/:tenantId/invoices/:invoiceId/hosted-invoice-url": import("@withtyped/server").PathGuard<"/:tenantId/invoices/:invoiceId/hosted-invoice-url", unknown, unknown, {
230
+ hostedInvoiceUrl: string;
231
+ }>;
232
+ } & {
233
+ "/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
234
+ activeUsers: number;
235
+ cost: number;
236
+ tokenUsage: number;
237
+ }>;
238
+ };
239
+ post: {
240
+ "/tenants/:tenantId/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:tenantId/stripe-customer-portal", unknown, {
241
+ callbackUrl?: string | undefined;
242
+ }, {
243
+ redirectUri: string;
244
+ }>;
245
+ };
246
+ put: {};
247
+ delete: {
248
+ "/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, unknown>;
249
+ };
250
+ copy: {};
251
+ head: {};
252
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
253
+ options: {};
254
+ patch: {};
255
+ get: {
256
+ "/services/mails/usage": import("@withtyped/server").PathGuard<"/mails/usage", {
257
+ from?: string | undefined;
258
+ }, unknown, {
259
+ count: number;
260
+ }>;
261
+ };
262
+ post: {
263
+ "/services/mails": import("@withtyped/server").PathGuard<"/mails", unknown, {
264
+ data: {
265
+ type: TemplateType | VerificationCodeType;
266
+ payload: {
267
+ code?: string | undefined;
268
+ link?: string | undefined;
269
+ senderName?: string | undefined;
270
+ companyInformation?: string | undefined;
271
+ appLogo?: string | undefined;
272
+ };
273
+ to: string;
274
+ };
275
+ }, unknown>;
276
+ } & {
277
+ "/services/send-sms": import("@withtyped/server").PathGuard<"/send-sms", unknown, {
278
+ data: {
279
+ type: TemplateType | VerificationCodeType;
280
+ to: string;
281
+ payload: {
282
+ code?: string | undefined;
283
+ link?: string | undefined;
284
+ };
285
+ };
286
+ }, unknown>;
287
+ };
288
+ put: {};
289
+ delete: {};
290
+ copy: {};
291
+ head: {};
292
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
293
+ options: {};
294
+ patch: {};
295
+ get: {
296
+ "/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
297
+ createdAt: Date;
298
+ id: string;
299
+ name: string;
300
+ quota: {
301
+ mauLimit: number | null;
302
+ tokenLimit: number | null;
303
+ applicationsLimit: number | null;
304
+ machineToMachineLimit: number | null;
305
+ resourcesLimit: number | null;
306
+ scopesPerResourceLimit: number | null;
307
+ customDomainEnabled: boolean;
308
+ omniSignInEnabled: boolean;
309
+ builtInEmailConnectorEnabled: boolean;
310
+ socialConnectorsLimit: number | null;
311
+ standardConnectorsLimit: number | null;
312
+ rolesLimit: number | null;
313
+ machineToMachineRolesLimit: number | null;
314
+ scopesPerRoleLimit: number | null;
315
+ hooksLimit: number | null;
316
+ auditLogsRetentionDays: number | null;
317
+ mfaEnabled: boolean;
318
+ organizationsEnabled: boolean;
319
+ ssoEnabled: boolean;
320
+ thirdPartyApplicationsLimit: number | null;
321
+ };
322
+ stripeProducts: {
323
+ type: "flat" | "tier1" | "tier2" | "tier3";
324
+ id: string;
325
+ name: string;
326
+ price: {
327
+ id: string;
328
+ unitAmountDecimal: string;
329
+ quantity?: 1 | undefined;
330
+ unitAmount?: number | null | undefined;
331
+ };
332
+ description?: string | undefined;
333
+ }[];
334
+ updatedAt: Date;
335
+ }[]>;
336
+ };
337
+ post: {};
338
+ put: {};
339
+ delete: {};
340
+ copy: {};
341
+ head: {};
342
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
343
+ options: {};
344
+ patch: {};
345
+ get: {
346
+ "/my/tenant": import("@withtyped/server").PathGuard<"/tenant", unknown, unknown, {
347
+ name: string;
348
+ id: string;
349
+ indicator: string;
350
+ isSuspended: boolean;
351
+ tag: TenantTag;
352
+ }>;
353
+ };
354
+ post: {};
355
+ put: {};
356
+ delete: {};
357
+ copy: {};
358
+ head: {};
359
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
360
+ options: {};
361
+ patch: {};
362
+ get: {
363
+ "/checkout-session/:id": import("@withtyped/server").PathGuard<"/:id", unknown, unknown, {
364
+ status: "open" | "complete" | "expired";
365
+ createdAt: Date;
366
+ id: string;
367
+ userId: string;
368
+ updatedAt: Date;
369
+ tenantId: string | null;
370
+ planId: string;
371
+ }>;
372
+ };
373
+ post: {
374
+ "/checkout-session": import("@withtyped/server").PathGuard<"/", unknown, {
375
+ planId: string;
376
+ successCallbackUrl: string;
377
+ tenantId?: string | undefined;
378
+ cancelCallbackUrl?: string | undefined;
379
+ tenantTag?: TenantTag | undefined;
380
+ tenantName?: string | undefined;
381
+ }, {
382
+ sessionId: string;
383
+ redirectUri?: string | null | undefined;
384
+ }>;
385
+ };
386
+ put: {};
387
+ delete: {};
388
+ copy: {};
389
+ head: {};
390
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
391
+ options: {};
392
+ patch: {};
393
+ get: {
394
+ "/affiliates": import("@withtyped/server").PathGuard<"/", unknown, unknown, AffiliateData[]>;
395
+ };
396
+ post: {
397
+ "/affiliates": import("@withtyped/server").PathGuard<"/", unknown, {
398
+ name: string;
399
+ }, {
400
+ createdAt: Date;
401
+ id: string;
402
+ name: string;
403
+ }>;
404
+ } & {
405
+ "/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
406
+ value: string;
407
+ type: "hostname" | "query";
408
+ }, {
409
+ value: string;
410
+ type: "hostname" | "query";
411
+ createdAt: Date;
412
+ affiliateId: string;
413
+ }>;
414
+ };
415
+ put: {};
416
+ delete: {
417
+ "/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
418
+ value: string;
419
+ type: "hostname" | "query";
420
+ }, unknown>;
421
+ };
422
+ copy: {};
423
+ head: {};
424
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
425
+ options: {};
426
+ patch: {};
427
+ get: {};
428
+ post: {
429
+ "/affiliate-logs": import("@withtyped/server").PathGuard<"/", unknown, {
430
+ createdAt: string;
431
+ userId: string;
432
+ hostname?: string | undefined;
433
+ query?: string | undefined;
434
+ }, {
435
+ createdAt: Date;
436
+ id: string;
437
+ affiliateId: string | null;
438
+ userId: string;
439
+ createdVia: {
440
+ createdAt: string;
441
+ hostname?: string | undefined;
442
+ query?: string | undefined;
443
+ };
444
+ }>;
445
+ };
446
+ put: {};
447
+ delete: {};
448
+ copy: {};
449
+ head: {};
450
+ }, "/api">>, "/api">;
451
+ export declare const tenantAuthRouter: import("@withtyped/server").Router<RequestContext, import("@withtyped/server").WithBodyContext<import("@withtyped/server").BaseContext & {
452
+ request: {
453
+ method?: import("@withtyped/server").RequestMethod | undefined;
454
+ headers: import("http").IncomingHttpHeaders;
455
+ url: URL;
456
+ body?: unknown;
457
+ };
458
+ }>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<import("@withtyped/server").BaseRoutes, "/api/tenants">>, "/api/tenants">;
459
+
460
+ export {
461
+ router as default,
462
+ };
463
+
464
+ export {};
package/package.json CHANGED
@@ -1,56 +1,46 @@
1
1
  {
2
2
  "name": "@logto/cloud",
3
- "version": "0.2.5-4d5e389",
3
+ "version": "0.2.5-4ef0b45",
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/*"
17
17
  },
18
18
  "devDependencies": {
19
- "@silverhand/eslint-config": "3.0.1",
20
- "@silverhand/jest-config": "3.0.0",
21
- "@silverhand/ts-config": "3.0.0",
19
+ "@silverhand/eslint-config": "5.0.0",
20
+ "@silverhand/jest-config": "5.0.0",
21
+ "@silverhand/ts-config": "5.0.0",
22
22
  "@types/accepts": "^1.3.5",
23
23
  "@types/http-proxy": "^1.17.9",
24
24
  "@types/jest": "^29.4.0",
25
25
  "@types/mime-types": "^2.1.1",
26
- "@types/node": "^18.11.18",
26
+ "@types/node": "^20.0.0",
27
27
  "@types/yargs": "^17.0.24",
28
- "dts-bundle-generator": "^8.0.1",
29
- "eslint": "^8.21.0",
28
+ "dts-bundle-generator": "^9.3.1",
29
+ "eslint": "^8.44.0",
30
30
  "jest": "^29.5.0",
31
- "lint-staged": "^13.0.0",
31
+ "lint-staged": "^15.0.0",
32
32
  "nodemon": "^3.0.0",
33
- "prettier": "^2.8.1",
34
- "typescript": "^5.0.0"
33
+ "prettier": "^3.0.0",
34
+ "typescript": "^5.3.3"
35
35
  },
36
36
  "engines": {
37
- "node": "^18.12.0"
37
+ "node": "^20.9.0"
38
38
  },
39
39
  "eslintConfig": {
40
40
  "extends": "@silverhand",
41
41
  "rules": {
42
42
  "no-console": "error"
43
43
  },
44
- "overrides": [
45
- {
46
- "files": [
47
- "src/cli/**/*"
48
- ],
49
- "rules": {
50
- "no-console": "off"
51
- }
52
- }
53
- ],
54
44
  "ignorePatterns": [
55
45
  "types.test.ts"
56
46
  ]
@@ -60,14 +50,14 @@
60
50
  "access": "public"
61
51
  },
62
52
  "dependencies": {
63
- "@silverhand/essentials": "^2.7.0",
64
- "@withtyped/server": "^0.12.7"
53
+ "@silverhand/essentials": "^2.9.0",
54
+ "@withtyped/server": "^0.13.3"
65
55
  },
66
56
  "scripts": {
67
57
  "precommit": "lint-staged",
68
- "build": "rm -rf build/ && tsc -p tsconfig.build.json",
58
+ "build": "rm -rf build/ && tsc -p tsconfig.build.json && pnpm build:lib",
69
59
  "//": "It is not used to build the service itself.",
70
- "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.lib.json -o lib/routes/index.d.ts",
71
61
  "build:test": "rm -rf build/ && tsc -p tsconfig.test.json --sourcemap",
72
62
  "lint": "eslint --ext .ts src",
73
63
  "lint:report": "pnpm lint --format json --output-file report.json",
@@ -1,214 +0,0 @@
1
- // Generated by dts-bundle-generator v8.0.1
2
-
3
- import { RequestContext } from '@withtyped/server';
4
-
5
- export type WithAuthContext<Context = RequestContext> = Context & {
6
- auth: {
7
- id: string;
8
- scopes: string[];
9
- };
10
- };
11
- declare enum TenantTag {
12
- Development = "development",
13
- Staging = "staging",
14
- Production = "production"
15
- }
16
- declare enum VerificationCodeType {
17
- SignIn = "SignIn",
18
- Register = "Register",
19
- ForgotPassword = "ForgotPassword",
20
- /** @deprecated */
21
- Continue = "Continue",
22
- Generic = "Generic",
23
- /** @deprecated Use `Generic` type template for sending test sms/email use case */
24
- Test = "Test"
25
- }
26
- 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").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
27
- options: {};
28
- patch: {
29
- "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
30
- name?: string | undefined;
31
- tag?: TenantTag | undefined;
32
- }, {
33
- name: string;
34
- id: string;
35
- indicator: string;
36
- tag: TenantTag;
37
- }>;
38
- };
39
- get: {
40
- "/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
41
- name: string;
42
- id: string;
43
- indicator: string;
44
- tag: TenantTag;
45
- }[]>;
46
- } & {
47
- "/tenants/my/subscription": import("@withtyped/server").PathGuard<"/my/subscription", unknown, unknown, {
48
- id: string;
49
- status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid";
50
- createdAt: Date;
51
- updatedAt: Date;
52
- tenantId: string;
53
- planId: string;
54
- currentPeriodStart: Date;
55
- currentPeriodEnd: Date;
56
- customerId: string;
57
- latestInvoiceId: string | null;
58
- canceledAt: Date | null;
59
- }>;
60
- } & {
61
- "/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
62
- id: string;
63
- status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid";
64
- createdAt: Date;
65
- updatedAt: Date;
66
- tenantId: string;
67
- planId: string;
68
- currentPeriodStart: Date;
69
- currentPeriodEnd: Date;
70
- customerId: string;
71
- latestInvoiceId: string | null;
72
- canceledAt: Date | null;
73
- }>;
74
- } & {
75
- "/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
76
- activeUsers: number;
77
- }>;
78
- };
79
- post: {
80
- "/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
81
- name?: string | undefined;
82
- tag?: TenantTag | undefined;
83
- }, {
84
- name: string;
85
- id: string;
86
- indicator: string;
87
- tag: TenantTag;
88
- }>;
89
- };
90
- put: {};
91
- head: {};
92
- delete: {
93
- "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, unknown, unknown>;
94
- };
95
- copy: {};
96
- }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
97
- options: {};
98
- patch: {};
99
- get: {
100
- "/services/mails/usage": import("@withtyped/server").PathGuard<"/mails/usage", {
101
- from?: string | undefined;
102
- }, unknown, unknown>;
103
- };
104
- post: {
105
- "/services/send-email": import("@withtyped/server").PathGuard<"/send-email", unknown, {
106
- data: {
107
- type: VerificationCodeType;
108
- to: string;
109
- payload: {
110
- senderName?: string | undefined;
111
- companyInformation?: string | undefined;
112
- appLogo?: string | undefined;
113
- code: string;
114
- };
115
- };
116
- }, unknown>;
117
- } & {
118
- "/services/mails": import("@withtyped/server").PathGuard<"/mails", unknown, {
119
- data: {
120
- type: VerificationCodeType;
121
- to: string;
122
- payload: {
123
- senderName?: string | undefined;
124
- companyInformation?: string | undefined;
125
- appLogo?: string | undefined;
126
- code: string;
127
- };
128
- };
129
- }, unknown>;
130
- } & {
131
- "/services/send-sms": import("@withtyped/server").PathGuard<"/send-sms", unknown, {
132
- data: {
133
- type: VerificationCodeType;
134
- to: string;
135
- payload: {
136
- senderName?: string | undefined;
137
- companyInformation?: string | undefined;
138
- appLogo?: string | undefined;
139
- code: string;
140
- };
141
- };
142
- }, unknown>;
143
- };
144
- put: {};
145
- head: {};
146
- delete: {};
147
- copy: {};
148
- }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
149
- options: {};
150
- patch: {};
151
- get: {
152
- "/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
153
- id: string;
154
- name: string;
155
- quota: {
156
- mauLimit: number | null;
157
- applicationsLimit: number;
158
- machineToMachineLimit: number;
159
- resourcesLimit: number;
160
- scopesPerResourceLimit: number;
161
- customDomainEnabled: boolean;
162
- omniSignInEnabled: boolean;
163
- builtInEmailConnectorEnabled: boolean;
164
- socialConnectorsLimit: number | null;
165
- standardConnectorsLimit: number;
166
- rolesLimit: number;
167
- scopesPerRoleLimit: number | null;
168
- hooksLimit: number;
169
- auditLogsRetentionDays: number;
170
- };
171
- stripeProducts: {
172
- description?: string | undefined;
173
- id: string;
174
- name: string;
175
- type: "flat" | "tier1" | "tier2" | "tier3";
176
- price: {
177
- quantity?: 1 | undefined;
178
- unitAmount?: number | null | undefined;
179
- id: string;
180
- unitAmountDecimal: string;
181
- };
182
- }[];
183
- createdAt: Date;
184
- updatedAt: Date;
185
- }[]>;
186
- };
187
- post: {};
188
- put: {};
189
- head: {};
190
- delete: {};
191
- copy: {};
192
- }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
193
- options: {};
194
- patch: {};
195
- get: {};
196
- post: {
197
- "/checkout-session": import("@withtyped/server").PathGuard<"/", unknown, {
198
- tenantId?: string | undefined;
199
- cancelCallbackUrl?: string | undefined;
200
- planId: string;
201
- successCallbackUrl: string;
202
- }, unknown>;
203
- };
204
- put: {};
205
- head: {};
206
- delete: {};
207
- copy: {};
208
- }, "/api">>, "/api">;
209
-
210
- export {
211
- router as default,
212
- };
213
-
214
- export {};