@logto/cloud 0.2.5-a21a38a → 0.2.5-c2fffa4
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/lib/routes/index.d.ts +142 -94
- package/package.json +5 -10
package/lib/routes/index.d.ts
CHANGED
|
@@ -37,6 +37,10 @@ declare enum OrganizationInvitationStatus {
|
|
|
37
37
|
Expired = "Expired",
|
|
38
38
|
Revoked = "Revoked"
|
|
39
39
|
}
|
|
40
|
+
declare enum LogtoJwtTokenPath {
|
|
41
|
+
AccessToken = "access-token",
|
|
42
|
+
ClientCredentials = "client-credentials"
|
|
43
|
+
}
|
|
40
44
|
/**
|
|
41
45
|
* The simplified organization role entity that is returned in the `roles` field
|
|
42
46
|
* of the organization.
|
|
@@ -52,8 +56,8 @@ declare enum TenantTag {
|
|
|
52
56
|
declare enum TenantRole {
|
|
53
57
|
/** Admin of the tenant, who has all permissions. */
|
|
54
58
|
Admin = "admin",
|
|
55
|
-
/**
|
|
56
|
-
|
|
59
|
+
/** Collaborator of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
|
|
60
|
+
Collaborator = "collaborator"
|
|
57
61
|
}
|
|
58
62
|
declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
|
|
59
63
|
createdAt: Date;
|
|
@@ -63,10 +67,10 @@ declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js"
|
|
|
63
67
|
}, "createdAt", "createdAt">;
|
|
64
68
|
export type AffiliateProperty = InferModelType<typeof AffiliateProperties>;
|
|
65
69
|
declare const Affiliates: import("@withtyped/server/lib/model/index.js").default<"affiliates", {
|
|
66
|
-
id: string;
|
|
67
|
-
createdAt: Date;
|
|
68
70
|
name: string;
|
|
69
|
-
|
|
71
|
+
createdAt: Date;
|
|
72
|
+
id: string;
|
|
73
|
+
}, "id" | "createdAt", "id" | "createdAt">;
|
|
70
74
|
export type Affiliate = InferModelType<typeof Affiliates>;
|
|
71
75
|
export type AffiliateData = Affiliate & {
|
|
72
76
|
properties: Array<Pick<AffiliateProperty, "type" | "value">>;
|
|
@@ -88,8 +92,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
88
92
|
body?: Json | undefined;
|
|
89
93
|
bodyRaw?: Buffer | undefined;
|
|
90
94
|
};
|
|
91
|
-
}>, 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").
|
|
92
|
-
options: {};
|
|
95
|
+
}>, 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<{
|
|
93
96
|
patch: {
|
|
94
97
|
"/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
|
|
95
98
|
name?: string | undefined;
|
|
@@ -110,11 +113,10 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
110
113
|
currentPeriodStart: Date;
|
|
111
114
|
currentPeriodEnd: Date;
|
|
112
115
|
};
|
|
113
|
-
tag: TenantTag;
|
|
114
116
|
openInvoices: {
|
|
115
117
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
116
|
-
createdAt: Date;
|
|
117
118
|
id: string;
|
|
119
|
+
createdAt: Date;
|
|
118
120
|
updatedAt: Date;
|
|
119
121
|
customerId: string | null;
|
|
120
122
|
billingReason: string | null;
|
|
@@ -126,8 +128,10 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
126
128
|
hostedInvoiceUrl: string | null;
|
|
127
129
|
invoicePdf: string | null;
|
|
128
130
|
}[];
|
|
131
|
+
tag: TenantTag;
|
|
129
132
|
}>;
|
|
130
133
|
};
|
|
134
|
+
options: {};
|
|
131
135
|
get: {
|
|
132
136
|
"/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
|
|
133
137
|
id: string;
|
|
@@ -146,11 +150,10 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
146
150
|
currentPeriodStart: Date;
|
|
147
151
|
currentPeriodEnd: Date;
|
|
148
152
|
};
|
|
149
|
-
tag: TenantTag;
|
|
150
153
|
openInvoices: {
|
|
151
154
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
152
|
-
createdAt: Date;
|
|
153
155
|
id: string;
|
|
156
|
+
createdAt: Date;
|
|
154
157
|
updatedAt: Date;
|
|
155
158
|
customerId: string | null;
|
|
156
159
|
billingReason: string | null;
|
|
@@ -162,6 +165,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
162
165
|
hostedInvoiceUrl: string | null;
|
|
163
166
|
invoicePdf: string | null;
|
|
164
167
|
}[];
|
|
168
|
+
tag: TenantTag;
|
|
165
169
|
}[]>;
|
|
166
170
|
};
|
|
167
171
|
post: {
|
|
@@ -185,11 +189,10 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
185
189
|
currentPeriodStart: Date;
|
|
186
190
|
currentPeriodEnd: Date;
|
|
187
191
|
};
|
|
188
|
-
tag: TenantTag;
|
|
189
192
|
openInvoices: {
|
|
190
193
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
191
|
-
createdAt: Date;
|
|
192
194
|
id: string;
|
|
195
|
+
createdAt: Date;
|
|
193
196
|
updatedAt: Date;
|
|
194
197
|
customerId: string | null;
|
|
195
198
|
billingReason: string | null;
|
|
@@ -201,6 +204,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
201
204
|
hostedInvoiceUrl: string | null;
|
|
202
205
|
invoicePdf: string | null;
|
|
203
206
|
}[];
|
|
207
|
+
tag: TenantTag;
|
|
204
208
|
}>;
|
|
205
209
|
};
|
|
206
210
|
put: {};
|
|
@@ -210,8 +214,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
210
214
|
copy: {};
|
|
211
215
|
head: {};
|
|
212
216
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
213
|
-
options: {};
|
|
214
217
|
patch: {};
|
|
218
|
+
options: {};
|
|
215
219
|
get: {
|
|
216
220
|
"/tenants/my/subscription": import("@withtyped/server").PathGuard<"/my/subscription", unknown, unknown, {
|
|
217
221
|
status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
|
|
@@ -230,8 +234,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
230
234
|
"/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
|
|
231
235
|
invoices: {
|
|
232
236
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
233
|
-
createdAt: Date;
|
|
234
237
|
id: string;
|
|
238
|
+
createdAt: Date;
|
|
235
239
|
updatedAt: Date;
|
|
236
240
|
customerId: string | null;
|
|
237
241
|
billingReason: string | null;
|
|
@@ -270,8 +274,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
270
274
|
copy: {};
|
|
271
275
|
head: {};
|
|
272
276
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
273
|
-
options: {};
|
|
274
277
|
patch: {};
|
|
278
|
+
options: {};
|
|
275
279
|
get: {
|
|
276
280
|
"/services/mails/usage": import("@withtyped/server").PathGuard<"/mails/usage", {
|
|
277
281
|
from?: string | undefined;
|
|
@@ -286,6 +290,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
286
290
|
payload: {
|
|
287
291
|
code?: string | undefined;
|
|
288
292
|
link?: string | undefined;
|
|
293
|
+
} & Record<string, string> & {
|
|
289
294
|
senderName?: string | undefined;
|
|
290
295
|
companyInformation?: string | undefined;
|
|
291
296
|
appLogo?: string | undefined;
|
|
@@ -301,22 +306,48 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
301
306
|
payload: {
|
|
302
307
|
code?: string | undefined;
|
|
303
308
|
link?: string | undefined;
|
|
304
|
-
}
|
|
309
|
+
} & Record<string, string>;
|
|
305
310
|
};
|
|
306
311
|
}, unknown>;
|
|
312
|
+
} & {
|
|
313
|
+
"/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", unknown, {
|
|
314
|
+
script: string;
|
|
315
|
+
tokenType: LogtoJwtTokenPath.AccessToken;
|
|
316
|
+
token: Record<string, Json>;
|
|
317
|
+
context: Record<string, Json>;
|
|
318
|
+
envVars?: Record<string, string> | undefined;
|
|
319
|
+
} | {
|
|
320
|
+
script: string;
|
|
321
|
+
tokenType: LogtoJwtTokenPath.ClientCredentials;
|
|
322
|
+
token: Record<string, Json>;
|
|
323
|
+
envVars?: Record<string, string> | undefined;
|
|
324
|
+
}, Record<string, unknown>>;
|
|
307
325
|
};
|
|
308
326
|
put: {};
|
|
309
327
|
delete: {};
|
|
310
328
|
copy: {};
|
|
311
329
|
head: {};
|
|
312
330
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
313
|
-
options: {};
|
|
314
331
|
patch: {};
|
|
332
|
+
options: {};
|
|
315
333
|
get: {
|
|
316
334
|
"/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
|
|
317
|
-
createdAt: Date;
|
|
318
335
|
id: string;
|
|
336
|
+
createdAt: Date;
|
|
319
337
|
name: string;
|
|
338
|
+
updatedAt: Date;
|
|
339
|
+
stripeProducts: {
|
|
340
|
+
type: "flat" | "tier1" | "tier2" | "tier3";
|
|
341
|
+
id: string;
|
|
342
|
+
name: string;
|
|
343
|
+
price: {
|
|
344
|
+
id: string;
|
|
345
|
+
unitAmountDecimal: string;
|
|
346
|
+
quantity?: 1 | undefined;
|
|
347
|
+
unitAmount?: number | null | undefined;
|
|
348
|
+
};
|
|
349
|
+
description?: string | undefined;
|
|
350
|
+
}[];
|
|
320
351
|
quota: {
|
|
321
352
|
mauLimit: number | null;
|
|
322
353
|
tokenLimit: number | null;
|
|
@@ -339,19 +370,6 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
339
370
|
ssoEnabled: boolean;
|
|
340
371
|
thirdPartyApplicationsLimit: number | null;
|
|
341
372
|
};
|
|
342
|
-
stripeProducts: {
|
|
343
|
-
type: "flat" | "tier1" | "tier2" | "tier3";
|
|
344
|
-
id: string;
|
|
345
|
-
name: string;
|
|
346
|
-
price: {
|
|
347
|
-
id: string;
|
|
348
|
-
unitAmountDecimal: string;
|
|
349
|
-
quantity?: 1 | undefined;
|
|
350
|
-
unitAmount?: number | null | undefined;
|
|
351
|
-
};
|
|
352
|
-
description?: string | undefined;
|
|
353
|
-
}[];
|
|
354
|
-
updatedAt: Date;
|
|
355
373
|
}[]>;
|
|
356
374
|
};
|
|
357
375
|
post: {};
|
|
@@ -360,33 +378,16 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
360
378
|
copy: {};
|
|
361
379
|
head: {};
|
|
362
380
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
363
|
-
options: {};
|
|
364
381
|
patch: {};
|
|
365
|
-
get: {
|
|
366
|
-
"/my/tenant": import("@withtyped/server").PathGuard<"/tenant", unknown, unknown, {
|
|
367
|
-
name: string;
|
|
368
|
-
id: string;
|
|
369
|
-
indicator: string;
|
|
370
|
-
isSuspended: boolean;
|
|
371
|
-
tag: TenantTag;
|
|
372
|
-
}>;
|
|
373
|
-
};
|
|
374
|
-
post: {};
|
|
375
|
-
put: {};
|
|
376
|
-
delete: {};
|
|
377
|
-
copy: {};
|
|
378
|
-
head: {};
|
|
379
|
-
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
380
382
|
options: {};
|
|
381
|
-
patch: {};
|
|
382
383
|
get: {
|
|
383
384
|
"/checkout-session/:id": import("@withtyped/server").PathGuard<"/:id", unknown, unknown, {
|
|
384
|
-
status: "open" | "complete" | "expired";
|
|
385
|
-
createdAt: Date;
|
|
386
385
|
id: string;
|
|
386
|
+
createdAt: Date;
|
|
387
387
|
userId: string;
|
|
388
|
-
|
|
388
|
+
status: "open" | "complete" | "expired";
|
|
389
389
|
tenantId: string | null;
|
|
390
|
+
updatedAt: Date;
|
|
390
391
|
planId: string;
|
|
391
392
|
}>;
|
|
392
393
|
};
|
|
@@ -408,8 +409,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
408
409
|
copy: {};
|
|
409
410
|
head: {};
|
|
410
411
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
411
|
-
options: {};
|
|
412
412
|
patch: {};
|
|
413
|
+
options: {};
|
|
413
414
|
get: {
|
|
414
415
|
"/affiliates": import("@withtyped/server").PathGuard<"/", unknown, unknown, AffiliateData[]>;
|
|
415
416
|
};
|
|
@@ -417,33 +418,33 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
417
418
|
"/affiliates": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
418
419
|
name: string;
|
|
419
420
|
}, {
|
|
420
|
-
createdAt: Date;
|
|
421
421
|
id: string;
|
|
422
|
+
createdAt: Date;
|
|
422
423
|
name: string;
|
|
423
424
|
}>;
|
|
424
425
|
} & {
|
|
425
426
|
"/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
|
|
426
|
-
value: string;
|
|
427
427
|
type: "hostname" | "query";
|
|
428
|
-
}, {
|
|
429
428
|
value: string;
|
|
430
|
-
|
|
429
|
+
}, {
|
|
431
430
|
createdAt: Date;
|
|
432
431
|
affiliateId: string;
|
|
432
|
+
type: "hostname" | "query";
|
|
433
|
+
value: string;
|
|
433
434
|
}>;
|
|
434
435
|
};
|
|
435
436
|
put: {};
|
|
436
437
|
delete: {
|
|
437
438
|
"/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
|
|
438
|
-
value: string;
|
|
439
439
|
type: "hostname" | "query";
|
|
440
|
+
value: string;
|
|
440
441
|
}, unknown>;
|
|
441
442
|
};
|
|
442
443
|
copy: {};
|
|
443
444
|
head: {};
|
|
444
445
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
445
|
-
options: {};
|
|
446
446
|
patch: {};
|
|
447
|
+
options: {};
|
|
447
448
|
get: {};
|
|
448
449
|
post: {
|
|
449
450
|
"/affiliate-logs": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
@@ -452,8 +453,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
452
453
|
hostname?: string | undefined;
|
|
453
454
|
query?: string | undefined;
|
|
454
455
|
}, {
|
|
455
|
-
createdAt: Date;
|
|
456
456
|
id: string;
|
|
457
|
+
createdAt: Date;
|
|
457
458
|
affiliateId: string | null;
|
|
458
459
|
userId: string;
|
|
459
460
|
createdVia: {
|
|
@@ -468,28 +469,44 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
468
469
|
copy: {};
|
|
469
470
|
head: {};
|
|
470
471
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
471
|
-
options: {};
|
|
472
|
-
patch: {};
|
|
473
|
-
get: {};
|
|
474
|
-
post: {};
|
|
475
|
-
put: {};
|
|
476
|
-
delete: {
|
|
477
|
-
"/logs/expired": import("@withtyped/server").PathGuard<"/expired", {
|
|
478
|
-
dryRun?: string | undefined;
|
|
479
|
-
}, unknown, {
|
|
480
|
-
affectedRows: number;
|
|
481
|
-
}>;
|
|
482
|
-
};
|
|
483
|
-
copy: {};
|
|
484
|
-
head: {};
|
|
485
|
-
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
486
|
-
options: {};
|
|
487
472
|
patch: {
|
|
488
473
|
"/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:invitationId/status", unknown, {
|
|
489
474
|
status: OrganizationInvitationStatus.Accepted;
|
|
490
475
|
}, unknown>;
|
|
491
476
|
};
|
|
492
|
-
|
|
477
|
+
options: {};
|
|
478
|
+
get: {
|
|
479
|
+
"/invitations": import("@withtyped/server").PathGuard<"/", unknown, unknown, ({
|
|
480
|
+
id: string;
|
|
481
|
+
createdAt: number;
|
|
482
|
+
status: OrganizationInvitationStatus;
|
|
483
|
+
tenantId: string;
|
|
484
|
+
updatedAt: number;
|
|
485
|
+
organizationId: string;
|
|
486
|
+
inviterId: string | null;
|
|
487
|
+
invitee: string;
|
|
488
|
+
expiresAt: number;
|
|
489
|
+
acceptedUserId: string | null;
|
|
490
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
491
|
+
} & {
|
|
492
|
+
tenantTag: TenantTag;
|
|
493
|
+
tenantName: string;
|
|
494
|
+
})[]>;
|
|
495
|
+
} & {
|
|
496
|
+
"/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:invitationId", unknown, unknown, {
|
|
497
|
+
id: string;
|
|
498
|
+
createdAt: number;
|
|
499
|
+
status: OrganizationInvitationStatus;
|
|
500
|
+
tenantId: string;
|
|
501
|
+
updatedAt: number;
|
|
502
|
+
organizationId: string;
|
|
503
|
+
inviterId: string | null;
|
|
504
|
+
invitee: string;
|
|
505
|
+
expiresAt: number;
|
|
506
|
+
acceptedUserId: string | null;
|
|
507
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
508
|
+
}>;
|
|
509
|
+
};
|
|
493
510
|
post: {};
|
|
494
511
|
put: {};
|
|
495
512
|
delete: {};
|
|
@@ -504,64 +521,66 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
|
|
|
504
521
|
body?: unknown;
|
|
505
522
|
};
|
|
506
523
|
}>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
|
|
507
|
-
options: {};
|
|
508
524
|
patch: {
|
|
509
525
|
"/:tenantId/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/status", unknown, {
|
|
510
526
|
status: OrganizationInvitationStatus.Revoked;
|
|
511
527
|
}, {
|
|
512
|
-
status: OrganizationInvitationStatus;
|
|
513
|
-
createdAt: number;
|
|
514
528
|
id: string;
|
|
515
|
-
|
|
529
|
+
createdAt: number;
|
|
530
|
+
status: OrganizationInvitationStatus;
|
|
516
531
|
tenantId: string;
|
|
532
|
+
updatedAt: number;
|
|
517
533
|
organizationId: string;
|
|
518
534
|
inviterId: string | null;
|
|
519
|
-
expiresAt: number;
|
|
520
|
-
organizationRoles: OrganizationRoleEntity[];
|
|
521
535
|
invitee: string;
|
|
536
|
+
expiresAt: number;
|
|
522
537
|
acceptedUserId: string | null;
|
|
538
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
523
539
|
}>;
|
|
524
540
|
};
|
|
541
|
+
options: {};
|
|
525
542
|
get: {
|
|
526
543
|
"/:tenantId/members": import("@withtyped/server").PathGuard<"/:tenantId/members", unknown, unknown, {
|
|
527
544
|
id: string;
|
|
528
545
|
name: string | null;
|
|
529
546
|
username: string | null;
|
|
530
547
|
primaryEmail: string | null;
|
|
548
|
+
primaryPhone: string | null;
|
|
549
|
+
avatar: string | null;
|
|
531
550
|
organizationRoles: OrganizationRoleEntity[];
|
|
532
551
|
}[]>;
|
|
533
552
|
} & {
|
|
534
553
|
"/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, unknown, {
|
|
535
|
-
status: OrganizationInvitationStatus;
|
|
536
|
-
createdAt: number;
|
|
537
554
|
id: string;
|
|
538
|
-
|
|
555
|
+
createdAt: number;
|
|
556
|
+
status: OrganizationInvitationStatus;
|
|
539
557
|
tenantId: string;
|
|
558
|
+
updatedAt: number;
|
|
540
559
|
organizationId: string;
|
|
541
560
|
inviterId: string | null;
|
|
542
|
-
expiresAt: number;
|
|
543
|
-
organizationRoles: OrganizationRoleEntity[];
|
|
544
561
|
invitee: string;
|
|
562
|
+
expiresAt: number;
|
|
545
563
|
acceptedUserId: string | null;
|
|
564
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
546
565
|
}[]>;
|
|
547
566
|
};
|
|
548
567
|
post: {
|
|
549
568
|
"/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
|
|
550
|
-
roleName: TenantRole;
|
|
551
569
|
invitee: string;
|
|
570
|
+
roleName: TenantRole;
|
|
552
571
|
expiresAt?: number | undefined;
|
|
553
572
|
}, {
|
|
554
|
-
status: OrganizationInvitationStatus;
|
|
555
|
-
createdAt: number;
|
|
556
573
|
id: string;
|
|
557
|
-
|
|
574
|
+
createdAt: number;
|
|
575
|
+
status: OrganizationInvitationStatus;
|
|
558
576
|
tenantId: string;
|
|
577
|
+
updatedAt: number;
|
|
559
578
|
organizationId: string;
|
|
560
579
|
inviterId: string | null;
|
|
561
|
-
expiresAt: number;
|
|
562
|
-
organizationRoles: OrganizationRoleEntity[];
|
|
563
580
|
invitee: string;
|
|
581
|
+
expiresAt: number;
|
|
564
582
|
acceptedUserId: string | null;
|
|
583
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
565
584
|
}>;
|
|
566
585
|
} & {
|
|
567
586
|
"/:tenantId/invitations/:invitationId/message": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/message", unknown, unknown, unknown>;
|
|
@@ -579,6 +598,35 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
|
|
|
579
598
|
copy: {};
|
|
580
599
|
head: {};
|
|
581
600
|
}, "/api/tenants">>, "/api/tenants">;
|
|
601
|
+
export declare const functionsRouter: import("@withtyped/server").Router<RequestContext, WithAuthContext<Omit<import("@withtyped/server").BaseContext & {
|
|
602
|
+
request: {
|
|
603
|
+
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
604
|
+
headers: import("http").IncomingHttpHeaders;
|
|
605
|
+
url: URL;
|
|
606
|
+
body?: unknown;
|
|
607
|
+
};
|
|
608
|
+
}, "request"> & {
|
|
609
|
+
request: Record<string, unknown> & {
|
|
610
|
+
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
611
|
+
headers: import("http").IncomingHttpHeaders;
|
|
612
|
+
url: URL;
|
|
613
|
+
body?: unknown;
|
|
614
|
+
} & {
|
|
615
|
+
body?: Json | undefined;
|
|
616
|
+
bodyRaw?: Buffer | undefined;
|
|
617
|
+
};
|
|
618
|
+
}>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
|
|
619
|
+
patch: {};
|
|
620
|
+
options: {};
|
|
621
|
+
get: {};
|
|
622
|
+
post: {
|
|
623
|
+
"/database-alteration": import("@withtyped/server").PathGuard<"/database-alteration", unknown, Json, unknown>;
|
|
624
|
+
};
|
|
625
|
+
put: {};
|
|
626
|
+
delete: {};
|
|
627
|
+
copy: {};
|
|
628
|
+
head: {};
|
|
629
|
+
}, "/functions">>, "/functions">;
|
|
582
630
|
|
|
583
631
|
export {
|
|
584
632
|
router as default,
|
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-c2fffa4",
|
|
4
4
|
"description": "Logto Cloud service.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
|
@@ -17,22 +17,20 @@
|
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@silverhand/eslint-config": "5.0.0",
|
|
20
|
-
"@silverhand/jest-config": "5.0.0",
|
|
21
20
|
"@silverhand/ts-config": "5.0.0",
|
|
22
21
|
"@types/accepts": "^1.3.5",
|
|
23
22
|
"@types/http-proxy": "^1.17.9",
|
|
24
|
-
"@types/jest": "^29.4.0",
|
|
25
23
|
"@types/mime-types": "^2.1.1",
|
|
26
24
|
"@types/node": "^20.0.0",
|
|
27
25
|
"@types/yargs": "^17.0.24",
|
|
28
26
|
"dts-bundle-generator": "^9.3.1",
|
|
29
27
|
"eslint": "^8.44.0",
|
|
30
|
-
"jest": "^29.5.0",
|
|
31
28
|
"lint-staged": "^15.0.0",
|
|
32
29
|
"nodemon": "^3.0.0",
|
|
33
|
-
"p-map": "^7.0.1",
|
|
34
30
|
"prettier": "^3.0.0",
|
|
35
|
-
"typescript": "^5.3.3"
|
|
31
|
+
"typescript": "^5.3.3",
|
|
32
|
+
"vite-tsconfig-paths": "^4.3.1",
|
|
33
|
+
"vitest": "^1.0.0"
|
|
36
34
|
},
|
|
37
35
|
"engines": {
|
|
38
36
|
"node": "^20.9.0"
|
|
@@ -59,14 +57,11 @@
|
|
|
59
57
|
"build": "rm -rf build/ && tsc -p tsconfig.build.json && pnpm build:lib",
|
|
60
58
|
"//": "It is not used to build the service itself.",
|
|
61
59
|
"build:lib": "rm -rf lib/ && dts-bundle-generator src/routes/index.ts --project tsconfig.build.lib.json -o lib/routes/index.d.ts",
|
|
62
|
-
"build:test": "rm -rf build/ && tsc -p tsconfig.test.json --sourcemap",
|
|
63
60
|
"lint": "eslint --ext .ts src",
|
|
64
61
|
"lint:report": "pnpm lint --format json --output-file report.json",
|
|
65
62
|
"dev": "rm -rf build/ && nodemon",
|
|
66
63
|
"start": "NODE_ENV=production node .",
|
|
67
|
-
"test
|
|
68
|
-
"test": "pnpm build:test && pnpm test:only && pnpm build:lib && pnpm test:types",
|
|
69
|
-
"test:ci": "pnpm test:only --coverage --silent",
|
|
64
|
+
"test": "vitest && pnpm build:lib && pnpm test:types",
|
|
70
65
|
"test:types": "tsc -p tsconfig.test.types.json",
|
|
71
66
|
"cli": "node ./build/cli/index.js"
|
|
72
67
|
}
|