authhero 0.25.1 → 0.26.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 +21 -21
- package/dist/authhero.d.ts +64 -21
- package/dist/authhero.mjs +14386 -13192
- package/package.json +4 -3
package/dist/authhero.d.ts
CHANGED
|
@@ -1129,22 +1129,19 @@ declare const ClientSchema: z.ZodObject<{
|
|
|
1129
1129
|
dkim_private_key: z.ZodOptional<z.ZodString>;
|
|
1130
1130
|
dkim_public_key: z.ZodOptional<z.ZodString>;
|
|
1131
1131
|
email_api_key: z.ZodOptional<z.ZodString>;
|
|
1132
|
-
email_service: z.ZodOptional<z.
|
|
1133
|
-
z.ZodLiteral<"mailgun">,
|
|
1134
|
-
z.ZodLiteral<"mailchannels">
|
|
1135
|
-
]>>;
|
|
1132
|
+
email_service: z.ZodOptional<z.ZodString>;
|
|
1136
1133
|
}, "strip", z.ZodTypeAny, {
|
|
1137
1134
|
domain: string;
|
|
1138
1135
|
dkim_private_key?: string | undefined;
|
|
1139
1136
|
dkim_public_key?: string | undefined;
|
|
1140
1137
|
email_api_key?: string | undefined;
|
|
1141
|
-
email_service?:
|
|
1138
|
+
email_service?: string | undefined;
|
|
1142
1139
|
}, {
|
|
1143
1140
|
domain: string;
|
|
1144
1141
|
dkim_private_key?: string | undefined;
|
|
1145
1142
|
dkim_public_key?: string | undefined;
|
|
1146
1143
|
email_api_key?: string | undefined;
|
|
1147
|
-
email_service?:
|
|
1144
|
+
email_service?: string | undefined;
|
|
1148
1145
|
}>, "many">;
|
|
1149
1146
|
tenant: z.ZodObject<{
|
|
1150
1147
|
name: z.ZodString;
|
|
@@ -1408,7 +1405,7 @@ declare const ClientSchema: z.ZodObject<{
|
|
|
1408
1405
|
dkim_private_key?: string | undefined;
|
|
1409
1406
|
dkim_public_key?: string | undefined;
|
|
1410
1407
|
email_api_key?: string | undefined;
|
|
1411
|
-
email_service?:
|
|
1408
|
+
email_service?: string | undefined;
|
|
1412
1409
|
}[];
|
|
1413
1410
|
tenant: {
|
|
1414
1411
|
created_at: string;
|
|
@@ -1486,7 +1483,7 @@ declare const ClientSchema: z.ZodObject<{
|
|
|
1486
1483
|
dkim_private_key?: string | undefined;
|
|
1487
1484
|
dkim_public_key?: string | undefined;
|
|
1488
1485
|
email_api_key?: string | undefined;
|
|
1489
|
-
email_service?:
|
|
1486
|
+
email_service?: string | undefined;
|
|
1490
1487
|
}[];
|
|
1491
1488
|
tenant: {
|
|
1492
1489
|
created_at: string;
|
|
@@ -1846,22 +1843,19 @@ export declare const domainInsertSchema: z.ZodObject<{
|
|
|
1846
1843
|
dkim_private_key: z.ZodOptional<z.ZodString>;
|
|
1847
1844
|
dkim_public_key: z.ZodOptional<z.ZodString>;
|
|
1848
1845
|
email_api_key: z.ZodOptional<z.ZodString>;
|
|
1849
|
-
email_service: z.
|
|
1850
|
-
"mailgun",
|
|
1851
|
-
"mailchannels"
|
|
1852
|
-
]>;
|
|
1846
|
+
email_service: z.ZodOptional<z.ZodString>;
|
|
1853
1847
|
}, "strip", z.ZodTypeAny, {
|
|
1854
1848
|
domain: string;
|
|
1855
|
-
email_service: "mailgun" | "mailchannels";
|
|
1856
1849
|
dkim_private_key?: string | undefined;
|
|
1857
1850
|
dkim_public_key?: string | undefined;
|
|
1858
1851
|
email_api_key?: string | undefined;
|
|
1852
|
+
email_service?: string | undefined;
|
|
1859
1853
|
}, {
|
|
1860
1854
|
domain: string;
|
|
1861
|
-
email_service: "mailgun" | "mailchannels";
|
|
1862
1855
|
dkim_private_key?: string | undefined;
|
|
1863
1856
|
dkim_public_key?: string | undefined;
|
|
1864
1857
|
email_api_key?: string | undefined;
|
|
1858
|
+
email_service?: string | undefined;
|
|
1865
1859
|
}>;
|
|
1866
1860
|
export type DomainInsert = z.infer<typeof domainInsertSchema>;
|
|
1867
1861
|
export declare const domainSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
@@ -1873,28 +1867,25 @@ export declare const domainSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1873
1867
|
dkim_private_key: z.ZodOptional<z.ZodString>;
|
|
1874
1868
|
dkim_public_key: z.ZodOptional<z.ZodString>;
|
|
1875
1869
|
email_api_key: z.ZodOptional<z.ZodString>;
|
|
1876
|
-
email_service: z.
|
|
1877
|
-
"mailgun",
|
|
1878
|
-
"mailchannels"
|
|
1879
|
-
]>;
|
|
1870
|
+
email_service: z.ZodOptional<z.ZodString>;
|
|
1880
1871
|
}>, "strip", z.ZodTypeAny, {
|
|
1881
1872
|
created_at: string;
|
|
1882
1873
|
updated_at: string;
|
|
1883
1874
|
id: string;
|
|
1884
1875
|
domain: string;
|
|
1885
|
-
email_service: "mailgun" | "mailchannels";
|
|
1886
1876
|
dkim_private_key?: string | undefined;
|
|
1887
1877
|
dkim_public_key?: string | undefined;
|
|
1888
1878
|
email_api_key?: string | undefined;
|
|
1879
|
+
email_service?: string | undefined;
|
|
1889
1880
|
}, {
|
|
1890
1881
|
created_at: string;
|
|
1891
1882
|
updated_at: string;
|
|
1892
1883
|
id: string;
|
|
1893
1884
|
domain: string;
|
|
1894
|
-
email_service: "mailgun" | "mailchannels";
|
|
1895
1885
|
dkim_private_key?: string | undefined;
|
|
1896
1886
|
dkim_public_key?: string | undefined;
|
|
1897
1887
|
email_api_key?: string | undefined;
|
|
1888
|
+
email_service?: string | undefined;
|
|
1898
1889
|
}>;
|
|
1899
1890
|
export type Domain = z.infer<typeof domainSchema>;
|
|
1900
1891
|
export declare const hookInsertSchema: z.ZodObject<{
|
|
@@ -4398,11 +4389,23 @@ export type OnExecuteCredentialsExchangeAPI = {
|
|
|
4398
4389
|
accessToken: {
|
|
4399
4390
|
setCustomClaim: (claim: string, value: any) => void;
|
|
4400
4391
|
};
|
|
4392
|
+
idToken: {
|
|
4393
|
+
setCustomClaim: (claim: string, value: any) => void;
|
|
4394
|
+
};
|
|
4401
4395
|
access: {
|
|
4402
4396
|
deny: (code: string, reason?: string) => void;
|
|
4403
4397
|
};
|
|
4404
4398
|
};
|
|
4405
4399
|
export type OnExecuteCredentialsExchange = (event: OnExecuteCredentialsExchangeEvent, access: OnExecuteCredentialsExchangeAPI) => Promise<void>;
|
|
4400
|
+
export type SendEmailParams = {
|
|
4401
|
+
to: string;
|
|
4402
|
+
from: string;
|
|
4403
|
+
subject: string;
|
|
4404
|
+
html?: string;
|
|
4405
|
+
text?: string;
|
|
4406
|
+
};
|
|
4407
|
+
export type SendEmailResponse = {};
|
|
4408
|
+
export type EmailService = (param: SendEmailParams) => Promise<SendEmailResponse>;
|
|
4406
4409
|
export declare type Fetcher = {
|
|
4407
4410
|
fetch: typeof fetch;
|
|
4408
4411
|
};
|
|
@@ -4413,9 +4416,12 @@ export type Bindings = {
|
|
|
4413
4416
|
JWKS_SERVICE: Fetcher;
|
|
4414
4417
|
ISSUER: string;
|
|
4415
4418
|
data: DataAdapters;
|
|
4416
|
-
hooks
|
|
4419
|
+
hooks?: {
|
|
4417
4420
|
onExecuteCredentialsExchange?: OnExecuteCredentialsExchange;
|
|
4418
4421
|
};
|
|
4422
|
+
emailProviders?: {
|
|
4423
|
+
[key: string]: EmailService;
|
|
4424
|
+
};
|
|
4419
4425
|
JWKS_CACHE_TIMEOUT_IN_SECONDS: number;
|
|
4420
4426
|
ORGANIZATION_NAME: string;
|
|
4421
4427
|
};
|
|
@@ -6185,6 +6191,43 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
6185
6191
|
Bindings: Bindings;
|
|
6186
6192
|
Variables: Variables;
|
|
6187
6193
|
}, import("hono/types").MergeSchemaPath<{
|
|
6194
|
+
"/signup": {
|
|
6195
|
+
$post: {
|
|
6196
|
+
input: {
|
|
6197
|
+
json: {
|
|
6198
|
+
password: string;
|
|
6199
|
+
email: string;
|
|
6200
|
+
client_id: string;
|
|
6201
|
+
connection: "Username-Password-Authentication";
|
|
6202
|
+
};
|
|
6203
|
+
};
|
|
6204
|
+
output: {
|
|
6205
|
+
email: string;
|
|
6206
|
+
app_metadata: {};
|
|
6207
|
+
user_metadata: {};
|
|
6208
|
+
email_verified: boolean;
|
|
6209
|
+
_id: string;
|
|
6210
|
+
};
|
|
6211
|
+
outputFormat: "json" | "text";
|
|
6212
|
+
status: 200;
|
|
6213
|
+
};
|
|
6214
|
+
};
|
|
6215
|
+
} & {
|
|
6216
|
+
"/change_password": {
|
|
6217
|
+
$post: {
|
|
6218
|
+
input: {
|
|
6219
|
+
json: {
|
|
6220
|
+
email: string;
|
|
6221
|
+
client_id: string;
|
|
6222
|
+
connection: "Username-Password-Authentication";
|
|
6223
|
+
};
|
|
6224
|
+
};
|
|
6225
|
+
output: {};
|
|
6226
|
+
outputFormat: string;
|
|
6227
|
+
status: 200;
|
|
6228
|
+
};
|
|
6229
|
+
};
|
|
6230
|
+
}, "/dbconnections"> & import("hono/types").MergeSchemaPath<{
|
|
6188
6231
|
"/": {
|
|
6189
6232
|
$post: {
|
|
6190
6233
|
input: {
|