@owlmeans/server-auth-identity 0.1.18-rc.47 → 0.1.18-rc.48

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/README.md CHANGED
@@ -10,7 +10,7 @@ whose grants decide access (use `@owlmeans/server-oidc-rp`'s guard and gate, or
10
10
  ## Installation
11
11
 
12
12
  ```bash
13
- bun add @owlmeans/server-auth-identity@^0.1.18-rc.47
13
+ bun add @owlmeans/server-auth-identity@^0.1.18-rc.48
14
14
  ```
15
15
 
16
16
  ## Concepts
@@ -309,7 +309,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
309
309
  your project's skill store (`.agents/skills/`):
310
310
 
311
311
  ```sh
312
- npx @owlmeans/agent-skills@^0.1.18-rc.49
312
+ npx @owlmeans/agent-skills@^0.1.18-rc.51
313
313
  ```
314
314
 
315
315
  The embedded files are version-matched to this package release. Do not edit them
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/server-auth-identity",
4
- "version": "0.1.18-rc.47",
5
- "generatedAt": "2026-10-05T21:03:06.364Z",
4
+ "version": "0.1.18-rc.48",
5
+ "generatedAt": "2026-10-06T11:45:57.652Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -8,7 +8,7 @@ user-invocable: false
8
8
  # @owlmeans/server-auth-identity
9
9
 
10
10
  **Layer:** Server
11
- **Install:** `"@owlmeans/server-auth-identity": "^0.1.18-rc.47"` in `dependencies`
11
+ **Install:** `"@owlmeans/server-auth-identity": "^0.1.18-rc.48"` in `dependencies`
12
12
 
13
13
  The identity store a deployment owns when it does not delegate identity to an external IAM. It
14
14
  answers *who is this person* (account + credentials), *what are they in this app and organization*
package/build/iam.d.ts ADDED
@@ -0,0 +1,22 @@
1
+ import type { AuthPayload } from '@owlmeans/auth';
2
+ /** Find-or-create an end-user identity scoped to an entity by email address.
3
+ *
4
+ * Used by the OTP auth plugin: after code verification, look up whether this
5
+ * email already has a profile under the entity and create one if not.
6
+ */
7
+ export interface EmailIdentityArgs {
8
+ email: string;
9
+ /** The entity (project owner) this login is scoped to */
10
+ entityId?: string;
11
+ /** Human-readable display name (defaults to email) */
12
+ username?: string;
13
+ }
14
+ /** Result matches AuthPayload so it can be embedded directly in the credential. */
15
+ export type EmailIdentityPayload = AuthPayload;
16
+ /** Extension seam for IAM-backed identity operations — Phase 2 fills this */
17
+ export interface IdentityIamExtension {
18
+ /** Inputs and result types for the email find-or-create path */
19
+ EmailIdentityArgs: EmailIdentityArgs;
20
+ EmailIdentityPayload: EmailIdentityPayload;
21
+ }
22
+ //# sourceMappingURL=iam.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iam.d.ts","sourceRoot":"","sources":["../src/iam.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAEjD;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,mFAAmF;AACnF,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAA;AAE9C,6EAA6E;AAC7E,MAAM,WAAW,oBAAoB;IACnC,gEAAgE;IAChE,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,oBAAoB,EAAE,oBAAoB,CAAA;CAC3C"}
package/build/iam.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=iam.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iam.js","sourceRoot":"","sources":["../src/iam.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import type { MongoResource } from '@owlmeans/mongo-resource';
2
+ import type { ResourceRecord } from '@owlmeans/resource';
3
+ import type { Document } from 'mongodb';
4
+ /**
5
+ * The collection filter addressing one record by id, exactly as the resource itself addresses it —
6
+ * `id` onto `_id`, a 24-hex string as an `ObjectId`, anything else matching nothing.
7
+ *
8
+ * Field-level updates go through the native collection (the resource contract replaces whole
9
+ * records), so they need the id the way the collection stores it.
10
+ */
11
+ export declare const idFilter: <T extends ResourceRecord>(resource: MongoResource<T>, id: string) => Document;
12
+ /** A unique index refused the write. */
13
+ export declare const isDuplicateKey: (error: unknown) => boolean;
14
+ //# sourceMappingURL=native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../src/native.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,cAAc,YAAY,aAAa,CAAC,CAAC,CAAC,MAAM,MAAM,KAAG,QACL,CAAA;AAEvF,wCAAwC;AACxC,eAAO,MAAM,cAAc,UAAW,OAAO,KAAG,OACoB,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { criteriaToFilter, MONGO_DUPLICATE_KEY } from '@owlmeans/mongo-resource';
2
+ /**
3
+ * The collection filter addressing one record by id, exactly as the resource itself addresses it —
4
+ * `id` onto `_id`, a 24-hex string as an `ObjectId`, anything else matching nothing.
5
+ *
6
+ * Field-level updates go through the native collection (the resource contract replaces whole
7
+ * records), so they need the id the way the collection stores it.
8
+ */
9
+ export const idFilter = (resource, id) => criteriaToFilter({ id }, new Map(resource.references().map(ref => [ref.field, ref])));
10
+ /** A unique index refused the write. */
11
+ export const isDuplicateKey = (error) => error?.code === MONGO_DUPLICATE_KEY;
12
+ //# sourceMappingURL=native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native.js","sourceRoot":"","sources":["../src/native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAKhF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAA2B,QAA0B,EAAE,EAAU,EAAY,EAAE,CACrG,gBAAgB,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,GAAG,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;AAEvF,wCAAwC;AACxC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAc,EAAW,EAAE,CACvD,KAAmC,EAAE,IAAI,KAAK,mBAAmB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/server-auth-identity",
3
- "version": "0.1.18-rc.47",
3
+ "version": "0.1.18-rc.48",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -23,12 +23,12 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@owlmeans/auth": "^0.1.18-rc.40",
26
- "@owlmeans/auth-common": "^0.1.18-rc.47",
27
- "@owlmeans/basic-ids": "^0.1.18-rc.37",
26
+ "@owlmeans/auth-common": "^0.1.18-rc.48",
27
+ "@owlmeans/basic-ids": "^0.1.18-rc.38",
28
28
  "@owlmeans/context": "^0.1.18-rc.34",
29
29
  "@owlmeans/log": "^0.1.18-rc.2",
30
30
  "@owlmeans/mongo-resource": "^0.1.18-rc.43",
31
- "@owlmeans/oidc": "^0.1.18-rc.55",
31
+ "@owlmeans/oidc": "^0.1.18-rc.56",
32
32
  "@owlmeans/resource": "^0.1.18-rc.40",
33
33
  "@owlmeans/server-context": "^0.1.18-rc.43",
34
34
  "@scure/base": "^2.4.0"