authhero 0.13.1 → 0.14.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 +14 -14
- package/dist/authhero.d.ts +244 -24
- package/dist/authhero.mjs +3560 -3431
- package/package.json +3 -3
package/dist/authhero.d.ts
CHANGED
|
@@ -1587,6 +1587,7 @@ export declare const codeInsertSchema: z.ZodObject<{
|
|
|
1587
1587
|
"oauth2_state",
|
|
1588
1588
|
"ticket"
|
|
1589
1589
|
]>;
|
|
1590
|
+
code_verifier: z.ZodOptional<z.ZodString>;
|
|
1590
1591
|
expires_at: z.ZodString;
|
|
1591
1592
|
used_at: z.ZodOptional<z.ZodString>;
|
|
1592
1593
|
user_id: z.ZodOptional<z.ZodString>;
|
|
@@ -1597,6 +1598,7 @@ export declare const codeInsertSchema: z.ZodObject<{
|
|
|
1597
1598
|
expires_at: string;
|
|
1598
1599
|
user_id?: string | undefined;
|
|
1599
1600
|
connection_id?: string | undefined;
|
|
1601
|
+
code_verifier?: string | undefined;
|
|
1600
1602
|
used_at?: string | undefined;
|
|
1601
1603
|
}, {
|
|
1602
1604
|
code_id: string;
|
|
@@ -1605,6 +1607,7 @@ export declare const codeInsertSchema: z.ZodObject<{
|
|
|
1605
1607
|
expires_at: string;
|
|
1606
1608
|
user_id?: string | undefined;
|
|
1607
1609
|
connection_id?: string | undefined;
|
|
1610
|
+
code_verifier?: string | undefined;
|
|
1608
1611
|
used_at?: string | undefined;
|
|
1609
1612
|
}>;
|
|
1610
1613
|
export type CodeInsert = z.infer<typeof codeInsertSchema>;
|
|
@@ -1621,6 +1624,7 @@ export declare const codeSchema: z.ZodObject<{
|
|
|
1621
1624
|
"oauth2_state",
|
|
1622
1625
|
"ticket"
|
|
1623
1626
|
]>;
|
|
1627
|
+
code_verifier: z.ZodOptional<z.ZodString>;
|
|
1624
1628
|
expires_at: z.ZodString;
|
|
1625
1629
|
used_at: z.ZodOptional<z.ZodString>;
|
|
1626
1630
|
user_id: z.ZodOptional<z.ZodString>;
|
|
@@ -1632,6 +1636,7 @@ export declare const codeSchema: z.ZodObject<{
|
|
|
1632
1636
|
expires_at: string;
|
|
1633
1637
|
user_id?: string | undefined;
|
|
1634
1638
|
connection_id?: string | undefined;
|
|
1639
|
+
code_verifier?: string | undefined;
|
|
1635
1640
|
used_at?: string | undefined;
|
|
1636
1641
|
}, {
|
|
1637
1642
|
created_at: string;
|
|
@@ -1641,6 +1646,7 @@ export declare const codeSchema: z.ZodObject<{
|
|
|
1641
1646
|
expires_at: string;
|
|
1642
1647
|
user_id?: string | undefined;
|
|
1643
1648
|
connection_id?: string | undefined;
|
|
1649
|
+
code_verifier?: string | undefined;
|
|
1644
1650
|
used_at?: string | undefined;
|
|
1645
1651
|
}>;
|
|
1646
1652
|
export type Code = z.infer<typeof codeSchema>;
|
|
@@ -2992,14 +2998,14 @@ export declare const pkceAuthorizationCodeGrantTypeParamsSchema: z.ZodObject<{
|
|
|
2992
2998
|
}, "strip", z.ZodTypeAny, {
|
|
2993
2999
|
code: string;
|
|
2994
3000
|
redirect_uri: string;
|
|
2995
|
-
grant_type: GrantType.AuthorizationCode;
|
|
2996
3001
|
code_verifier: string;
|
|
3002
|
+
grant_type: GrantType.AuthorizationCode;
|
|
2997
3003
|
client_id?: string | undefined;
|
|
2998
3004
|
}, {
|
|
2999
3005
|
code: string;
|
|
3000
3006
|
redirect_uri: string;
|
|
3001
|
-
grant_type: GrantType;
|
|
3002
3007
|
code_verifier: string;
|
|
3008
|
+
grant_type: GrantType;
|
|
3003
3009
|
client_id?: string | undefined;
|
|
3004
3010
|
}>;
|
|
3005
3011
|
export type PKCEAuthorizationCodeGrantTypeParams = z.infer<typeof pkceAuthorizationCodeGrantTypeParamsSchema>;
|
|
@@ -4185,23 +4191,122 @@ export declare const promptSettingSchema: z.ZodObject<{
|
|
|
4185
4191
|
password_first?: boolean | undefined;
|
|
4186
4192
|
}>;
|
|
4187
4193
|
export type PromptSetting = z.infer<typeof promptSettingSchema>;
|
|
4188
|
-
export
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4194
|
+
export declare const emailProviderSchema: z.ZodObject<{
|
|
4195
|
+
name: z.ZodString;
|
|
4196
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
4197
|
+
default_from_address: z.ZodOptional<z.ZodString>;
|
|
4198
|
+
credentials: z.ZodUnion<[
|
|
4199
|
+
z.ZodObject<{
|
|
4200
|
+
accessKeyId: z.ZodString;
|
|
4201
|
+
secretAccessKey: z.ZodString;
|
|
4202
|
+
region: z.ZodString;
|
|
4203
|
+
}, "strip", z.ZodTypeAny, {
|
|
4204
|
+
accessKeyId: string;
|
|
4205
|
+
secretAccessKey: string;
|
|
4206
|
+
region: string;
|
|
4207
|
+
}, {
|
|
4208
|
+
accessKeyId: string;
|
|
4209
|
+
secretAccessKey: string;
|
|
4210
|
+
region: string;
|
|
4211
|
+
}>,
|
|
4212
|
+
z.ZodObject<{
|
|
4213
|
+
smtp_host: z.ZodArray<z.ZodString, "many">;
|
|
4214
|
+
smtp_port: z.ZodNumber;
|
|
4215
|
+
smtp_user: z.ZodString;
|
|
4216
|
+
smtp_pass: z.ZodString;
|
|
4217
|
+
}, "strip", z.ZodTypeAny, {
|
|
4218
|
+
smtp_host: string[];
|
|
4219
|
+
smtp_port: number;
|
|
4220
|
+
smtp_user: string;
|
|
4221
|
+
smtp_pass: string;
|
|
4222
|
+
}, {
|
|
4223
|
+
smtp_host: string[];
|
|
4224
|
+
smtp_port: number;
|
|
4225
|
+
smtp_user: string;
|
|
4226
|
+
smtp_pass: string;
|
|
4227
|
+
}>,
|
|
4228
|
+
z.ZodObject<{
|
|
4229
|
+
api_key: z.ZodString;
|
|
4230
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
4231
|
+
}, "strip", z.ZodTypeAny, {
|
|
4232
|
+
api_key: string;
|
|
4233
|
+
domain?: string | undefined;
|
|
4234
|
+
}, {
|
|
4235
|
+
api_key: string;
|
|
4236
|
+
domain?: string | undefined;
|
|
4237
|
+
}>,
|
|
4238
|
+
z.ZodObject<{
|
|
4239
|
+
connectionString: z.ZodString;
|
|
4240
|
+
}, "strip", z.ZodTypeAny, {
|
|
4241
|
+
connectionString: string;
|
|
4242
|
+
}, {
|
|
4243
|
+
connectionString: string;
|
|
4244
|
+
}>,
|
|
4245
|
+
z.ZodObject<{
|
|
4246
|
+
tenantId: z.ZodString;
|
|
4247
|
+
clientId: z.ZodString;
|
|
4248
|
+
clientSecret: z.ZodString;
|
|
4249
|
+
}, "strip", z.ZodTypeAny, {
|
|
4250
|
+
tenantId: string;
|
|
4251
|
+
clientId: string;
|
|
4252
|
+
clientSecret: string;
|
|
4253
|
+
}, {
|
|
4254
|
+
tenantId: string;
|
|
4255
|
+
clientId: string;
|
|
4256
|
+
clientSecret: string;
|
|
4257
|
+
}>
|
|
4258
|
+
]>;
|
|
4259
|
+
settings: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
|
4260
|
+
}, "strip", z.ZodTypeAny, {
|
|
4261
|
+
name: string;
|
|
4262
|
+
enabled: boolean;
|
|
4263
|
+
credentials: {
|
|
4264
|
+
accessKeyId: string;
|
|
4265
|
+
secretAccessKey: string;
|
|
4266
|
+
region: string;
|
|
4267
|
+
} | {
|
|
4268
|
+
smtp_host: string[];
|
|
4269
|
+
smtp_port: number;
|
|
4270
|
+
smtp_user: string;
|
|
4271
|
+
smtp_pass: string;
|
|
4272
|
+
} | {
|
|
4273
|
+
api_key: string;
|
|
4274
|
+
domain?: string | undefined;
|
|
4275
|
+
} | {
|
|
4276
|
+
connectionString: string;
|
|
4277
|
+
} | {
|
|
4278
|
+
tenantId: string;
|
|
4279
|
+
clientId: string;
|
|
4280
|
+
clientSecret: string;
|
|
4200
4281
|
};
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4282
|
+
default_from_address?: string | undefined;
|
|
4283
|
+
settings?: {} | undefined;
|
|
4284
|
+
}, {
|
|
4285
|
+
name: string;
|
|
4286
|
+
credentials: {
|
|
4287
|
+
accessKeyId: string;
|
|
4288
|
+
secretAccessKey: string;
|
|
4289
|
+
region: string;
|
|
4290
|
+
} | {
|
|
4291
|
+
smtp_host: string[];
|
|
4292
|
+
smtp_port: number;
|
|
4293
|
+
smtp_user: string;
|
|
4294
|
+
smtp_pass: string;
|
|
4295
|
+
} | {
|
|
4296
|
+
api_key: string;
|
|
4297
|
+
domain?: string | undefined;
|
|
4298
|
+
} | {
|
|
4299
|
+
connectionString: string;
|
|
4300
|
+
} | {
|
|
4301
|
+
tenantId: string;
|
|
4302
|
+
clientId: string;
|
|
4303
|
+
clientSecret: string;
|
|
4304
|
+
};
|
|
4305
|
+
enabled?: boolean | undefined;
|
|
4306
|
+
default_from_address?: string | undefined;
|
|
4307
|
+
settings?: {} | undefined;
|
|
4308
|
+
}>;
|
|
4309
|
+
export type EmailProvider = z.infer<typeof emailProviderSchema>;
|
|
4205
4310
|
export declare function parseUserId(user_id: string): {
|
|
4206
4311
|
connection: string;
|
|
4207
4312
|
id: string;
|
|
@@ -4259,11 +4364,6 @@ export interface TenantsDataAdapter {
|
|
|
4259
4364
|
update(id: string, tenant: Partial<Tenant>): Promise<void>;
|
|
4260
4365
|
remove(tenantId: string): Promise<boolean>;
|
|
4261
4366
|
}
|
|
4262
|
-
export interface TicketsAdapter {
|
|
4263
|
-
create: (ticket: Ticket) => Promise<void>;
|
|
4264
|
-
get: (tenant_id: string, id: string) => Promise<Ticket | null>;
|
|
4265
|
-
remove: (tenant_id: string, id: string) => Promise<void>;
|
|
4266
|
-
}
|
|
4267
4367
|
export interface ListUsersResponse extends Totals {
|
|
4268
4368
|
users: User[];
|
|
4269
4369
|
}
|
|
@@ -4348,6 +4448,11 @@ export interface PromptSettingsAdapter {
|
|
|
4348
4448
|
set: (tenant_id: string, promptSetting: Partial<PromptSetting>) => Promise<void>;
|
|
4349
4449
|
get: (tenant_id: string) => Promise<PromptSetting>;
|
|
4350
4450
|
}
|
|
4451
|
+
export interface EmailProvidersAdapter {
|
|
4452
|
+
update: (tenant_id: string, emailProvider: Partial<EmailProvider>) => Promise<void>;
|
|
4453
|
+
create: (tenant_id: string, emailProvider: EmailProvider) => Promise<void>;
|
|
4454
|
+
get: (tenant_id: string) => Promise<EmailProvider | null>;
|
|
4455
|
+
}
|
|
4351
4456
|
export interface DataAdapters {
|
|
4352
4457
|
applications: ApplicationsAdapter;
|
|
4353
4458
|
branding: BrandingAdapter;
|
|
@@ -4355,6 +4460,7 @@ export interface DataAdapters {
|
|
|
4355
4460
|
codes: CodesAdapter;
|
|
4356
4461
|
connections: ConnectionsAdapter;
|
|
4357
4462
|
domains: DomainsAdapter;
|
|
4463
|
+
emailProviders: EmailProvidersAdapter;
|
|
4358
4464
|
hooks: HooksAdapter;
|
|
4359
4465
|
keys: KeysAdapter;
|
|
4360
4466
|
logins: LoginsAdapter;
|
|
@@ -4364,7 +4470,6 @@ export interface DataAdapters {
|
|
|
4364
4470
|
sessions: SessionsAdapter;
|
|
4365
4471
|
tenants: TenantsDataAdapter;
|
|
4366
4472
|
themes: ThemesAdapter;
|
|
4367
|
-
tickets: TicketsAdapter;
|
|
4368
4473
|
users: UserDataAdapter;
|
|
4369
4474
|
}
|
|
4370
4475
|
export declare type Fetcher = {
|
|
@@ -5964,6 +6069,121 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
5964
6069
|
};
|
|
5965
6070
|
};
|
|
5966
6071
|
}, "/users"> & import("hono/types").MergeSchemaPath<{
|
|
6072
|
+
"/": {
|
|
6073
|
+
$get: {
|
|
6074
|
+
input: {
|
|
6075
|
+
header: {
|
|
6076
|
+
"tenant-id": string;
|
|
6077
|
+
};
|
|
6078
|
+
};
|
|
6079
|
+
output: {
|
|
6080
|
+
name: string;
|
|
6081
|
+
enabled: boolean;
|
|
6082
|
+
credentials: {
|
|
6083
|
+
accessKeyId: string;
|
|
6084
|
+
secretAccessKey: string;
|
|
6085
|
+
region: string;
|
|
6086
|
+
} | {
|
|
6087
|
+
smtp_host: string[];
|
|
6088
|
+
smtp_port: number;
|
|
6089
|
+
smtp_user: string;
|
|
6090
|
+
smtp_pass: string;
|
|
6091
|
+
} | {
|
|
6092
|
+
api_key: string;
|
|
6093
|
+
domain?: string | undefined;
|
|
6094
|
+
} | {
|
|
6095
|
+
connectionString: string;
|
|
6096
|
+
} | {
|
|
6097
|
+
tenantId: string;
|
|
6098
|
+
clientId: string;
|
|
6099
|
+
clientSecret: string;
|
|
6100
|
+
};
|
|
6101
|
+
default_from_address?: string | undefined;
|
|
6102
|
+
settings?: {} | undefined;
|
|
6103
|
+
};
|
|
6104
|
+
outputFormat: "json" | "text";
|
|
6105
|
+
status: 200;
|
|
6106
|
+
};
|
|
6107
|
+
};
|
|
6108
|
+
} & {
|
|
6109
|
+
"/": {
|
|
6110
|
+
$post: {
|
|
6111
|
+
input: {
|
|
6112
|
+
header: {
|
|
6113
|
+
"tenant-id": string;
|
|
6114
|
+
};
|
|
6115
|
+
} & {
|
|
6116
|
+
json: {
|
|
6117
|
+
name: string;
|
|
6118
|
+
credentials: {
|
|
6119
|
+
accessKeyId: string;
|
|
6120
|
+
secretAccessKey: string;
|
|
6121
|
+
region: string;
|
|
6122
|
+
} | {
|
|
6123
|
+
smtp_host: string[];
|
|
6124
|
+
smtp_port: number;
|
|
6125
|
+
smtp_user: string;
|
|
6126
|
+
smtp_pass: string;
|
|
6127
|
+
} | {
|
|
6128
|
+
api_key: string;
|
|
6129
|
+
domain?: string | undefined;
|
|
6130
|
+
} | {
|
|
6131
|
+
connectionString: string;
|
|
6132
|
+
} | {
|
|
6133
|
+
tenantId: string;
|
|
6134
|
+
clientId: string;
|
|
6135
|
+
clientSecret: string;
|
|
6136
|
+
};
|
|
6137
|
+
enabled?: boolean | undefined;
|
|
6138
|
+
default_from_address?: string | undefined;
|
|
6139
|
+
settings?: {} | undefined;
|
|
6140
|
+
};
|
|
6141
|
+
};
|
|
6142
|
+
output: {};
|
|
6143
|
+
outputFormat: string;
|
|
6144
|
+
status: 200;
|
|
6145
|
+
};
|
|
6146
|
+
};
|
|
6147
|
+
} & {
|
|
6148
|
+
"/": {
|
|
6149
|
+
$patch: {
|
|
6150
|
+
input: {
|
|
6151
|
+
header: {
|
|
6152
|
+
"tenant-id": string;
|
|
6153
|
+
};
|
|
6154
|
+
} & {
|
|
6155
|
+
json: {
|
|
6156
|
+
name?: string | undefined;
|
|
6157
|
+
enabled?: boolean | undefined;
|
|
6158
|
+
credentials?: {
|
|
6159
|
+
accessKeyId: string;
|
|
6160
|
+
secretAccessKey: string;
|
|
6161
|
+
region: string;
|
|
6162
|
+
} | {
|
|
6163
|
+
smtp_host: string[];
|
|
6164
|
+
smtp_port: number;
|
|
6165
|
+
smtp_user: string;
|
|
6166
|
+
smtp_pass: string;
|
|
6167
|
+
} | {
|
|
6168
|
+
api_key: string;
|
|
6169
|
+
domain?: string | undefined;
|
|
6170
|
+
} | {
|
|
6171
|
+
connectionString: string;
|
|
6172
|
+
} | {
|
|
6173
|
+
tenantId: string;
|
|
6174
|
+
clientId: string;
|
|
6175
|
+
clientSecret: string;
|
|
6176
|
+
} | undefined;
|
|
6177
|
+
default_from_address?: string | undefined;
|
|
6178
|
+
settings?: {} | undefined;
|
|
6179
|
+
};
|
|
6180
|
+
};
|
|
6181
|
+
output: {};
|
|
6182
|
+
outputFormat: string;
|
|
6183
|
+
status: 200;
|
|
6184
|
+
};
|
|
6185
|
+
};
|
|
6186
|
+
}, "/email/providers"> & import("hono/types").MergeSchemaPath<{
|
|
5967
6187
|
"/": {
|
|
5968
6188
|
$get: {
|
|
5969
6189
|
input: {
|