authhero 0.255.1 → 0.257.0
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/dist/authhero.cjs +46 -46
- package/dist/authhero.d.ts +380 -0
- package/dist/authhero.mjs +5564 -5287
- package/dist/stats.html +1 -1
- package/package.json +4 -4
package/dist/authhero.d.ts
CHANGED
|
@@ -12021,6 +12021,151 @@ export declare const identitySchema: z.ZodObject<{
|
|
|
12021
12021
|
}, z.ZodAny, "strip"> | undefined;
|
|
12022
12022
|
}>;
|
|
12023
12023
|
export type Identity = z.infer<typeof identitySchema>;
|
|
12024
|
+
export declare const inviterSchema: z.ZodObject<{
|
|
12025
|
+
name: z.ZodOptional<z.ZodString>;
|
|
12026
|
+
}, "strip", z.ZodTypeAny, {
|
|
12027
|
+
name?: string | undefined;
|
|
12028
|
+
}, {
|
|
12029
|
+
name?: string | undefined;
|
|
12030
|
+
}>;
|
|
12031
|
+
export type Inviter = z.infer<typeof inviterSchema>;
|
|
12032
|
+
export declare const inviteeSchema: z.ZodObject<{
|
|
12033
|
+
email: z.ZodOptional<z.ZodString>;
|
|
12034
|
+
}, "strip", z.ZodTypeAny, {
|
|
12035
|
+
email?: string | undefined;
|
|
12036
|
+
}, {
|
|
12037
|
+
email?: string | undefined;
|
|
12038
|
+
}>;
|
|
12039
|
+
export type Invitee = z.infer<typeof inviteeSchema>;
|
|
12040
|
+
export declare const inviteInsertSchema: z.ZodObject<{
|
|
12041
|
+
organization_id: z.ZodString;
|
|
12042
|
+
inviter: z.ZodObject<{
|
|
12043
|
+
name: z.ZodOptional<z.ZodString>;
|
|
12044
|
+
}, "strip", z.ZodTypeAny, {
|
|
12045
|
+
name?: string | undefined;
|
|
12046
|
+
}, {
|
|
12047
|
+
name?: string | undefined;
|
|
12048
|
+
}>;
|
|
12049
|
+
invitee: z.ZodObject<{
|
|
12050
|
+
email: z.ZodOptional<z.ZodString>;
|
|
12051
|
+
}, "strip", z.ZodTypeAny, {
|
|
12052
|
+
email?: string | undefined;
|
|
12053
|
+
}, {
|
|
12054
|
+
email?: string | undefined;
|
|
12055
|
+
}>;
|
|
12056
|
+
invitation_url: z.ZodString;
|
|
12057
|
+
client_id: z.ZodString;
|
|
12058
|
+
connection_id: z.ZodOptional<z.ZodString>;
|
|
12059
|
+
app_metadata: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
12060
|
+
user_metadata: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
12061
|
+
ttl_sec: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
12062
|
+
roles: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
|
|
12063
|
+
send_invitation_email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
12064
|
+
}, "strip", z.ZodTypeAny, {
|
|
12065
|
+
client_id: string;
|
|
12066
|
+
organization_id: string;
|
|
12067
|
+
inviter: {
|
|
12068
|
+
name?: string | undefined;
|
|
12069
|
+
};
|
|
12070
|
+
invitee: {
|
|
12071
|
+
email?: string | undefined;
|
|
12072
|
+
};
|
|
12073
|
+
invitation_url: string;
|
|
12074
|
+
app_metadata?: Record<string, any> | undefined;
|
|
12075
|
+
user_metadata?: Record<string, any> | undefined;
|
|
12076
|
+
connection_id?: string | undefined;
|
|
12077
|
+
ttl_sec?: number | undefined;
|
|
12078
|
+
roles?: string[] | undefined;
|
|
12079
|
+
send_invitation_email?: boolean | undefined;
|
|
12080
|
+
}, {
|
|
12081
|
+
client_id: string;
|
|
12082
|
+
organization_id: string;
|
|
12083
|
+
inviter: {
|
|
12084
|
+
name?: string | undefined;
|
|
12085
|
+
};
|
|
12086
|
+
invitee: {
|
|
12087
|
+
email?: string | undefined;
|
|
12088
|
+
};
|
|
12089
|
+
invitation_url: string;
|
|
12090
|
+
app_metadata?: Record<string, any> | undefined;
|
|
12091
|
+
user_metadata?: Record<string, any> | undefined;
|
|
12092
|
+
connection_id?: string | undefined;
|
|
12093
|
+
ttl_sec?: number | undefined;
|
|
12094
|
+
roles?: string[] | undefined;
|
|
12095
|
+
send_invitation_email?: boolean | undefined;
|
|
12096
|
+
}>;
|
|
12097
|
+
export type InviteInsert = z.infer<typeof inviteInsertSchema>;
|
|
12098
|
+
export declare const inviteSchema: z.ZodObject<{
|
|
12099
|
+
id: z.ZodString;
|
|
12100
|
+
created_at: z.ZodString;
|
|
12101
|
+
expires_at: z.ZodString;
|
|
12102
|
+
ticket_id: z.ZodOptional<z.ZodString>;
|
|
12103
|
+
} & {
|
|
12104
|
+
organization_id: z.ZodString;
|
|
12105
|
+
inviter: z.ZodObject<{
|
|
12106
|
+
name: z.ZodOptional<z.ZodString>;
|
|
12107
|
+
}, "strip", z.ZodTypeAny, {
|
|
12108
|
+
name?: string | undefined;
|
|
12109
|
+
}, {
|
|
12110
|
+
name?: string | undefined;
|
|
12111
|
+
}>;
|
|
12112
|
+
invitee: z.ZodObject<{
|
|
12113
|
+
email: z.ZodOptional<z.ZodString>;
|
|
12114
|
+
}, "strip", z.ZodTypeAny, {
|
|
12115
|
+
email?: string | undefined;
|
|
12116
|
+
}, {
|
|
12117
|
+
email?: string | undefined;
|
|
12118
|
+
}>;
|
|
12119
|
+
invitation_url: z.ZodString;
|
|
12120
|
+
client_id: z.ZodString;
|
|
12121
|
+
connection_id: z.ZodOptional<z.ZodString>;
|
|
12122
|
+
app_metadata: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
12123
|
+
user_metadata: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
12124
|
+
ttl_sec: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
12125
|
+
roles: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
|
|
12126
|
+
send_invitation_email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
12127
|
+
}, "strip", z.ZodTypeAny, {
|
|
12128
|
+
created_at: string;
|
|
12129
|
+
client_id: string;
|
|
12130
|
+
id: string;
|
|
12131
|
+
expires_at: string;
|
|
12132
|
+
organization_id: string;
|
|
12133
|
+
inviter: {
|
|
12134
|
+
name?: string | undefined;
|
|
12135
|
+
};
|
|
12136
|
+
invitee: {
|
|
12137
|
+
email?: string | undefined;
|
|
12138
|
+
};
|
|
12139
|
+
invitation_url: string;
|
|
12140
|
+
app_metadata?: Record<string, any> | undefined;
|
|
12141
|
+
user_metadata?: Record<string, any> | undefined;
|
|
12142
|
+
connection_id?: string | undefined;
|
|
12143
|
+
ttl_sec?: number | undefined;
|
|
12144
|
+
roles?: string[] | undefined;
|
|
12145
|
+
send_invitation_email?: boolean | undefined;
|
|
12146
|
+
ticket_id?: string | undefined;
|
|
12147
|
+
}, {
|
|
12148
|
+
created_at: string;
|
|
12149
|
+
client_id: string;
|
|
12150
|
+
id: string;
|
|
12151
|
+
expires_at: string;
|
|
12152
|
+
organization_id: string;
|
|
12153
|
+
inviter: {
|
|
12154
|
+
name?: string | undefined;
|
|
12155
|
+
};
|
|
12156
|
+
invitee: {
|
|
12157
|
+
email?: string | undefined;
|
|
12158
|
+
};
|
|
12159
|
+
invitation_url: string;
|
|
12160
|
+
app_metadata?: Record<string, any> | undefined;
|
|
12161
|
+
user_metadata?: Record<string, any> | undefined;
|
|
12162
|
+
connection_id?: string | undefined;
|
|
12163
|
+
ttl_sec?: number | undefined;
|
|
12164
|
+
roles?: string[] | undefined;
|
|
12165
|
+
send_invitation_email?: boolean | undefined;
|
|
12166
|
+
ticket_id?: string | undefined;
|
|
12167
|
+
}>;
|
|
12168
|
+
export type Invite = z.infer<typeof inviteSchema>;
|
|
12024
12169
|
export declare const jwksSchema: z.ZodObject<{
|
|
12025
12170
|
alg: z.ZodEnum<[
|
|
12026
12171
|
"RS256",
|
|
@@ -16964,6 +17109,16 @@ export interface UserOrganizationsAdapter {
|
|
|
16964
17109
|
} & Totals>;
|
|
16965
17110
|
update(tenantId: string, id: string, params: Partial<UserOrganizationInsert>): Promise<boolean>;
|
|
16966
17111
|
}
|
|
17112
|
+
export interface ListInvitesResponse extends Totals {
|
|
17113
|
+
invites: Invite[];
|
|
17114
|
+
}
|
|
17115
|
+
export interface InvitesAdapter {
|
|
17116
|
+
create(tenant_id: string, params: InviteInsert): Promise<Invite>;
|
|
17117
|
+
get(tenant_id: string, id: string): Promise<Invite | null>;
|
|
17118
|
+
remove(tenant_id: string, id: string): Promise<boolean>;
|
|
17119
|
+
list(tenant_id: string, params?: ListParams): Promise<ListInvitesResponse>;
|
|
17120
|
+
update(tenant_id: string, id: string, params: Partial<InviteInsert>): Promise<boolean>;
|
|
17121
|
+
}
|
|
16967
17122
|
export interface DataAdapters {
|
|
16968
17123
|
branding: BrandingAdapter;
|
|
16969
17124
|
cache?: CacheAdapter;
|
|
@@ -16976,6 +17131,7 @@ export interface DataAdapters {
|
|
|
16976
17131
|
emailProviders: EmailProvidersAdapter;
|
|
16977
17132
|
forms: FormsAdapter;
|
|
16978
17133
|
hooks: HooksAdapter;
|
|
17134
|
+
invites: InvitesAdapter;
|
|
16979
17135
|
keys: KeysAdapter;
|
|
16980
17136
|
loginSessions: LoginSessionsAdapter;
|
|
16981
17137
|
logs: LogsDataAdapter;
|
|
@@ -18150,6 +18306,230 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
18150
18306
|
status: 200;
|
|
18151
18307
|
};
|
|
18152
18308
|
};
|
|
18309
|
+
} & {
|
|
18310
|
+
"/:id/invitations": {
|
|
18311
|
+
$get: {
|
|
18312
|
+
input: {
|
|
18313
|
+
param: {
|
|
18314
|
+
id: string;
|
|
18315
|
+
};
|
|
18316
|
+
} & {
|
|
18317
|
+
query: {
|
|
18318
|
+
sort?: string | undefined;
|
|
18319
|
+
page?: string | undefined;
|
|
18320
|
+
per_page?: string | undefined;
|
|
18321
|
+
include_totals?: string | undefined;
|
|
18322
|
+
fields?: string | undefined;
|
|
18323
|
+
include_fields?: string | undefined;
|
|
18324
|
+
};
|
|
18325
|
+
} & {
|
|
18326
|
+
header: {
|
|
18327
|
+
"tenant-id": string;
|
|
18328
|
+
};
|
|
18329
|
+
};
|
|
18330
|
+
output: {
|
|
18331
|
+
created_at: string;
|
|
18332
|
+
client_id: string;
|
|
18333
|
+
id: string;
|
|
18334
|
+
expires_at: string;
|
|
18335
|
+
organization_id: string;
|
|
18336
|
+
inviter: {
|
|
18337
|
+
name?: string | undefined | undefined;
|
|
18338
|
+
};
|
|
18339
|
+
invitee: {
|
|
18340
|
+
email?: string | undefined | undefined;
|
|
18341
|
+
};
|
|
18342
|
+
invitation_url: string;
|
|
18343
|
+
app_metadata?: {
|
|
18344
|
+
[x: string]: any;
|
|
18345
|
+
} | undefined;
|
|
18346
|
+
user_metadata?: {
|
|
18347
|
+
[x: string]: any;
|
|
18348
|
+
} | undefined;
|
|
18349
|
+
connection_id?: string | undefined | undefined;
|
|
18350
|
+
ttl_sec?: number | undefined | undefined;
|
|
18351
|
+
roles?: string[] | undefined | undefined;
|
|
18352
|
+
send_invitation_email?: boolean | undefined | undefined;
|
|
18353
|
+
ticket_id?: string | undefined | undefined;
|
|
18354
|
+
}[] | {
|
|
18355
|
+
length: number;
|
|
18356
|
+
start: number;
|
|
18357
|
+
limit: number;
|
|
18358
|
+
invitations: {
|
|
18359
|
+
created_at: string;
|
|
18360
|
+
client_id: string;
|
|
18361
|
+
id: string;
|
|
18362
|
+
expires_at: string;
|
|
18363
|
+
organization_id: string;
|
|
18364
|
+
inviter: {
|
|
18365
|
+
name?: string | undefined | undefined;
|
|
18366
|
+
};
|
|
18367
|
+
invitee: {
|
|
18368
|
+
email?: string | undefined | undefined;
|
|
18369
|
+
};
|
|
18370
|
+
invitation_url: string;
|
|
18371
|
+
app_metadata?: {
|
|
18372
|
+
[x: string]: any;
|
|
18373
|
+
} | undefined;
|
|
18374
|
+
user_metadata?: {
|
|
18375
|
+
[x: string]: any;
|
|
18376
|
+
} | undefined;
|
|
18377
|
+
connection_id?: string | undefined | undefined;
|
|
18378
|
+
ttl_sec?: number | undefined | undefined;
|
|
18379
|
+
roles?: string[] | undefined | undefined;
|
|
18380
|
+
send_invitation_email?: boolean | undefined | undefined;
|
|
18381
|
+
ticket_id?: string | undefined | undefined;
|
|
18382
|
+
}[];
|
|
18383
|
+
};
|
|
18384
|
+
outputFormat: "json";
|
|
18385
|
+
status: 200;
|
|
18386
|
+
};
|
|
18387
|
+
};
|
|
18388
|
+
} & {
|
|
18389
|
+
"/:id/invitations/:invitation_id": {
|
|
18390
|
+
$get: {
|
|
18391
|
+
input: {
|
|
18392
|
+
param: {
|
|
18393
|
+
id: string;
|
|
18394
|
+
invitation_id: string;
|
|
18395
|
+
};
|
|
18396
|
+
} & {
|
|
18397
|
+
header: {
|
|
18398
|
+
"tenant-id": string;
|
|
18399
|
+
};
|
|
18400
|
+
};
|
|
18401
|
+
output: {};
|
|
18402
|
+
outputFormat: string;
|
|
18403
|
+
status: 404;
|
|
18404
|
+
} | {
|
|
18405
|
+
input: {
|
|
18406
|
+
param: {
|
|
18407
|
+
id: string;
|
|
18408
|
+
invitation_id: string;
|
|
18409
|
+
};
|
|
18410
|
+
} & {
|
|
18411
|
+
header: {
|
|
18412
|
+
"tenant-id": string;
|
|
18413
|
+
};
|
|
18414
|
+
};
|
|
18415
|
+
output: {
|
|
18416
|
+
created_at: string;
|
|
18417
|
+
client_id: string;
|
|
18418
|
+
id: string;
|
|
18419
|
+
expires_at: string;
|
|
18420
|
+
organization_id: string;
|
|
18421
|
+
inviter: {
|
|
18422
|
+
name?: string | undefined | undefined;
|
|
18423
|
+
};
|
|
18424
|
+
invitee: {
|
|
18425
|
+
email?: string | undefined | undefined;
|
|
18426
|
+
};
|
|
18427
|
+
invitation_url: string;
|
|
18428
|
+
app_metadata?: {
|
|
18429
|
+
[x: string]: any;
|
|
18430
|
+
} | undefined;
|
|
18431
|
+
user_metadata?: {
|
|
18432
|
+
[x: string]: any;
|
|
18433
|
+
} | undefined;
|
|
18434
|
+
connection_id?: string | undefined | undefined;
|
|
18435
|
+
ttl_sec?: number | undefined | undefined;
|
|
18436
|
+
roles?: string[] | undefined | undefined;
|
|
18437
|
+
send_invitation_email?: boolean | undefined | undefined;
|
|
18438
|
+
ticket_id?: string | undefined | undefined;
|
|
18439
|
+
};
|
|
18440
|
+
outputFormat: "json";
|
|
18441
|
+
status: 200;
|
|
18442
|
+
};
|
|
18443
|
+
};
|
|
18444
|
+
} & {
|
|
18445
|
+
"/:id/invitations": {
|
|
18446
|
+
$post: {
|
|
18447
|
+
input: {
|
|
18448
|
+
param: {
|
|
18449
|
+
id: string;
|
|
18450
|
+
};
|
|
18451
|
+
} & {
|
|
18452
|
+
header: {
|
|
18453
|
+
"tenant-id": string;
|
|
18454
|
+
};
|
|
18455
|
+
} & {
|
|
18456
|
+
json: {
|
|
18457
|
+
client_id: string;
|
|
18458
|
+
inviter: {
|
|
18459
|
+
name?: string | undefined;
|
|
18460
|
+
};
|
|
18461
|
+
invitee: {
|
|
18462
|
+
email?: string | undefined;
|
|
18463
|
+
};
|
|
18464
|
+
app_metadata?: Record<string, any> | undefined;
|
|
18465
|
+
user_metadata?: Record<string, any> | undefined;
|
|
18466
|
+
roles?: string[] | undefined;
|
|
18467
|
+
connection_id?: string | undefined;
|
|
18468
|
+
ttl_sec?: number | undefined;
|
|
18469
|
+
send_invitation_email?: boolean | undefined;
|
|
18470
|
+
};
|
|
18471
|
+
};
|
|
18472
|
+
output: {
|
|
18473
|
+
created_at: string;
|
|
18474
|
+
client_id: string;
|
|
18475
|
+
id: string;
|
|
18476
|
+
expires_at: string;
|
|
18477
|
+
organization_id: string;
|
|
18478
|
+
inviter: {
|
|
18479
|
+
name?: string | undefined | undefined;
|
|
18480
|
+
};
|
|
18481
|
+
invitee: {
|
|
18482
|
+
email?: string | undefined | undefined;
|
|
18483
|
+
};
|
|
18484
|
+
invitation_url: string;
|
|
18485
|
+
app_metadata?: {
|
|
18486
|
+
[x: string]: any;
|
|
18487
|
+
} | undefined;
|
|
18488
|
+
user_metadata?: {
|
|
18489
|
+
[x: string]: any;
|
|
18490
|
+
} | undefined;
|
|
18491
|
+
connection_id?: string | undefined | undefined;
|
|
18492
|
+
ttl_sec?: number | undefined | undefined;
|
|
18493
|
+
roles?: string[] | undefined | undefined;
|
|
18494
|
+
send_invitation_email?: boolean | undefined | undefined;
|
|
18495
|
+
ticket_id?: string | undefined | undefined;
|
|
18496
|
+
};
|
|
18497
|
+
outputFormat: "json";
|
|
18498
|
+
status: 201;
|
|
18499
|
+
};
|
|
18500
|
+
};
|
|
18501
|
+
} & {
|
|
18502
|
+
"/:id/invitations/:invitation_id": {
|
|
18503
|
+
$delete: {
|
|
18504
|
+
input: {
|
|
18505
|
+
param: {
|
|
18506
|
+
id: string;
|
|
18507
|
+
invitation_id: string;
|
|
18508
|
+
};
|
|
18509
|
+
} & {
|
|
18510
|
+
header: {
|
|
18511
|
+
"tenant-id": string;
|
|
18512
|
+
};
|
|
18513
|
+
};
|
|
18514
|
+
output: {};
|
|
18515
|
+
outputFormat: string;
|
|
18516
|
+
status: 204;
|
|
18517
|
+
} | {
|
|
18518
|
+
input: {
|
|
18519
|
+
param: {
|
|
18520
|
+
id: string;
|
|
18521
|
+
invitation_id: string;
|
|
18522
|
+
};
|
|
18523
|
+
} & {
|
|
18524
|
+
header: {
|
|
18525
|
+
"tenant-id": string;
|
|
18526
|
+
};
|
|
18527
|
+
};
|
|
18528
|
+
output: {};
|
|
18529
|
+
outputFormat: string;
|
|
18530
|
+
status: 404;
|
|
18531
|
+
};
|
|
18532
|
+
};
|
|
18153
18533
|
}, "/organizations"> & import("hono/types").MergeSchemaPath<{
|
|
18154
18534
|
"/": {
|
|
18155
18535
|
$get: {
|