agentsclimarketplace

Igrantio individuals

Skill L3-iGrant/skills/consent/igrantio-individuals

Onboard application users into the iGrant.io Consent Building Block as "individuals" and keep a mapping between your own userId and the returned individualId. Node/TypeScript backend for the Consent BB admin Individual API (create, read, update, list). Use when an application signs up users and must create a corresponding individual so GDPR consents can later be recorded against a data agreement. Pairs with igrantio-consent-records.From its SKILL.md

Install
npx -y skills add L3-iGrant/skills --skill igrantio-individuals

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

4.9 KB, 999 tokens by cl100k_base, as published. Nobody here has run it

iGrant.io individuals (Consent BB admin Individual API)

When to use

When your app onboards a user, create a matching individual in the iGrant.io Consent Building Block and store the returned individualId against your own userId. That mapping is what later lets igrantio-consent-records record and manage consents for the right person.

Integrator intake

Ask one question at a time, a recommended default with each; look up facts in the project, put only decisions to the integrator:

  1. Environment - demo (https://demo-api.igrant.io), staging, or a custom Consent BB deployment (ask its base URL)? Recommend demo to start.
  2. API key - organisation API key for the Consent Building Block? From your iGrant.io organisation account; server-side only, never the browser.
  3. Mapping storage - where does the userId to individualId mapping live: a column on the existing users table (recommended) or a separate store?

The mapping (the important part)

your users table          Consent BB
+----------+-------------+          +---------------------------+
| user_id  | individual  | <──────► | individual { id, ... }    |
|  u_123   |  6541...cd  |          | externalId = "u_123"      |
+----------+-------------+          +---------------------------+

Persist individualId in YOUR database keyed by your userId. The reference uses externalId = your userId so the individual is also recoverable from OWS if the local mapping is ever lost.

API (Consent BB admin, base /v2, Authorization: ApiKey <key>)

MethodPathPurpose
POST/v2/config/individualCreate individual → returns individual.id
GET/v2/config/individual/{id}Read individual
PUT/v2/config/individual/{id}Update individual
GET/v2/config/individuals?limit=&offset=&externalIndividualId=List (find by your userId)

Individual fields: name, email, phone (required), externalId, externalIdType, identityProviderId, iamId, mapperId, deviceType, …

Reference

./references:

  • src/consentClient.ts - dependency-free Consent BB client (individuals.* + consentRecords.*).
  • src/mappingStore.ts - IndividualMappingStore (userId ↔ individualId); in-memory + DB-swappable.
  • src/onboarding.ts - ensureIndividual(client, store, userId, profile): idempotent (local mapping → lookup by externalId → create).
  • src/server.ts - example onboarding endpoints (POST /individuals/onboard, GET /individuals/me).

Steps

  1. cd references && cp .env.example .env; set OWS_ENV (demo|staging), OWS_API_KEY.
  2. npm install.
  3. In your authenticated signup handler:
    const client = createConsentClient({ owsBaseUrl: config.owsBaseUrl, apiKey: config.apiKey });
    const individualId = await ensureIndividual(client, store, session.userId, { name, email, phone });
    // store.set already persisted userId -> individualId; save it in your users table too
    
    userId must come from your session - never from request input.

Clean-code notes

  • The client is the only place Consent BB paths live; onboarding logic is one idempotent function; the mapping store is an interface you back with your DB.
  • The org API key stays server-side; browsers never call the Consent BB directly.

Validation / done criteria

  • npm run typecheck passes.
  • Onboarding the same user twice returns the same individualId and creates one individual (idempotent).
  • Your DB holds userId → individualId after onboarding.

Documentation & workflows

When anything is unclear, consult the iGrant.io documentation before guessing:

What ships with it: 9 files

14.6 KB alongside SKILL.md, 5 of them executable

Keep looking

Skills are one crate of 326,144. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.