authhero 0.107.0 → 0.108.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 +35 -35
- package/dist/authhero.d.ts +81 -1
- package/dist/authhero.mjs +3477 -3391
- package/package.json +8 -4
package/dist/authhero.d.ts
CHANGED
|
@@ -1182,7 +1182,9 @@ declare const ClientSchema: z.ZodObject<{
|
|
|
1182
1182
|
jwks_uri: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
1183
1183
|
discovery_url: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
1184
1184
|
issuer: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
1185
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
1185
1186
|
}, "strip", z.ZodTypeAny, {
|
|
1187
|
+
provider?: string | undefined;
|
|
1186
1188
|
issuer?: string | undefined;
|
|
1187
1189
|
client_secret?: string | undefined;
|
|
1188
1190
|
client_id?: string | undefined;
|
|
@@ -1197,6 +1199,7 @@ declare const ClientSchema: z.ZodObject<{
|
|
|
1197
1199
|
jwks_uri?: string | undefined;
|
|
1198
1200
|
discovery_url?: string | undefined;
|
|
1199
1201
|
}, {
|
|
1202
|
+
provider?: string | undefined;
|
|
1200
1203
|
issuer?: string | undefined;
|
|
1201
1204
|
client_secret?: string | undefined;
|
|
1202
1205
|
client_id?: string | undefined;
|
|
@@ -1220,6 +1223,7 @@ declare const ClientSchema: z.ZodObject<{
|
|
|
1220
1223
|
name: string;
|
|
1221
1224
|
strategy: string;
|
|
1222
1225
|
options?: {
|
|
1226
|
+
provider?: string | undefined;
|
|
1223
1227
|
issuer?: string | undefined;
|
|
1224
1228
|
client_secret?: string | undefined;
|
|
1225
1229
|
client_id?: string | undefined;
|
|
@@ -1244,6 +1248,7 @@ declare const ClientSchema: z.ZodObject<{
|
|
|
1244
1248
|
name: string;
|
|
1245
1249
|
strategy: string;
|
|
1246
1250
|
options?: {
|
|
1251
|
+
provider?: string | undefined;
|
|
1247
1252
|
issuer?: string | undefined;
|
|
1248
1253
|
client_secret?: string | undefined;
|
|
1249
1254
|
client_id?: string | undefined;
|
|
@@ -1397,6 +1402,7 @@ declare const ClientSchema: z.ZodObject<{
|
|
|
1397
1402
|
name: string;
|
|
1398
1403
|
strategy: string;
|
|
1399
1404
|
options?: {
|
|
1405
|
+
provider?: string | undefined;
|
|
1400
1406
|
issuer?: string | undefined;
|
|
1401
1407
|
client_secret?: string | undefined;
|
|
1402
1408
|
client_id?: string | undefined;
|
|
@@ -1468,6 +1474,7 @@ declare const ClientSchema: z.ZodObject<{
|
|
|
1468
1474
|
name: string;
|
|
1469
1475
|
strategy: string;
|
|
1470
1476
|
options?: {
|
|
1477
|
+
provider?: string | undefined;
|
|
1471
1478
|
issuer?: string | undefined;
|
|
1472
1479
|
client_secret?: string | undefined;
|
|
1473
1480
|
client_id?: string | undefined;
|
|
@@ -1619,7 +1626,9 @@ export declare const connectionInsertSchema: z.ZodObject<{
|
|
|
1619
1626
|
jwks_uri: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
1620
1627
|
discovery_url: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
1621
1628
|
issuer: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
1629
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
1622
1630
|
}, "strip", z.ZodTypeAny, {
|
|
1631
|
+
provider?: string | undefined;
|
|
1623
1632
|
issuer?: string | undefined;
|
|
1624
1633
|
client_secret?: string | undefined;
|
|
1625
1634
|
client_id?: string | undefined;
|
|
@@ -1634,6 +1643,7 @@ export declare const connectionInsertSchema: z.ZodObject<{
|
|
|
1634
1643
|
jwks_uri?: string | undefined;
|
|
1635
1644
|
discovery_url?: string | undefined;
|
|
1636
1645
|
}, {
|
|
1646
|
+
provider?: string | undefined;
|
|
1637
1647
|
issuer?: string | undefined;
|
|
1638
1648
|
client_secret?: string | undefined;
|
|
1639
1649
|
client_id?: string | undefined;
|
|
@@ -1655,6 +1665,7 @@ export declare const connectionInsertSchema: z.ZodObject<{
|
|
|
1655
1665
|
name: string;
|
|
1656
1666
|
strategy: string;
|
|
1657
1667
|
options?: {
|
|
1668
|
+
provider?: string | undefined;
|
|
1658
1669
|
issuer?: string | undefined;
|
|
1659
1670
|
client_secret?: string | undefined;
|
|
1660
1671
|
client_id?: string | undefined;
|
|
@@ -1677,6 +1688,7 @@ export declare const connectionInsertSchema: z.ZodObject<{
|
|
|
1677
1688
|
name: string;
|
|
1678
1689
|
strategy: string;
|
|
1679
1690
|
options?: {
|
|
1691
|
+
provider?: string | undefined;
|
|
1680
1692
|
issuer?: string | undefined;
|
|
1681
1693
|
client_secret?: string | undefined;
|
|
1682
1694
|
client_id?: string | undefined;
|
|
@@ -1719,7 +1731,9 @@ export declare const connectionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1719
1731
|
jwks_uri: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
1720
1732
|
discovery_url: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
1721
1733
|
issuer: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
1734
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
1722
1735
|
}, "strip", z.ZodTypeAny, {
|
|
1736
|
+
provider?: string | undefined;
|
|
1723
1737
|
issuer?: string | undefined;
|
|
1724
1738
|
client_secret?: string | undefined;
|
|
1725
1739
|
client_id?: string | undefined;
|
|
@@ -1734,6 +1748,7 @@ export declare const connectionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1734
1748
|
jwks_uri?: string | undefined;
|
|
1735
1749
|
discovery_url?: string | undefined;
|
|
1736
1750
|
}, {
|
|
1751
|
+
provider?: string | undefined;
|
|
1737
1752
|
issuer?: string | undefined;
|
|
1738
1753
|
client_secret?: string | undefined;
|
|
1739
1754
|
client_id?: string | undefined;
|
|
@@ -1757,6 +1772,7 @@ export declare const connectionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1757
1772
|
name: string;
|
|
1758
1773
|
strategy: string;
|
|
1759
1774
|
options?: {
|
|
1775
|
+
provider?: string | undefined;
|
|
1760
1776
|
issuer?: string | undefined;
|
|
1761
1777
|
client_secret?: string | undefined;
|
|
1762
1778
|
client_id?: string | undefined;
|
|
@@ -1781,6 +1797,7 @@ export declare const connectionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1781
1797
|
name: string;
|
|
1782
1798
|
strategy: string;
|
|
1783
1799
|
options?: {
|
|
1800
|
+
provider?: string | undefined;
|
|
1784
1801
|
issuer?: string | undefined;
|
|
1785
1802
|
client_secret?: string | undefined;
|
|
1786
1803
|
client_id?: string | undefined;
|
|
@@ -4661,6 +4678,28 @@ export declare const refreshTokenSchema: z.ZodObject<{
|
|
|
4661
4678
|
last_exchanged_at?: string | undefined;
|
|
4662
4679
|
}>;
|
|
4663
4680
|
export type RefreshToken = z.infer<typeof refreshTokenSchema>;
|
|
4681
|
+
export declare const smsSendParamsSchema: z.ZodObject<{
|
|
4682
|
+
to: z.ZodString;
|
|
4683
|
+
message: z.ZodString;
|
|
4684
|
+
}, "strip", z.ZodTypeAny, {
|
|
4685
|
+
message: string;
|
|
4686
|
+
to: string;
|
|
4687
|
+
}, {
|
|
4688
|
+
message: string;
|
|
4689
|
+
to: string;
|
|
4690
|
+
}>;
|
|
4691
|
+
export type SmsSendParams = z.infer<typeof smsSendParamsSchema>;
|
|
4692
|
+
export declare const smsProviderSchema: z.ZodObject<{
|
|
4693
|
+
name: z.ZodString;
|
|
4694
|
+
options: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
4695
|
+
}, "strip", z.ZodTypeAny, {
|
|
4696
|
+
options: {};
|
|
4697
|
+
name: string;
|
|
4698
|
+
}, {
|
|
4699
|
+
options: {};
|
|
4700
|
+
name: string;
|
|
4701
|
+
}>;
|
|
4702
|
+
export type SmsProvider = z.infer<typeof smsProviderSchema>;
|
|
4664
4703
|
export declare function parseUserId(user_id: string): {
|
|
4665
4704
|
connection: string;
|
|
4666
4705
|
id: string;
|
|
@@ -4939,6 +4978,15 @@ export type Strategy = {
|
|
|
4939
4978
|
Variables: Variables;
|
|
4940
4979
|
}>, connection: Connection, code: string, codeVerifier?: string) => Promise<UserInfo>;
|
|
4941
4980
|
};
|
|
4981
|
+
export type SendSMSParams = {
|
|
4982
|
+
to: string;
|
|
4983
|
+
text: string;
|
|
4984
|
+
template: string;
|
|
4985
|
+
options: any;
|
|
4986
|
+
data: Record<string, string>;
|
|
4987
|
+
};
|
|
4988
|
+
export type SendSMSResponse = {};
|
|
4989
|
+
export type smsService = (param: SendSMSParams) => Promise<SendSMSResponse>;
|
|
4942
4990
|
export declare type Fetcher = {
|
|
4943
4991
|
fetch: typeof fetch;
|
|
4944
4992
|
};
|
|
@@ -4959,6 +5007,9 @@ export type Bindings = {
|
|
|
4959
5007
|
emailProviders?: {
|
|
4960
5008
|
[key: string]: EmailService;
|
|
4961
5009
|
};
|
|
5010
|
+
smsProviders?: {
|
|
5011
|
+
[key: string]: smsService;
|
|
5012
|
+
};
|
|
4962
5013
|
DEFAULT_TENANT_ID?: string;
|
|
4963
5014
|
DEFAULT_CLIENT_ID?: string;
|
|
4964
5015
|
STRATEGIES?: {
|
|
@@ -5171,6 +5222,7 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
5171
5222
|
name: string;
|
|
5172
5223
|
strategy: string;
|
|
5173
5224
|
options?: {
|
|
5225
|
+
provider?: string | undefined;
|
|
5174
5226
|
issuer?: string | undefined;
|
|
5175
5227
|
client_secret?: string | undefined;
|
|
5176
5228
|
client_id?: string | undefined;
|
|
@@ -5199,6 +5251,7 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
5199
5251
|
name: string;
|
|
5200
5252
|
strategy: string;
|
|
5201
5253
|
options?: {
|
|
5254
|
+
provider?: string | undefined;
|
|
5202
5255
|
issuer?: string | undefined;
|
|
5203
5256
|
client_secret?: string | undefined;
|
|
5204
5257
|
client_id?: string | undefined;
|
|
@@ -5241,6 +5294,7 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
5241
5294
|
name: string;
|
|
5242
5295
|
strategy: string;
|
|
5243
5296
|
options?: {
|
|
5297
|
+
provider?: string | undefined;
|
|
5244
5298
|
issuer?: string | undefined;
|
|
5245
5299
|
client_secret?: string | undefined;
|
|
5246
5300
|
client_id?: string | undefined;
|
|
@@ -5296,6 +5350,7 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
5296
5350
|
json: {
|
|
5297
5351
|
name?: string | undefined;
|
|
5298
5352
|
options?: {
|
|
5353
|
+
provider?: string | undefined;
|
|
5299
5354
|
issuer?: string | undefined;
|
|
5300
5355
|
client_secret?: string | undefined;
|
|
5301
5356
|
client_id?: string | undefined;
|
|
@@ -5323,6 +5378,7 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
5323
5378
|
name: string;
|
|
5324
5379
|
strategy: string;
|
|
5325
5380
|
options?: {
|
|
5381
|
+
provider?: string | undefined;
|
|
5326
5382
|
issuer?: string | undefined;
|
|
5327
5383
|
client_secret?: string | undefined;
|
|
5328
5384
|
client_id?: string | undefined;
|
|
@@ -5358,6 +5414,7 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
5358
5414
|
name: string;
|
|
5359
5415
|
strategy: string;
|
|
5360
5416
|
options?: {
|
|
5417
|
+
provider?: string | undefined;
|
|
5361
5418
|
issuer?: string | undefined;
|
|
5362
5419
|
client_secret?: string | undefined;
|
|
5363
5420
|
client_id?: string | undefined;
|
|
@@ -5384,6 +5441,7 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
5384
5441
|
name: string;
|
|
5385
5442
|
strategy: string;
|
|
5386
5443
|
options?: {
|
|
5444
|
+
provider?: string | undefined;
|
|
5387
5445
|
issuer?: string | undefined;
|
|
5388
5446
|
client_secret?: string | undefined;
|
|
5389
5447
|
client_id?: string | undefined;
|
|
@@ -7253,7 +7311,7 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
7253
7311
|
json: {
|
|
7254
7312
|
email: string;
|
|
7255
7313
|
client_id: string;
|
|
7256
|
-
connection:
|
|
7314
|
+
connection: "email";
|
|
7257
7315
|
authParams: {
|
|
7258
7316
|
nonce?: string | undefined;
|
|
7259
7317
|
response_mode?: AuthorizationResponseMode | undefined;
|
|
@@ -7272,6 +7330,28 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
7272
7330
|
vendor_id?: string | undefined;
|
|
7273
7331
|
};
|
|
7274
7332
|
send: "code" | "link";
|
|
7333
|
+
} | {
|
|
7334
|
+
client_id: string;
|
|
7335
|
+
connection: "sms";
|
|
7336
|
+
authParams: {
|
|
7337
|
+
nonce?: string | undefined;
|
|
7338
|
+
response_mode?: AuthorizationResponseMode | undefined;
|
|
7339
|
+
username?: string | undefined;
|
|
7340
|
+
response_type?: AuthorizationResponseType | undefined;
|
|
7341
|
+
audience?: string | undefined;
|
|
7342
|
+
state?: string | undefined;
|
|
7343
|
+
scope?: string | undefined;
|
|
7344
|
+
redirect_uri?: string | undefined;
|
|
7345
|
+
code_challenge_method?: CodeChallengeMethod | undefined;
|
|
7346
|
+
code_challenge?: string | undefined;
|
|
7347
|
+
act_as?: string | undefined;
|
|
7348
|
+
organization?: string | undefined;
|
|
7349
|
+
prompt?: string | undefined;
|
|
7350
|
+
ui_locales?: string | undefined;
|
|
7351
|
+
vendor_id?: string | undefined;
|
|
7352
|
+
};
|
|
7353
|
+
phone_number: string;
|
|
7354
|
+
send: "code";
|
|
7275
7355
|
};
|
|
7276
7356
|
};
|
|
7277
7357
|
output: {};
|