@happyvertical/smrt-profiles 0.51.13 → 0.51.15

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 (47) hide show
  1. package/dist/chunks/{ApiKey-DIqCzx-g.js → ApiKey-BZmbOTnL.js} +3 -3
  2. package/dist/chunks/{ApiKey-DIqCzx-g.js.map → ApiKey-BZmbOTnL.js.map} +1 -1
  3. package/dist/chunks/{ApiKeyCollection-CNFptBxU.js → ApiKeyCollection-Bfb_nw81.js} +3 -3
  4. package/dist/chunks/{ApiKeyCollection-CNFptBxU.js.map → ApiKeyCollection-Bfb_nw81.js.map} +1 -1
  5. package/dist/chunks/{AuditLogCollection-DxR3ZG6_.js → AuditLogCollection-B1YonCAP.js} +2 -2
  6. package/dist/chunks/{AuditLogCollection-DxR3ZG6_.js.map → AuditLogCollection-B1YonCAP.js.map} +1 -1
  7. package/dist/chunks/NostrIdentity-n70E0vck.js +4279 -0
  8. package/dist/chunks/NostrIdentity-n70E0vck.js.map +1 -0
  9. package/dist/chunks/{NostrIdentityCollection-BXtvB0Sd.js → NostrIdentityCollection-Ca74dkaL.js} +2 -2
  10. package/dist/chunks/{NostrIdentityCollection-BXtvB0Sd.js.map → NostrIdentityCollection-Ca74dkaL.js.map} +1 -1
  11. package/dist/chunks/{OidcIdentity-DISriiph.js → OidcIdentity-CChQnYNH.js} +3 -3
  12. package/dist/chunks/{OidcIdentity-DISriiph.js.map → OidcIdentity-CChQnYNH.js.map} +1 -1
  13. package/dist/chunks/{OidcIdentityCollection-B6im_oL_.js → OidcIdentityCollection-D3L0WYbM.js} +3 -3
  14. package/dist/chunks/{OidcIdentityCollection-B6im_oL_.js.map → OidcIdentityCollection-D3L0WYbM.js.map} +1 -1
  15. package/dist/chunks/{ProfileAssetCollection-CuwaiTOk.js → ProfileAssetCollection-V8u4wqSL.js} +3 -3
  16. package/dist/chunks/{ProfileAssetCollection-CuwaiTOk.js.map → ProfileAssetCollection-V8u4wqSL.js.map} +1 -1
  17. package/dist/chunks/{ProfileCollection-BAC5weFA.js → ProfileCollection-BvhD2cfL.js} +24 -24
  18. package/dist/chunks/{ProfileCollection-BAC5weFA.js.map → ProfileCollection-BvhD2cfL.js.map} +1 -1
  19. package/dist/chunks/{ProfileMetadataCollection-DyVxb-Tn.js → ProfileMetadataCollection-DxX_BJKV.js} +2 -2
  20. package/dist/chunks/{ProfileMetadataCollection-DyVxb-Tn.js.map → ProfileMetadataCollection-DxX_BJKV.js.map} +1 -1
  21. package/dist/chunks/{ProfileMetafieldCollection-KSYFXBxU.js → ProfileMetafieldCollection-CMKhVi2I.js} +2 -2
  22. package/dist/chunks/{ProfileMetafieldCollection-KSYFXBxU.js.map → ProfileMetafieldCollection-CMKhVi2I.js.map} +1 -1
  23. package/dist/chunks/{ProfileRelationshipCollection-DigPX3kC.js → ProfileRelationshipCollection-DUVgaIqf.js} +5 -5
  24. package/dist/chunks/{ProfileRelationshipCollection-DigPX3kC.js.map → ProfileRelationshipCollection-DUVgaIqf.js.map} +1 -1
  25. package/dist/chunks/{ProfileRelationshipTermCollection-UkhmGHcr.js → ProfileRelationshipTermCollection-DtA9OM23.js} +2 -2
  26. package/dist/chunks/{ProfileRelationshipTermCollection-UkhmGHcr.js.map → ProfileRelationshipTermCollection-DtA9OM23.js.map} +1 -1
  27. package/dist/chunks/{ProfileRelationshipType-D1WLqC2B.js → ProfileRelationshipType-BRiRka6t.js} +2 -2
  28. package/dist/chunks/{ProfileRelationshipType-D1WLqC2B.js.map → ProfileRelationshipType-BRiRka6t.js.map} +1 -1
  29. package/dist/chunks/{ProfileRelationshipTypeCollection-BapU-NS3.js → ProfileRelationshipTypeCollection-BdXwd7Kf.js} +3 -3
  30. package/dist/chunks/{ProfileRelationshipTypeCollection-BapU-NS3.js.map → ProfileRelationshipTypeCollection-BdXwd7Kf.js.map} +1 -1
  31. package/dist/chunks/{oidcProvisioningPrimitives-BPWWsNb7.js → oidcProvisioningPrimitives-CjOkg3Zd.js} +4 -4
  32. package/dist/chunks/{oidcProvisioningPrimitives-BPWWsNb7.js.map → oidcProvisioningPrimitives-CjOkg3Zd.js.map} +1 -1
  33. package/dist/chunks/{resolveIdentity-QEWj65PQ.js → resolveIdentity-73HQnTlT.js} +16 -16
  34. package/dist/chunks/{resolveIdentity-QEWj65PQ.js.map → resolveIdentity-73HQnTlT.js.map} +1 -1
  35. package/dist/index.d.ts +27 -0
  36. package/dist/index.js +22 -22
  37. package/dist/internal/oidc-provisioning.d.ts +119 -14
  38. package/dist/internal/oidc-provisioning.js +2 -2
  39. package/dist/manifest.json +1 -1
  40. package/dist/smrt-knowledge.json +6 -6
  41. package/dist/types.d.ts +27 -0
  42. package/dist/utils.d.ts +27 -0
  43. package/dist/utils.js +4 -4
  44. package/package.json +10 -10
  45. package/dist/chunks/NostrIdentity-CbnAJgg9.js +0 -3155
  46. package/dist/chunks/NostrIdentity-CbnAJgg9.js.map +0 -1
  47. package/dist/oidc-provisioning.d.ts +0 -95
@@ -1,95 +0,0 @@
1
- import { getDatabase } from '@happyvertical/sql';
2
-
3
- /**
4
- * Coordinate one OIDC provisioning operation across adapters.
5
- *
6
- * Root adapters must expose `beginTransaction`. Already-bound adapters must
7
- * support savepoints. An adapter that exposes only `transaction()` is
8
- * intentionally ambiguous and fails closed instead of risking a nested
9
- * transaction that could roll back its caller's work.
10
- */
11
- export declare function coordinateOidcProvisioning<T>(options: OidcProvisioningCoordinatorOptions<T>): Promise<T>;
12
-
13
- /**
14
- * Trusted integration surface for framework packages participating in the
15
- * owner-aware OIDC provisioning transaction.
16
- *
17
- * Application code should use UserCollection.getOrCreateFromOidc() instead.
18
- * The generic result avoids duplicating nominal SMRT model declarations across
19
- * package entry bundles; trusted callers bind it to the root package model.
20
- */
21
- export declare function createOidcProvisioningPerson<TProfile>(db: DatabaseInterface, input: OidcProvisioningPersonInput): Promise<TProfile>;
22
-
23
- declare type DatabaseInterface = Awaited<ReturnType<typeof getDatabase>>;
24
-
25
- declare type DatabaseInterface_2 = Awaited<ReturnType<typeof getDatabase>>;
26
-
27
- /** Trusted integration insert after the caller proves Profile ownership. */
28
- export declare function insertOidcProvisioningIdentity<TIdentity>(db: DatabaseInterface, input: OidcProvisioningIdentityInput): Promise<TIdentity>;
29
-
30
- /**
31
- * Detect an adapter error caused by an aborted transaction.
32
- *
33
- * Reduced to the framework contract in #2366. The heuristic this replaced
34
- * matched a bare `/transaction.*aborted/` against every message in the chain,
35
- * which would misclassify a genuine foreign-key or check violation whose text
36
- * happened to mention a transaction. Core now recognizes PostgreSQL's
37
- * `25P02 in_failed_sql_transaction` from the driver's own SQLSTATE, whichever
38
- * layer wrapped it.
39
- *
40
- * Kept as a named export because it is part of this package's provisioning
41
- * API surface; the body is now a single delegation.
42
- */
43
- export declare function isOidcAbortedTransactionError(error: unknown): boolean;
44
-
45
- /** Classify only the durable constraints used to converge OIDC retries. */
46
- export declare function isOidcProvisioningRaceConflict(error: unknown, options?: OidcProvisioningRaceClassifierOptions): boolean;
47
-
48
- /** Shared transaction and concurrency policy for OIDC provisioning. */
49
- export declare interface OidcProvisioningCoordinatorOptions<T> {
50
- /** Root or transaction-bound database used for every provisioning write. */
51
- db: DatabaseInterface_2;
52
- /**
53
- * Stable keys used for local serialization. Supply both the exact
54
- * issuer/subject key and normalized email when available.
55
- */
56
- lockKeys: readonly string[];
57
- /** Package-specific durable race-arbiter classifier. */
58
- isRaceConflict: (error: unknown) => boolean;
59
- /** Package-specific transaction failure mapping. */
60
- createTransactionError: (message: string, cause?: unknown) => Error;
61
- /** Package-specific terminal concurrency failure mapping. */
62
- createConcurrencyError: (cause?: unknown) => Error;
63
- /** Provision atomically using the supplied transaction-bound handle. */
64
- provision: (tx: DatabaseInterface_2) => Promise<T>;
65
- /**
66
- * Rehydrate root-owned results after commit so models do not retain a
67
- * released transaction client. Omit for non-model results.
68
- */
69
- rebindRootResult?: (result: T, rootDb: DatabaseInterface_2) => Promise<T>;
70
- }
71
-
72
- export declare interface OidcProvisioningIdentityInput {
73
- email?: string;
74
- issuer: string;
75
- profileId: string;
76
- provider: string;
77
- subject: string;
78
- }
79
-
80
- export declare interface OidcProvisioningPersonInput {
81
- email?: string;
82
- name?: string;
83
- preferredUsername?: string;
84
- subject: string;
85
- }
86
-
87
- export declare interface OidcProvisioningRaceClassifierOptions {
88
- /** Package-specific database constraint messages. */
89
- messagePatterns?: readonly RegExp[];
90
- }
91
-
92
- /** Wrap a known OIDC arbiter write so only its unique failure is retryable. */
93
- export declare function saveOidcRaceArbiter<T>(operation: () => Promise<T>): Promise<T>;
94
-
95
- export { }