@logto/cloud 0.2.5-a21a38a → 0.2.5-a7eedce
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 +160 -84
- package/package.json +10 -15
package/lib/routes/index.d.ts
CHANGED
|
@@ -37,6 +37,20 @@ declare enum OrganizationInvitationStatus {
|
|
|
37
37
|
Expired = "Expired",
|
|
38
38
|
Revoked = "Revoked"
|
|
39
39
|
}
|
|
40
|
+
/** The scopes (permissions) defined by the organization template. */
|
|
41
|
+
export type OrganizationScope = {
|
|
42
|
+
tenantId: string;
|
|
43
|
+
/** The globally unique identifier of the organization scope. */
|
|
44
|
+
id: string;
|
|
45
|
+
/** The organization scope's name, unique within the organization template. */
|
|
46
|
+
name: string;
|
|
47
|
+
/** A brief description of the organization scope. */
|
|
48
|
+
description: string | null;
|
|
49
|
+
};
|
|
50
|
+
declare enum LogtoJwtTokenKeyType {
|
|
51
|
+
AccessToken = "access-token",
|
|
52
|
+
ClientCredentials = "client-credentials"
|
|
53
|
+
}
|
|
40
54
|
/**
|
|
41
55
|
* The simplified organization role entity that is returned in the `roles` field
|
|
42
56
|
* of the organization.
|
|
@@ -52,8 +66,8 @@ declare enum TenantTag {
|
|
|
52
66
|
declare enum TenantRole {
|
|
53
67
|
/** Admin of the tenant, who has all permissions. */
|
|
54
68
|
Admin = "admin",
|
|
55
|
-
/**
|
|
56
|
-
|
|
69
|
+
/** Collaborator of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
|
|
70
|
+
Collaborator = "collaborator"
|
|
57
71
|
}
|
|
58
72
|
declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
|
|
59
73
|
createdAt: Date;
|
|
@@ -63,16 +77,21 @@ declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js"
|
|
|
63
77
|
}, "createdAt", "createdAt">;
|
|
64
78
|
export type AffiliateProperty = InferModelType<typeof AffiliateProperties>;
|
|
65
79
|
declare const Affiliates: import("@withtyped/server/lib/model/index.js").default<"affiliates", {
|
|
66
|
-
id: string;
|
|
67
|
-
createdAt: Date;
|
|
68
80
|
name: string;
|
|
69
|
-
|
|
81
|
+
createdAt: Date;
|
|
82
|
+
id: string;
|
|
83
|
+
}, "id" | "createdAt", "id" | "createdAt">;
|
|
70
84
|
export type Affiliate = InferModelType<typeof Affiliates>;
|
|
85
|
+
declare enum RegionName {
|
|
86
|
+
EU = "EU",
|
|
87
|
+
US = "US"
|
|
88
|
+
}
|
|
71
89
|
export type AffiliateData = Affiliate & {
|
|
72
90
|
properties: Array<Pick<AffiliateProperty, "type" | "value">>;
|
|
73
91
|
};
|
|
74
92
|
declare const router: import("@withtyped/server").Router<RequestContext, WithAuthContext<Omit<import("@withtyped/server").BaseContext & {
|
|
75
93
|
request: {
|
|
94
|
+
id?: string | undefined;
|
|
76
95
|
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
77
96
|
headers: import("http").IncomingHttpHeaders;
|
|
78
97
|
url: URL;
|
|
@@ -80,6 +99,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
80
99
|
};
|
|
81
100
|
}, "request"> & {
|
|
82
101
|
request: Record<string, unknown> & {
|
|
102
|
+
id?: string | undefined;
|
|
83
103
|
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
84
104
|
headers: import("http").IncomingHttpHeaders;
|
|
85
105
|
url: URL;
|
|
@@ -88,14 +108,14 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
88
108
|
body?: Json | undefined;
|
|
89
109
|
bodyRaw?: Buffer | undefined;
|
|
90
110
|
};
|
|
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").MergeRoutes<import("@withtyped/server").
|
|
92
|
-
options: {};
|
|
111
|
+
}>, 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").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
|
|
93
112
|
patch: {
|
|
94
113
|
"/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
|
|
95
114
|
name?: string | undefined;
|
|
96
115
|
}, {
|
|
97
116
|
id: string;
|
|
98
117
|
name: string;
|
|
118
|
+
createdAt: Date;
|
|
99
119
|
usage: {
|
|
100
120
|
activeUsers: number;
|
|
101
121
|
cost: number;
|
|
@@ -110,11 +130,12 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
110
130
|
currentPeriodStart: Date;
|
|
111
131
|
currentPeriodEnd: Date;
|
|
112
132
|
};
|
|
133
|
+
regionName: RegionName;
|
|
113
134
|
tag: TenantTag;
|
|
114
135
|
openInvoices: {
|
|
115
136
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
116
|
-
createdAt: Date;
|
|
117
137
|
id: string;
|
|
138
|
+
createdAt: Date;
|
|
118
139
|
updatedAt: Date;
|
|
119
140
|
customerId: string | null;
|
|
120
141
|
billingReason: string | null;
|
|
@@ -128,10 +149,12 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
128
149
|
}[];
|
|
129
150
|
}>;
|
|
130
151
|
};
|
|
152
|
+
options: {};
|
|
131
153
|
get: {
|
|
132
154
|
"/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
|
|
133
155
|
id: string;
|
|
134
156
|
name: string;
|
|
157
|
+
createdAt: Date;
|
|
135
158
|
usage: {
|
|
136
159
|
activeUsers: number;
|
|
137
160
|
cost: number;
|
|
@@ -146,11 +169,12 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
146
169
|
currentPeriodStart: Date;
|
|
147
170
|
currentPeriodEnd: Date;
|
|
148
171
|
};
|
|
172
|
+
regionName: RegionName;
|
|
149
173
|
tag: TenantTag;
|
|
150
174
|
openInvoices: {
|
|
151
175
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
152
|
-
createdAt: Date;
|
|
153
176
|
id: string;
|
|
177
|
+
createdAt: Date;
|
|
154
178
|
updatedAt: Date;
|
|
155
179
|
customerId: string | null;
|
|
156
180
|
billingReason: string | null;
|
|
@@ -168,9 +192,11 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
168
192
|
"/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
169
193
|
name?: string | undefined;
|
|
170
194
|
tag?: TenantTag | undefined;
|
|
195
|
+
regionName?: RegionName | undefined;
|
|
171
196
|
}, {
|
|
172
197
|
id: string;
|
|
173
198
|
name: string;
|
|
199
|
+
createdAt: Date;
|
|
174
200
|
usage: {
|
|
175
201
|
activeUsers: number;
|
|
176
202
|
cost: number;
|
|
@@ -185,11 +211,12 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
185
211
|
currentPeriodStart: Date;
|
|
186
212
|
currentPeriodEnd: Date;
|
|
187
213
|
};
|
|
214
|
+
regionName: RegionName;
|
|
188
215
|
tag: TenantTag;
|
|
189
216
|
openInvoices: {
|
|
190
217
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
191
|
-
createdAt: Date;
|
|
192
218
|
id: string;
|
|
219
|
+
createdAt: Date;
|
|
193
220
|
updatedAt: Date;
|
|
194
221
|
customerId: string | null;
|
|
195
222
|
billingReason: string | null;
|
|
@@ -210,8 +237,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
210
237
|
copy: {};
|
|
211
238
|
head: {};
|
|
212
239
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
213
|
-
options: {};
|
|
214
240
|
patch: {};
|
|
241
|
+
options: {};
|
|
215
242
|
get: {
|
|
216
243
|
"/tenants/my/subscription": import("@withtyped/server").PathGuard<"/my/subscription", unknown, unknown, {
|
|
217
244
|
status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
|
|
@@ -230,8 +257,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
230
257
|
"/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
|
|
231
258
|
invoices: {
|
|
232
259
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
233
|
-
createdAt: Date;
|
|
234
260
|
id: string;
|
|
261
|
+
createdAt: Date;
|
|
235
262
|
updatedAt: Date;
|
|
236
263
|
customerId: string | null;
|
|
237
264
|
billingReason: string | null;
|
|
@@ -270,8 +297,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
270
297
|
copy: {};
|
|
271
298
|
head: {};
|
|
272
299
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
273
|
-
options: {};
|
|
274
300
|
patch: {};
|
|
301
|
+
options: {};
|
|
275
302
|
get: {
|
|
276
303
|
"/services/mails/usage": import("@withtyped/server").PathGuard<"/mails/usage", {
|
|
277
304
|
from?: string | undefined;
|
|
@@ -286,6 +313,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
286
313
|
payload: {
|
|
287
314
|
code?: string | undefined;
|
|
288
315
|
link?: string | undefined;
|
|
316
|
+
} & Record<string, string> & {
|
|
289
317
|
senderName?: string | undefined;
|
|
290
318
|
companyInformation?: string | undefined;
|
|
291
319
|
appLogo?: string | undefined;
|
|
@@ -301,22 +329,51 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
301
329
|
payload: {
|
|
302
330
|
code?: string | undefined;
|
|
303
331
|
link?: string | undefined;
|
|
304
|
-
}
|
|
332
|
+
} & Record<string, string>;
|
|
305
333
|
};
|
|
306
334
|
}, unknown>;
|
|
335
|
+
} & {
|
|
336
|
+
"/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", {
|
|
337
|
+
isTest?: string | undefined;
|
|
338
|
+
}, {
|
|
339
|
+
script: string;
|
|
340
|
+
tokenType: LogtoJwtTokenKeyType.AccessToken;
|
|
341
|
+
token: Record<string, Json>;
|
|
342
|
+
context: Record<string, Json>;
|
|
343
|
+
environmentVariables?: Record<string, string> | undefined;
|
|
344
|
+
} | {
|
|
345
|
+
script: string;
|
|
346
|
+
tokenType: LogtoJwtTokenKeyType.ClientCredentials;
|
|
347
|
+
token: Record<string, Json>;
|
|
348
|
+
environmentVariables?: Record<string, string> | undefined;
|
|
349
|
+
}, Record<string, unknown>>;
|
|
350
|
+
};
|
|
351
|
+
put: {
|
|
352
|
+
"/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, {
|
|
353
|
+
"jwt.accessToken"?: {
|
|
354
|
+
production?: string | undefined;
|
|
355
|
+
test?: string | undefined;
|
|
356
|
+
} | undefined;
|
|
357
|
+
"jwt.clientCredentials"?: {
|
|
358
|
+
production?: string | undefined;
|
|
359
|
+
test?: string | undefined;
|
|
360
|
+
} | undefined;
|
|
361
|
+
}, unknown>;
|
|
362
|
+
};
|
|
363
|
+
delete: {
|
|
364
|
+
"/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, unknown, unknown>;
|
|
307
365
|
};
|
|
308
|
-
put: {};
|
|
309
|
-
delete: {};
|
|
310
366
|
copy: {};
|
|
311
367
|
head: {};
|
|
312
368
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
313
|
-
options: {};
|
|
314
369
|
patch: {};
|
|
370
|
+
options: {};
|
|
315
371
|
get: {
|
|
316
372
|
"/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
|
|
317
|
-
createdAt: Date;
|
|
318
373
|
id: string;
|
|
374
|
+
createdAt: Date;
|
|
319
375
|
name: string;
|
|
376
|
+
updatedAt: Date;
|
|
320
377
|
quota: {
|
|
321
378
|
mauLimit: number | null;
|
|
322
379
|
tokenLimit: number | null;
|
|
@@ -338,6 +395,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
338
395
|
organizationsEnabled: boolean;
|
|
339
396
|
ssoEnabled: boolean;
|
|
340
397
|
thirdPartyApplicationsLimit: number | null;
|
|
398
|
+
tenantMembersLimit: number | null;
|
|
399
|
+
customJwtEnabled: boolean;
|
|
341
400
|
};
|
|
342
401
|
stripeProducts: {
|
|
343
402
|
type: "flat" | "tier1" | "tier2" | "tier3";
|
|
@@ -351,7 +410,6 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
351
410
|
};
|
|
352
411
|
description?: string | undefined;
|
|
353
412
|
}[];
|
|
354
|
-
updatedAt: Date;
|
|
355
413
|
}[]>;
|
|
356
414
|
};
|
|
357
415
|
post: {};
|
|
@@ -360,33 +418,16 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
360
418
|
copy: {};
|
|
361
419
|
head: {};
|
|
362
420
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
363
|
-
options: {};
|
|
364
421
|
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
422
|
options: {};
|
|
381
|
-
patch: {};
|
|
382
423
|
get: {
|
|
383
424
|
"/checkout-session/:id": import("@withtyped/server").PathGuard<"/:id", unknown, unknown, {
|
|
384
|
-
status: "open" | "complete" | "expired";
|
|
385
|
-
createdAt: Date;
|
|
386
425
|
id: string;
|
|
426
|
+
createdAt: Date;
|
|
387
427
|
userId: string;
|
|
388
|
-
|
|
428
|
+
status: "open" | "complete" | "expired";
|
|
389
429
|
tenantId: string | null;
|
|
430
|
+
updatedAt: Date;
|
|
390
431
|
planId: string;
|
|
391
432
|
}>;
|
|
392
433
|
};
|
|
@@ -398,6 +439,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
398
439
|
cancelCallbackUrl?: string | undefined;
|
|
399
440
|
tenantTag?: TenantTag | undefined;
|
|
400
441
|
tenantName?: string | undefined;
|
|
442
|
+
tenantRegionName?: RegionName | undefined;
|
|
401
443
|
}, {
|
|
402
444
|
sessionId: string;
|
|
403
445
|
redirectUri?: string | null | undefined;
|
|
@@ -408,8 +450,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
408
450
|
copy: {};
|
|
409
451
|
head: {};
|
|
410
452
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
411
|
-
options: {};
|
|
412
453
|
patch: {};
|
|
454
|
+
options: {};
|
|
413
455
|
get: {
|
|
414
456
|
"/affiliates": import("@withtyped/server").PathGuard<"/", unknown, unknown, AffiliateData[]>;
|
|
415
457
|
};
|
|
@@ -417,33 +459,33 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
417
459
|
"/affiliates": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
418
460
|
name: string;
|
|
419
461
|
}, {
|
|
420
|
-
createdAt: Date;
|
|
421
462
|
id: string;
|
|
463
|
+
createdAt: Date;
|
|
422
464
|
name: string;
|
|
423
465
|
}>;
|
|
424
466
|
} & {
|
|
425
467
|
"/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
|
|
426
|
-
value: string;
|
|
427
468
|
type: "hostname" | "query";
|
|
428
|
-
}, {
|
|
429
469
|
value: string;
|
|
430
|
-
|
|
470
|
+
}, {
|
|
431
471
|
createdAt: Date;
|
|
432
472
|
affiliateId: string;
|
|
473
|
+
type: "hostname" | "query";
|
|
474
|
+
value: string;
|
|
433
475
|
}>;
|
|
434
476
|
};
|
|
435
477
|
put: {};
|
|
436
478
|
delete: {
|
|
437
479
|
"/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
|
|
438
|
-
value: string;
|
|
439
480
|
type: "hostname" | "query";
|
|
481
|
+
value: string;
|
|
440
482
|
}, unknown>;
|
|
441
483
|
};
|
|
442
484
|
copy: {};
|
|
443
485
|
head: {};
|
|
444
486
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
445
|
-
options: {};
|
|
446
487
|
patch: {};
|
|
488
|
+
options: {};
|
|
447
489
|
get: {};
|
|
448
490
|
post: {
|
|
449
491
|
"/affiliate-logs": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
@@ -452,8 +494,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
452
494
|
hostname?: string | undefined;
|
|
453
495
|
query?: string | undefined;
|
|
454
496
|
}, {
|
|
455
|
-
createdAt: Date;
|
|
456
497
|
id: string;
|
|
498
|
+
createdAt: Date;
|
|
457
499
|
affiliateId: string | null;
|
|
458
500
|
userId: string;
|
|
459
501
|
createdVia: {
|
|
@@ -468,100 +510,134 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
468
510
|
copy: {};
|
|
469
511
|
head: {};
|
|
470
512
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
513
|
+
patch: {
|
|
514
|
+
"/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:invitationId/status", unknown, {
|
|
515
|
+
status: OrganizationInvitationStatus.Accepted;
|
|
516
|
+
}, unknown>;
|
|
517
|
+
};
|
|
471
518
|
options: {};
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
519
|
+
get: {
|
|
520
|
+
"/invitations": import("@withtyped/server").PathGuard<"/", unknown, unknown, ({
|
|
521
|
+
id: string;
|
|
522
|
+
createdAt: number;
|
|
523
|
+
status: OrganizationInvitationStatus;
|
|
524
|
+
tenantId: string;
|
|
525
|
+
updatedAt: number;
|
|
526
|
+
inviterId: string | null;
|
|
527
|
+
invitee: string;
|
|
528
|
+
acceptedUserId: string | null;
|
|
529
|
+
organizationId: string;
|
|
530
|
+
expiresAt: number;
|
|
531
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
532
|
+
} & {
|
|
533
|
+
tenantName: string;
|
|
534
|
+
tenantTag: TenantTag;
|
|
535
|
+
})[]>;
|
|
536
|
+
} & {
|
|
537
|
+
"/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:invitationId", unknown, unknown, {
|
|
538
|
+
id: string;
|
|
539
|
+
createdAt: number;
|
|
540
|
+
status: OrganizationInvitationStatus;
|
|
541
|
+
tenantId: string;
|
|
542
|
+
updatedAt: number;
|
|
543
|
+
inviterId: string | null;
|
|
544
|
+
invitee: string;
|
|
545
|
+
acceptedUserId: string | null;
|
|
546
|
+
organizationId: string;
|
|
547
|
+
expiresAt: number;
|
|
548
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
481
549
|
}>;
|
|
482
550
|
};
|
|
551
|
+
post: {};
|
|
552
|
+
put: {};
|
|
553
|
+
delete: {};
|
|
483
554
|
copy: {};
|
|
484
555
|
head: {};
|
|
485
556
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
557
|
+
patch: {};
|
|
486
558
|
options: {};
|
|
487
|
-
patch: {
|
|
488
|
-
"/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:invitationId/status", unknown, {
|
|
489
|
-
status: OrganizationInvitationStatus.Accepted;
|
|
490
|
-
}, unknown>;
|
|
491
|
-
};
|
|
492
559
|
get: {};
|
|
493
560
|
post: {};
|
|
494
561
|
put: {};
|
|
495
|
-
delete: {
|
|
562
|
+
delete: {
|
|
563
|
+
"/me": import("@withtyped/server").PathGuard<"/", unknown, unknown, unknown>;
|
|
564
|
+
};
|
|
496
565
|
copy: {};
|
|
497
566
|
head: {};
|
|
498
567
|
}, "/api">>, "/api">;
|
|
499
568
|
export declare const tenantAuthRouter: import("@withtyped/server").Router<RequestContext, import("@withtyped/server").WithBodyContext<import("@withtyped/server").BaseContext & {
|
|
500
569
|
request: {
|
|
570
|
+
id?: string | undefined;
|
|
501
571
|
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
502
572
|
headers: import("http").IncomingHttpHeaders;
|
|
503
573
|
url: URL;
|
|
504
574
|
body?: unknown;
|
|
505
575
|
};
|
|
506
576
|
}>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
|
|
507
|
-
options: {};
|
|
508
577
|
patch: {
|
|
509
578
|
"/:tenantId/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/status", unknown, {
|
|
510
579
|
status: OrganizationInvitationStatus.Revoked;
|
|
511
580
|
}, {
|
|
512
|
-
status: OrganizationInvitationStatus;
|
|
513
|
-
createdAt: number;
|
|
514
581
|
id: string;
|
|
515
|
-
|
|
582
|
+
createdAt: number;
|
|
583
|
+
status: OrganizationInvitationStatus;
|
|
516
584
|
tenantId: string;
|
|
517
|
-
|
|
585
|
+
updatedAt: number;
|
|
518
586
|
inviterId: string | null;
|
|
519
|
-
expiresAt: number;
|
|
520
|
-
organizationRoles: OrganizationRoleEntity[];
|
|
521
587
|
invitee: string;
|
|
522
588
|
acceptedUserId: string | null;
|
|
589
|
+
organizationId: string;
|
|
590
|
+
expiresAt: number;
|
|
591
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
523
592
|
}>;
|
|
524
593
|
};
|
|
594
|
+
options: {};
|
|
525
595
|
get: {
|
|
526
596
|
"/:tenantId/members": import("@withtyped/server").PathGuard<"/:tenantId/members", unknown, unknown, {
|
|
527
597
|
id: string;
|
|
528
598
|
name: string | null;
|
|
529
599
|
username: string | null;
|
|
530
600
|
primaryEmail: string | null;
|
|
601
|
+
primaryPhone: string | null;
|
|
602
|
+
avatar: string | null;
|
|
531
603
|
organizationRoles: OrganizationRoleEntity[];
|
|
532
604
|
}[]>;
|
|
533
605
|
} & {
|
|
534
|
-
"/:tenantId/
|
|
535
|
-
|
|
536
|
-
|
|
606
|
+
"/:tenantId/members/:userId/scopes": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/scopes", unknown, unknown, OrganizationScope[]>;
|
|
607
|
+
} & {
|
|
608
|
+
"/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, unknown, ({
|
|
537
609
|
id: string;
|
|
538
|
-
|
|
610
|
+
createdAt: number;
|
|
611
|
+
status: OrganizationInvitationStatus;
|
|
539
612
|
tenantId: string;
|
|
540
|
-
|
|
613
|
+
updatedAt: number;
|
|
541
614
|
inviterId: string | null;
|
|
542
|
-
expiresAt: number;
|
|
543
|
-
organizationRoles: OrganizationRoleEntity[];
|
|
544
615
|
invitee: string;
|
|
545
616
|
acceptedUserId: string | null;
|
|
546
|
-
|
|
617
|
+
organizationId: string;
|
|
618
|
+
expiresAt: number;
|
|
619
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
620
|
+
} & {
|
|
621
|
+
inviterName?: string | undefined;
|
|
622
|
+
})[]>;
|
|
547
623
|
};
|
|
548
624
|
post: {
|
|
549
625
|
"/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
|
|
550
|
-
roleName: TenantRole;
|
|
551
626
|
invitee: string;
|
|
627
|
+
roleName: TenantRole;
|
|
552
628
|
expiresAt?: number | undefined;
|
|
553
629
|
}, {
|
|
554
|
-
status: OrganizationInvitationStatus;
|
|
555
|
-
createdAt: number;
|
|
556
630
|
id: string;
|
|
557
|
-
|
|
631
|
+
createdAt: number;
|
|
632
|
+
status: OrganizationInvitationStatus;
|
|
558
633
|
tenantId: string;
|
|
559
|
-
|
|
634
|
+
updatedAt: number;
|
|
560
635
|
inviterId: string | null;
|
|
561
|
-
expiresAt: number;
|
|
562
|
-
organizationRoles: OrganizationRoleEntity[];
|
|
563
636
|
invitee: string;
|
|
564
637
|
acceptedUserId: string | null;
|
|
638
|
+
organizationId: string;
|
|
639
|
+
expiresAt: number;
|
|
640
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
565
641
|
}>;
|
|
566
642
|
} & {
|
|
567
643
|
"/:tenantId/invitations/:invitationId/message": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/message", unknown, unknown, unknown>;
|
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-a7eedce",
|
|
4
4
|
"description": "Logto Cloud service.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
|
@@ -16,23 +16,21 @@
|
|
|
16
16
|
"#src/*": "./build/*"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@silverhand/eslint-config": "
|
|
20
|
-
"@silverhand/
|
|
21
|
-
"@silverhand/ts-config": "5.0.0",
|
|
19
|
+
"@silverhand/eslint-config": "6.0.1",
|
|
20
|
+
"@silverhand/ts-config": "6.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
|
-
"eslint": "^8.
|
|
30
|
-
"jest": "^29.5.0",
|
|
27
|
+
"eslint": "^8.57.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.5.0"
|
|
36
34
|
},
|
|
37
35
|
"engines": {
|
|
38
36
|
"node": "^20.9.0"
|
|
@@ -51,22 +49,19 @@
|
|
|
51
49
|
"access": "public"
|
|
52
50
|
},
|
|
53
51
|
"dependencies": {
|
|
54
|
-
"@silverhand/essentials": "^2.9.
|
|
55
|
-
"@withtyped/server": "^0.13.
|
|
52
|
+
"@silverhand/essentials": "^2.9.1",
|
|
53
|
+
"@withtyped/server": "^0.13.6"
|
|
56
54
|
},
|
|
57
55
|
"scripts": {
|
|
58
56
|
"precommit": "lint-staged",
|
|
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
|
}
|