@yielded/auth 0.1.0-beta.2 → 0.1.0-beta.4

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.
Files changed (34) hide show
  1. package/dist/DrizzleD1.d.mts +12 -12
  2. package/dist/DrizzleLibsql.d.mts +11 -11
  3. package/dist/DrizzleMysql2.d.mts +2 -2
  4. package/dist/DrizzlePglite.d.mts +2 -2
  5. package/dist/DrizzlePostgres.d.mts +14 -14
  6. package/dist/DrizzleSqliteBun.d.mts +6 -6
  7. package/dist/DrizzleSqliteDo.d.mts +11 -11
  8. package/dist/DrizzleSqliteNode.d.mts +2 -2
  9. package/dist/DrizzleSqliteWasm.d.mts +14 -14
  10. package/dist/GitHub.d.mts +2 -2
  11. package/dist/GitHub.mjs +2 -2
  12. package/dist/OpenIdClientConnected.d.mts +1 -1
  13. package/dist/drizzle/d1-oauth.d.mts +2 -2
  14. package/dist/oauth/github/protocol.d.mts +7 -3
  15. package/dist/oauth/github/protocol.mjs +24 -11
  16. package/dist/oauth/github/protocol.mjs.map +1 -1
  17. package/dist/oauth/openid-client/compatibility.d.mts +22 -1
  18. package/dist/oauth/openid-client/compatibility.mjs +6 -1
  19. package/dist/oauth/openid-client/compatibility.mjs.map +1 -1
  20. package/dist/oauth/openid-client/configuration.mjs +2 -0
  21. package/dist/oauth/openid-client/configuration.mjs.map +1 -1
  22. package/dist/oauth/openid-client/connected/protocol.d.mts +1 -1
  23. package/dist/oauth/openid-client/models.d.mts +3 -0
  24. package/dist/oauth/openid-client/models.mjs.map +1 -1
  25. package/dist/oauth/openid-client/protocol.d.mts +0 -1
  26. package/dist/oauth/openid-client/protocol.mjs +7 -7
  27. package/dist/oauth/openid-client/protocol.mjs.map +1 -1
  28. package/package.json +1 -1
  29. package/src/GitHub.ts +1 -0
  30. package/src/oauth/github/protocol.ts +30 -10
  31. package/src/oauth/openid-client/compatibility.ts +13 -0
  32. package/src/oauth/openid-client/configuration.ts +2 -0
  33. package/src/oauth/openid-client/models.ts +3 -0
  34. package/src/oauth/openid-client/protocol.ts +6 -22
@@ -321,14 +321,14 @@ declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
321
321
  };
322
322
  }) => Effect.Effect<{
323
323
  readonly _tag: "Rejected";
324
- } | {
325
- readonly _tag: "Conflict";
326
324
  } | {
327
325
  readonly _tag: "Target";
328
326
  readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
329
327
  } | {
330
328
  readonly _tag: "Quarantine";
331
329
  readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
330
+ } | {
331
+ readonly _tag: "Conflict";
332
332
  }, OAuthUnavailable>;
333
333
  readonly settle: <A>(input: {
334
334
  readonly claim: OAuthConnectedClaim;
@@ -339,10 +339,10 @@ declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
339
339
  readonly _tag: "Rejected";
340
340
  } | {
341
341
  readonly _tag: "Ambiguous";
342
- } | {
343
- readonly _tag: "Cancelled";
344
342
  } | {
345
343
  readonly _tag: "Conflict";
344
+ } | {
345
+ readonly _tag: "Cancelled";
346
346
  } | {
347
347
  readonly _tag: "Connected";
348
348
  readonly grant: {
@@ -527,14 +527,14 @@ declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
527
527
  readonly retentionUntilMillis: number;
528
528
  }, prepare: PrepareOAuthCommit<{
529
529
  readonly _tag: "Rejected";
530
+ } | {
531
+ readonly _tag: "Conflict";
530
532
  } | {
531
533
  readonly _tag: "Disconnected";
532
534
  readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
533
535
  readonly remoteRevocation: "Confirmed" | "Pending" | "Unknown" | "Unsupported";
534
536
  readonly affectedGrantCount: number;
535
537
  readonly replayed: boolean;
536
- } | {
537
- readonly _tag: "Conflict";
538
538
  }, A>) => Effect.Effect<PreparedCommit<A>, OAuthUnavailable, never>;
539
539
  readonly inspectAccess: (input: {
540
540
  readonly authorization: OAuthConnectedUseAuthorization;
@@ -542,8 +542,6 @@ declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
542
542
  readonly profileKey: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
543
543
  }) => Effect.Effect<{
544
544
  readonly _tag: "Rejected";
545
- } | {
546
- readonly _tag: "ReauthorizationRequired";
547
545
  } | {
548
546
  readonly _tag: "Busy";
549
547
  } | {
@@ -607,6 +605,8 @@ declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
607
605
  readonly ciphertext: import("effect/Redacted").Redacted<string>;
608
606
  };
609
607
  };
608
+ } | {
609
+ readonly _tag: "ReauthorizationRequired";
610
610
  }, OAuthUnavailable>;
611
611
  readonly claimRefresh: <A>(input: {
612
612
  readonly grant: OAuthConnectedStoredGrant;
@@ -616,10 +616,10 @@ declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
616
616
  readonly lifetimeMillis: number;
617
617
  }, prepare: PrepareOAuthCommit<{
618
618
  readonly _tag: "Rejected";
619
- } | {
620
- readonly _tag: "ReauthorizationRequired";
621
619
  } | {
622
620
  readonly _tag: "Busy";
621
+ } | {
622
+ readonly _tag: "ReauthorizationRequired";
623
623
  } | {
624
624
  readonly _tag: "Claimed";
625
625
  readonly claim: {
@@ -765,10 +765,10 @@ declare const makeOAuthConnectedServices: <S extends AnySQLiteTable<{
765
765
  readonly lifetimeMillis: number;
766
766
  }, prepare: PrepareOAuthCommit<{
767
767
  readonly _tag: "Rejected";
768
- } | {
769
- readonly _tag: "ReauthorizationRequired";
770
768
  } | {
771
769
  readonly _tag: "Busy";
770
+ } | {
771
+ readonly _tag: "ReauthorizationRequired";
772
772
  } | {
773
773
  readonly _tag: "Admitted";
774
774
  readonly admissionId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
@@ -701,9 +701,11 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
701
701
  }, prepare: PrepareOAuthCommit<{
702
702
  readonly _tag: "Rejected";
703
703
  } | {
704
- readonly _tag: "Ambiguous";
704
+ readonly _tag: "Conflict";
705
705
  } | {
706
706
  readonly _tag: "Cancelled";
707
+ } | {
708
+ readonly _tag: "Ambiguous";
707
709
  } | {
708
710
  readonly _tag: "Linked";
709
711
  readonly credential: {
@@ -725,8 +727,6 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
725
727
  };
726
728
  };
727
729
  readonly changed: boolean;
728
- } | {
729
- readonly _tag: "Conflict";
730
730
  }, A>) => Effect.Effect<PreparedCommit<A>, OAuthUnavailable>;
731
731
  readonly inspectUnlink: (input: {
732
732
  readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
@@ -780,10 +780,10 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
780
780
  readonly retentionUntilMillis: number;
781
781
  }, prepare: PrepareOAuthCommit<{
782
782
  readonly _tag: "Rejected";
783
- } | {
784
- readonly _tag: "LastSignInMethod";
785
783
  } | {
786
784
  readonly _tag: "Conflict";
785
+ } | {
786
+ readonly _tag: "LastSignInMethod";
787
787
  } | {
788
788
  readonly _tag: "Unlinked";
789
789
  readonly result: {
@@ -1071,8 +1071,6 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1071
1071
  readonly flow: OAuthConnectedPendingFlow;
1072
1072
  readonly authorization: OAuthConnectedActionAuthorization;
1073
1073
  }, prepare: PrepareOAuthCommit<{
1074
- readonly _tag: "Rejected";
1075
- } | {
1076
1074
  readonly _tag: "Issued";
1077
1075
  readonly flow: {
1078
1076
  readonly context: {
@@ -1164,6 +1162,8 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1164
1162
  };
1165
1163
  readonly retentionUntilMillis: number;
1166
1164
  };
1165
+ } | {
1166
+ readonly _tag: "Rejected";
1167
1167
  }, A>) => Effect.Effect<PreparedCommit<A>, OAuthUnavailable, never>;
1168
1168
  readonly preflight: (input: OAuthConnectedAccess) => Effect.Effect<OAuthConnectedPendingFlow | undefined, OAuthUnavailable>;
1169
1169
  readonly claim: <A>(input: {
@@ -1281,14 +1281,14 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1281
1281
  };
1282
1282
  }) => Effect.Effect<{
1283
1283
  readonly _tag: "Rejected";
1284
- } | {
1285
- readonly _tag: "Conflict";
1286
1284
  } | {
1287
1285
  readonly _tag: "Target";
1288
1286
  readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1289
1287
  } | {
1290
1288
  readonly _tag: "Quarantine";
1291
1289
  readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1290
+ } | {
1291
+ readonly _tag: "Conflict";
1292
1292
  }, OAuthUnavailable>;
1293
1293
  readonly settle: <A>(input: {
1294
1294
  readonly claim: OAuthConnectedClaim;
@@ -1298,11 +1298,11 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1298
1298
  }, prepare: PrepareOAuthCommit<{
1299
1299
  readonly _tag: "Rejected";
1300
1300
  } | {
1301
- readonly _tag: "Ambiguous";
1301
+ readonly _tag: "Conflict";
1302
1302
  } | {
1303
1303
  readonly _tag: "Cancelled";
1304
1304
  } | {
1305
- readonly _tag: "Conflict";
1305
+ readonly _tag: "Ambiguous";
1306
1306
  } | {
1307
1307
  readonly _tag: "Connected";
1308
1308
  readonly grant: {
@@ -802,14 +802,14 @@ declare const makeOAuthAccountsServices: <S extends AnyMySqlTable<{
802
802
  };
803
803
  }) => import("effect/Effect").Effect<{
804
804
  readonly _tag: "Rejected";
805
- } | {
806
- readonly _tag: "Conflict";
807
805
  } | {
808
806
  readonly _tag: "Target";
809
807
  readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
810
808
  } | {
811
809
  readonly _tag: "Quarantine";
812
810
  readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
811
+ } | {
812
+ readonly _tag: "Conflict";
813
813
  }, OAuthUnavailable>;
814
814
  readonly settle: <A>(input: {
815
815
  readonly claim: OAuthConnectedClaim;
@@ -801,14 +801,14 @@ declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
801
801
  };
802
802
  }) => import("effect/Effect").Effect<{
803
803
  readonly _tag: "Rejected";
804
- } | {
805
- readonly _tag: "Conflict";
806
804
  } | {
807
805
  readonly _tag: "Target";
808
806
  readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
809
807
  } | {
810
808
  readonly _tag: "Quarantine";
811
809
  readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
810
+ } | {
811
+ readonly _tag: "Conflict";
812
812
  }, OAuthUnavailable>;
813
813
  readonly settle: <A>(input: {
814
814
  readonly claim: OAuthConnectedClaim;
@@ -222,10 +222,10 @@ declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
222
222
  readonly _tag: "Rejected";
223
223
  } | {
224
224
  readonly _tag: "Ambiguous";
225
- } | {
226
- readonly _tag: "Cancelled";
227
225
  } | {
228
226
  readonly _tag: "Conflict";
227
+ } | {
228
+ readonly _tag: "Cancelled";
229
229
  } | {
230
230
  readonly _tag: "Linked";
231
231
  readonly credential: {
@@ -801,14 +801,14 @@ declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
801
801
  };
802
802
  }) => import("effect/Effect").Effect<{
803
803
  readonly _tag: "Rejected";
804
- } | {
805
- readonly _tag: "Conflict";
806
804
  } | {
807
805
  readonly _tag: "Target";
808
806
  readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
809
807
  } | {
810
808
  readonly _tag: "Quarantine";
811
809
  readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
810
+ } | {
811
+ readonly _tag: "Conflict";
812
812
  }, OAuthUnavailable>;
813
813
  readonly settle: <A>(input: {
814
814
  readonly claim: OAuthConnectedClaim;
@@ -819,10 +819,10 @@ declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
819
819
  readonly _tag: "Rejected";
820
820
  } | {
821
821
  readonly _tag: "Ambiguous";
822
- } | {
823
- readonly _tag: "Cancelled";
824
822
  } | {
825
823
  readonly _tag: "Conflict";
824
+ } | {
825
+ readonly _tag: "Cancelled";
826
826
  } | {
827
827
  readonly _tag: "Connected";
828
828
  readonly grant: {
@@ -1007,14 +1007,14 @@ declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
1007
1007
  readonly retentionUntilMillis: number;
1008
1008
  }, prepare: PrepareOAuthCommit<{
1009
1009
  readonly _tag: "Rejected";
1010
+ } | {
1011
+ readonly _tag: "Conflict";
1010
1012
  } | {
1011
1013
  readonly _tag: "Disconnected";
1012
1014
  readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1013
1015
  readonly remoteRevocation: "Confirmed" | "Pending" | "Unknown" | "Unsupported";
1014
1016
  readonly affectedGrantCount: number;
1015
1017
  readonly replayed: boolean;
1016
- } | {
1017
- readonly _tag: "Conflict";
1018
1018
  }, A>) => import("effect/Effect").Effect<PreparedCommit<A>, OAuthUnavailable, never>;
1019
1019
  readonly inspectAccess: (input: {
1020
1020
  readonly authorization: OAuthConnectedUseAuthorization;
@@ -1022,8 +1022,6 @@ declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
1022
1022
  readonly profileKey: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1023
1023
  }) => import("effect/Effect").Effect<{
1024
1024
  readonly _tag: "Rejected";
1025
- } | {
1026
- readonly _tag: "ReauthorizationRequired";
1027
1025
  } | {
1028
1026
  readonly _tag: "Busy";
1029
1027
  } | {
@@ -1087,6 +1085,8 @@ declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
1087
1085
  readonly ciphertext: import("effect/Redacted").Redacted<string>;
1088
1086
  };
1089
1087
  };
1088
+ } | {
1089
+ readonly _tag: "ReauthorizationRequired";
1090
1090
  }, OAuthUnavailable>;
1091
1091
  readonly claimRefresh: <A>(input: {
1092
1092
  readonly grant: OAuthConnectedStoredGrant;
@@ -1096,10 +1096,10 @@ declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
1096
1096
  readonly lifetimeMillis: number;
1097
1097
  }, prepare: PrepareOAuthCommit<{
1098
1098
  readonly _tag: "Rejected";
1099
- } | {
1100
- readonly _tag: "ReauthorizationRequired";
1101
1099
  } | {
1102
1100
  readonly _tag: "Busy";
1101
+ } | {
1102
+ readonly _tag: "ReauthorizationRequired";
1103
1103
  } | {
1104
1104
  readonly _tag: "Claimed";
1105
1105
  readonly claim: {
@@ -1245,10 +1245,10 @@ declare const makeOAuthAccountsServices: <S extends AnyPgTable<{
1245
1245
  readonly lifetimeMillis: number;
1246
1246
  }, prepare: PrepareOAuthCommit<{
1247
1247
  readonly _tag: "Rejected";
1248
- } | {
1249
- readonly _tag: "ReauthorizationRequired";
1250
1248
  } | {
1251
1249
  readonly _tag: "Busy";
1250
+ } | {
1251
+ readonly _tag: "ReauthorizationRequired";
1252
1252
  } | {
1253
1253
  readonly _tag: "Admitted";
1254
1254
  readonly admissionId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
@@ -699,12 +699,12 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
699
699
  readonly nowMillis: number;
700
700
  }, prepare: PrepareOAuthCommit<{
701
701
  readonly _tag: "Rejected";
702
+ } | {
703
+ readonly _tag: "Conflict";
702
704
  } | {
703
705
  readonly _tag: "Cancelled";
704
706
  } | {
705
707
  readonly _tag: "Ambiguous";
706
- } | {
707
- readonly _tag: "Conflict";
708
708
  } | {
709
709
  readonly _tag: "Linked";
710
710
  readonly credential: {
@@ -1070,8 +1070,6 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1070
1070
  readonly flow: OAuthConnectedPendingFlow;
1071
1071
  readonly authorization: OAuthConnectedActionAuthorization;
1072
1072
  }, prepare: PrepareOAuthCommit<{
1073
- readonly _tag: "Rejected";
1074
- } | {
1075
1073
  readonly _tag: "Issued";
1076
1074
  readonly flow: {
1077
1075
  readonly context: {
@@ -1163,6 +1161,8 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1163
1161
  };
1164
1162
  readonly retentionUntilMillis: number;
1165
1163
  };
1164
+ } | {
1165
+ readonly _tag: "Rejected";
1166
1166
  }, A>) => import("effect/Effect").Effect<PreparedCommit<A>, OAuthUnavailable, never>;
1167
1167
  readonly preflight: (input: OAuthConnectedAccess) => import("effect/Effect").Effect<OAuthConnectedPendingFlow | undefined, OAuthUnavailable>;
1168
1168
  readonly claim: <A>(input: {
@@ -1296,12 +1296,12 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1296
1296
  readonly nowMillis: number;
1297
1297
  }, prepare: PrepareOAuthCommit<{
1298
1298
  readonly _tag: "Rejected";
1299
+ } | {
1300
+ readonly _tag: "Conflict";
1299
1301
  } | {
1300
1302
  readonly _tag: "Cancelled";
1301
1303
  } | {
1302
1304
  readonly _tag: "Ambiguous";
1303
- } | {
1304
- readonly _tag: "Conflict";
1305
1305
  } | {
1306
1306
  readonly _tag: "Connected";
1307
1307
  readonly grant: {
@@ -756,9 +756,11 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
756
756
  }, prepare: PrepareOAuthCommit<{
757
757
  readonly _tag: "Rejected";
758
758
  } | {
759
- readonly _tag: "Ambiguous";
759
+ readonly _tag: "Conflict";
760
760
  } | {
761
761
  readonly _tag: "Cancelled";
762
+ } | {
763
+ readonly _tag: "Ambiguous";
762
764
  } | {
763
765
  readonly _tag: "Linked";
764
766
  readonly credential: {
@@ -780,8 +782,6 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
780
782
  };
781
783
  };
782
784
  readonly changed: boolean;
783
- } | {
784
- readonly _tag: "Conflict";
785
785
  }, A>) => Effect.Effect<PreparedCommit<A>, OAuthUnavailable>;
786
786
  readonly inspectUnlink: (input: {
787
787
  readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
@@ -835,10 +835,10 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
835
835
  readonly retentionUntilMillis: number;
836
836
  }, prepare: PrepareOAuthCommit<{
837
837
  readonly _tag: "Rejected";
838
- } | {
839
- readonly _tag: "LastSignInMethod";
840
838
  } | {
841
839
  readonly _tag: "Conflict";
840
+ } | {
841
+ readonly _tag: "LastSignInMethod";
842
842
  } | {
843
843
  readonly _tag: "Unlinked";
844
844
  readonly result: {
@@ -1126,8 +1126,6 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1126
1126
  readonly flow: OAuthConnectedPendingFlow;
1127
1127
  readonly authorization: OAuthConnectedActionAuthorization;
1128
1128
  }, prepare: PrepareOAuthCommit<{
1129
- readonly _tag: "Rejected";
1130
- } | {
1131
1129
  readonly _tag: "Issued";
1132
1130
  readonly flow: {
1133
1131
  readonly context: {
@@ -1219,6 +1217,8 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1219
1217
  };
1220
1218
  readonly retentionUntilMillis: number;
1221
1219
  };
1220
+ } | {
1221
+ readonly _tag: "Rejected";
1222
1222
  }, A>) => Effect.Effect<PreparedCommit<A>, OAuthUnavailable, never>;
1223
1223
  readonly preflight: (input: OAuthConnectedAccess) => Effect.Effect<OAuthConnectedPendingFlow | undefined, OAuthUnavailable>;
1224
1224
  readonly claim: <A>(input: {
@@ -1336,14 +1336,14 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1336
1336
  };
1337
1337
  }) => Effect.Effect<{
1338
1338
  readonly _tag: "Rejected";
1339
- } | {
1340
- readonly _tag: "Conflict";
1341
1339
  } | {
1342
1340
  readonly _tag: "Target";
1343
1341
  readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1344
1342
  } | {
1345
1343
  readonly _tag: "Quarantine";
1346
1344
  readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1345
+ } | {
1346
+ readonly _tag: "Conflict";
1347
1347
  }, OAuthUnavailable>;
1348
1348
  readonly settle: <A>(input: {
1349
1349
  readonly claim: OAuthConnectedClaim;
@@ -1353,11 +1353,11 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1353
1353
  }, prepare: PrepareOAuthCommit<{
1354
1354
  readonly _tag: "Rejected";
1355
1355
  } | {
1356
- readonly _tag: "Ambiguous";
1356
+ readonly _tag: "Conflict";
1357
1357
  } | {
1358
1358
  readonly _tag: "Cancelled";
1359
1359
  } | {
1360
- readonly _tag: "Conflict";
1360
+ readonly _tag: "Ambiguous";
1361
1361
  } | {
1362
1362
  readonly _tag: "Connected";
1363
1363
  readonly grant: {
@@ -1280,14 +1280,14 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1280
1280
  };
1281
1281
  }) => import("effect/Effect").Effect<{
1282
1282
  readonly _tag: "Rejected";
1283
- } | {
1284
- readonly _tag: "Conflict";
1285
1283
  } | {
1286
1284
  readonly _tag: "Target";
1287
1285
  readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1288
1286
  } | {
1289
1287
  readonly _tag: "Quarantine";
1290
1288
  readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1289
+ } | {
1290
+ readonly _tag: "Conflict";
1291
1291
  }, OAuthUnavailable>;
1292
1292
  readonly settle: <A>(input: {
1293
1293
  readonly claim: OAuthConnectedClaim;
@@ -701,10 +701,10 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
701
701
  readonly _tag: "Rejected";
702
702
  } | {
703
703
  readonly _tag: "Ambiguous";
704
- } | {
705
- readonly _tag: "Cancelled";
706
704
  } | {
707
705
  readonly _tag: "Conflict";
706
+ } | {
707
+ readonly _tag: "Cancelled";
708
708
  } | {
709
709
  readonly _tag: "Linked";
710
710
  readonly credential: {
@@ -1280,14 +1280,14 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1280
1280
  };
1281
1281
  }) => import("effect/Effect").Effect<{
1282
1282
  readonly _tag: "Rejected";
1283
- } | {
1284
- readonly _tag: "Conflict";
1285
1283
  } | {
1286
1284
  readonly _tag: "Target";
1287
1285
  readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1288
1286
  } | {
1289
1287
  readonly _tag: "Quarantine";
1290
1288
  readonly cohortGeneration: string & import("effect/Brand").Brand<"effect-auth/SecurityRevision">;
1289
+ } | {
1290
+ readonly _tag: "Conflict";
1291
1291
  }, OAuthUnavailable>;
1292
1292
  readonly settle: <A>(input: {
1293
1293
  readonly claim: OAuthConnectedClaim;
@@ -1298,10 +1298,10 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1298
1298
  readonly _tag: "Rejected";
1299
1299
  } | {
1300
1300
  readonly _tag: "Ambiguous";
1301
- } | {
1302
- readonly _tag: "Cancelled";
1303
1301
  } | {
1304
1302
  readonly _tag: "Conflict";
1303
+ } | {
1304
+ readonly _tag: "Cancelled";
1305
1305
  } | {
1306
1306
  readonly _tag: "Connected";
1307
1307
  readonly grant: {
@@ -1486,14 +1486,14 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1486
1486
  readonly retentionUntilMillis: number;
1487
1487
  }, prepare: PrepareOAuthCommit<{
1488
1488
  readonly _tag: "Rejected";
1489
+ } | {
1490
+ readonly _tag: "Conflict";
1489
1491
  } | {
1490
1492
  readonly _tag: "Disconnected";
1491
1493
  readonly grantId: string & import("effect/Brand").Brand<"effect-auth/OAuthGrantId">;
1492
1494
  readonly remoteRevocation: "Confirmed" | "Pending" | "Unknown" | "Unsupported";
1493
1495
  readonly affectedGrantCount: number;
1494
1496
  readonly replayed: boolean;
1495
- } | {
1496
- readonly _tag: "Conflict";
1497
1497
  }, A>) => import("effect/Effect").Effect<PreparedCommit<A>, OAuthUnavailable, never>;
1498
1498
  readonly inspectAccess: (input: {
1499
1499
  readonly authorization: OAuthConnectedUseAuthorization;
@@ -1501,8 +1501,6 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1501
1501
  readonly profileKey: string & import("effect/Brand").Brand<"effect-auth/OAuthPermissionProfileKey">;
1502
1502
  }) => import("effect/Effect").Effect<{
1503
1503
  readonly _tag: "Rejected";
1504
- } | {
1505
- readonly _tag: "ReauthorizationRequired";
1506
1504
  } | {
1507
1505
  readonly _tag: "Busy";
1508
1506
  } | {
@@ -1566,6 +1564,8 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1566
1564
  readonly ciphertext: import("effect/Redacted").Redacted<string>;
1567
1565
  };
1568
1566
  };
1567
+ } | {
1568
+ readonly _tag: "ReauthorizationRequired";
1569
1569
  }, OAuthUnavailable>;
1570
1570
  readonly claimRefresh: <A>(input: {
1571
1571
  readonly grant: OAuthConnectedStoredGrant;
@@ -1575,10 +1575,10 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1575
1575
  readonly lifetimeMillis: number;
1576
1576
  }, prepare: PrepareOAuthCommit<{
1577
1577
  readonly _tag: "Rejected";
1578
- } | {
1579
- readonly _tag: "ReauthorizationRequired";
1580
1578
  } | {
1581
1579
  readonly _tag: "Busy";
1580
+ } | {
1581
+ readonly _tag: "ReauthorizationRequired";
1582
1582
  } | {
1583
1583
  readonly _tag: "Claimed";
1584
1584
  readonly claim: {
@@ -1724,10 +1724,10 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1724
1724
  readonly lifetimeMillis: number;
1725
1725
  }, prepare: PrepareOAuthCommit<{
1726
1726
  readonly _tag: "Rejected";
1727
- } | {
1728
- readonly _tag: "ReauthorizationRequired";
1729
1727
  } | {
1730
1728
  readonly _tag: "Busy";
1729
+ } | {
1730
+ readonly _tag: "ReauthorizationRequired";
1731
1731
  } | {
1732
1732
  readonly _tag: "Admitted";
1733
1733
  readonly admissionId: string & import("effect/Brand").Brand<"effect-auth/OAuthClaimId">;
package/dist/GitHub.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { OpenIdClientConfigurationError } from "./oauth/openid-client/models.mjs";
2
2
  import { GitHubOAuthAppConnectedProtocolOptions, GitHubOAuthAppGeneration, GitHubOAuthAppProtocolOptions } from "./oauth/github/models.mjs";
3
- import { gitHubOAuthAppConnectedProtocolLayer, gitHubOAuthAppProtocolLayer, makeGitHubOAuthAppConnectedProtocol, makeGitHubOAuthAppProtocol } from "./oauth/github/protocol.mjs";
3
+ import { gitHubOAuthAppConnectedProtocolLayer, gitHubOAuthAppProtocolLayer, gitHubOAuthAppProvider, makeGitHubOAuthAppConnectedProtocol, makeGitHubOAuthAppProtocol } from "./oauth/github/protocol.mjs";
4
4
  import { gitHubOAuthAppProviderKey } from "./oauth/github/identity.mjs";
5
- export { type GitHubOAuthAppConnectedProtocolOptions, type GitHubOAuthAppGeneration, type GitHubOAuthAppProtocolOptions, OpenIdClientConfigurationError, gitHubOAuthAppConnectedProtocolLayer, gitHubOAuthAppProtocolLayer, gitHubOAuthAppProviderKey, makeGitHubOAuthAppConnectedProtocol, makeGitHubOAuthAppProtocol };
5
+ export { type GitHubOAuthAppConnectedProtocolOptions, type GitHubOAuthAppGeneration, type GitHubOAuthAppProtocolOptions, OpenIdClientConfigurationError, gitHubOAuthAppConnectedProtocolLayer, gitHubOAuthAppProtocolLayer, gitHubOAuthAppProvider, gitHubOAuthAppProviderKey, makeGitHubOAuthAppConnectedProtocol, makeGitHubOAuthAppProtocol };
package/dist/GitHub.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
  import { OpenIdClientConfigurationError } from "./oauth/openid-client/models.mjs";
2
2
  import { gitHubOAuthAppProviderKey } from "./oauth/github/identity.mjs";
3
- import { gitHubOAuthAppConnectedProtocolLayer, gitHubOAuthAppProtocolLayer, makeGitHubOAuthAppConnectedProtocol, makeGitHubOAuthAppProtocol } from "./oauth/github/protocol.mjs";
4
- export { OpenIdClientConfigurationError, gitHubOAuthAppConnectedProtocolLayer, gitHubOAuthAppProtocolLayer, gitHubOAuthAppProviderKey, makeGitHubOAuthAppConnectedProtocol, makeGitHubOAuthAppProtocol };
3
+ import { gitHubOAuthAppConnectedProtocolLayer, gitHubOAuthAppProtocolLayer, gitHubOAuthAppProvider, makeGitHubOAuthAppConnectedProtocol, makeGitHubOAuthAppProtocol } from "./oauth/github/protocol.mjs";
4
+ export { OpenIdClientConfigurationError, gitHubOAuthAppConnectedProtocolLayer, gitHubOAuthAppProtocolLayer, gitHubOAuthAppProvider, gitHubOAuthAppProviderKey, makeGitHubOAuthAppConnectedProtocol, makeGitHubOAuthAppProtocol };
@@ -1,4 +1,4 @@
1
- import { OpenIdClientAuthentication, OpenIdClientConfigurationError, PlainOAuthIdentity } from "./oauth/openid-client/models.mjs";
2
1
  import { OpenIdClientConnectedOAuthProvider, OpenIdClientConnectedOidcProvider, OpenIdClientConnectedProtocolOptions, OpenIdClientConnectedRefreshExpiry, OpenIdClientConnectedRevocation } from "./oauth/openid-client/connected/models.mjs";
2
+ import { OpenIdClientAuthentication, OpenIdClientConfigurationError, PlainOAuthIdentity } from "./oauth/openid-client/models.mjs";
3
3
  import { makeOpenIdClientConnectedProtocol, openIdClientConnectedProtocolLayer } from "./oauth/openid-client/connected/protocol.mjs";
4
4
  export { type OpenIdClientAuthentication, OpenIdClientConfigurationError, type OpenIdClientConnectedOAuthProvider, type OpenIdClientConnectedOidcProvider, type OpenIdClientConnectedProtocolOptions, type OpenIdClientConnectedRefreshExpiry, type OpenIdClientConnectedRevocation, type PlainOAuthIdentity, makeOpenIdClientConnectedProtocol, openIdClientConnectedProtocolLayer };
@@ -147,12 +147,12 @@ declare const makeD1OAuthAccountsServices: <S extends SQLiteTable, O extends SQL
147
147
  readonly nowMillis: number;
148
148
  }, prepare: PrepareOAuthCommit<{
149
149
  readonly _tag: "Rejected";
150
+ } | {
151
+ readonly _tag: "Conflict";
150
152
  } | {
151
153
  readonly _tag: "Cancelled";
152
154
  } | {
153
155
  readonly _tag: "Ambiguous";
154
- } | {
155
- readonly _tag: "Conflict";
156
156
  } | {
157
157
  readonly _tag: "Linked";
158
158
  readonly credential: {
@@ -6,10 +6,14 @@ import { OAuthCallbackId, OAuthCodeResponse, OAuthProtocolConfiguration, OAuthPr
6
6
  import { OAuthConnectedConfiguration, OAuthConnectedGrantResponse, OAuthConnectedProfile, OAuthConnectedTokenContext, OAuthConnectedTokenMaterial } from "../connectedModels.mjs";
7
7
  import { OAuthConnectedProtocol } from "../OAuthConnectedProtocol.mjs";
8
8
  import { OAuthProtocol } from "../OAuthProtocol.mjs";
9
- import { OpenIdClientConfigurationError } from "../openid-client/models.mjs";
10
- import { GitHubOAuthAppConnectedProtocolOptions, GitHubOAuthAppProtocolOptions } from "./models.mjs";
9
+ import { OpenIdClientConfigurationError, OpenIdClientOAuthProvider } from "../openid-client/models.mjs";
10
+ import { GitHubOAuthAppConnectedProtocolOptions, GitHubOAuthAppGeneration, GitHubOAuthAppProtocolOptions } from "./models.mjs";
11
11
  import { Effect, Layer } from "effect";
12
12
  //#region src/oauth/github/protocol.d.ts
13
+ /** A GitHub.com OAuth App generation for the same provider list as generic OIDC.
14
+ * Retains GitHub receipt/error rules and requests read:user, with no repository access.
15
+ * Construction performs no I/O; invalid configuration throws the typed configuration error. */
16
+ declare const gitHubOAuthAppProvider: (registration: GitHubOAuthAppGeneration) => OpenIdClientOAuthProvider;
13
17
  declare const makeGitHubOAuthAppProtocol: (options: GitHubOAuthAppProtocolOptions) => Effect.Effect<{
14
18
  readonly prepareAuthorization: (input: {
15
19
  readonly provider: OAuthProviderKey;
@@ -50,5 +54,5 @@ declare const makeGitHubOAuthAppConnectedProtocol: (options: GitHubOAuthAppConne
50
54
  declare const gitHubOAuthAppProtocolLayer: (options: GitHubOAuthAppProtocolOptions) => Layer.Layer<OAuthProtocol, OAuthUnavailable | OpenIdClientConfigurationError, never>;
51
55
  declare const gitHubOAuthAppConnectedProtocolLayer: (options: GitHubOAuthAppConnectedProtocolOptions) => Layer.Layer<OAuthConnectedProtocol, OAuthUnavailable | OpenIdClientConfigurationError, never>;
52
56
  //#endregion
53
- export { gitHubOAuthAppConnectedProtocolLayer, gitHubOAuthAppProtocolLayer, makeGitHubOAuthAppConnectedProtocol, makeGitHubOAuthAppProtocol };
57
+ export { gitHubOAuthAppConnectedProtocolLayer, gitHubOAuthAppProtocolLayer, gitHubOAuthAppProvider, makeGitHubOAuthAppConnectedProtocol, makeGitHubOAuthAppProtocol };
54
58
  //# sourceMappingURL=protocol.d.mts.map