challengeValuetextrequiredWhat is to be published to prove it; public by design
Becomes the column challenge_value of domain_claim.
Written at commons/data/models/identity/concepts.ts:341
A claim on a domain, waiting to be proved
Model identity. Written in commons/data/models/identity/concepts.ts:336. Identified by domainClaimId.
challengeValuetextrequiredWhat is to be published to prove it; public by design
Becomes the column challenge_value of domain_claim.
Written at commons/data/models/identity/concepts.ts:341
domaintextrequiredThe domain claimed
Becomes the column domain of domain_claim.
Written at commons/data/models/identity/concepts.ts:340
domainClaimIdidentifierrequiredWhat identifies the claim, made by the application
Becomes the column domain_claim_id of domain_claim.
Written at commons/data/models/identity/concepts.ts:339
expiresAtinstantrequiredWhen it stops being valid
Becomes the column expires_at of domain_claim.
Written at commons/data/models/identity/concepts.ts:345
methodcode of claimMethodrequiredHow it is to be proved
Becomes the column method of domain_claim.
Written at commons/data/models/identity/concepts.ts:342
requestedAtinstantrequiredWhen it was asked for
Becomes the column requested_at of domain_claim.
Written at commons/data/models/identity/concepts.ts:344
statuscode of claimStatusrequiredWhere it is
Becomes the column status of domain_claim.
Written at commons/data/models/identity/concepts.ts:343
tenantoneThe tenant that claims it To tenant. Written at commons/data/models/identity/concepts.ts:466
Projects to the table domain_claim with the primary key domain_claim_id.
| Column | Type | Null | Role | From |
|---|---|---|---|---|
challenge_value | text | false | attribute | domainClaim.challengeValue |
domain | text | false | attribute | domainClaim.domain |
domain_claim_id | text | false | attribute | domainClaim.domainClaimId |
expires_at | timestamp | false | attribute | domainClaim.expiresAt |
method | text | false | attribute | domainClaim.method |
requested_at | timestamp | false | attribute | domainClaim.requestedAt |
status | text | false | attribute | domainClaim.status |
tenant_id | text | false | reference | domainClaim.tenant |
CREATE TABLE IF NOT EXISTS "domain_claim" (
"domain_claim_id" VARCHAR NOT NULL PRIMARY KEY,
"domain" VARCHAR NOT NULL,
"challenge_value" VARCHAR NOT NULL,
"method" VARCHAR NOT NULL,
"status" VARCHAR NOT NULL,
"requested_at" TIMESTAMPTZ NOT NULL,
"expires_at" TIMESTAMPTZ NOT NULL,
"tenant_id" VARCHAR NOT NULL,
CONSTRAINT "domain_claim_tenant_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "tenant" ("tenant_id"),
CONSTRAINT "domain_claim_method_ck" CHECK ("method" IN ('dns_txt', 'http_file', 'email')),
CONSTRAINT "domain_claim_status_ck" CHECK ("status" IN ('pending', 'failed', 'expired'))
);CREATE TABLE IF NOT EXISTS "domain_claim" (
"domain_claim_id" TEXT NOT NULL PRIMARY KEY,
"domain" TEXT NOT NULL,
"challenge_value" TEXT NOT NULL,
"method" TEXT NOT NULL,
"status" TEXT NOT NULL,
"requested_at" TIMESTAMPTZ NOT NULL,
"expires_at" TIMESTAMPTZ NOT NULL,
"tenant_id" TEXT NOT NULL,
CONSTRAINT "domain_claim_tenant_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "tenant" ("tenant_id"),
CONSTRAINT "domain_claim_method_ck" CHECK ("method" IN ('dns_txt', 'http_file', 'email')),
CONSTRAINT "domain_claim_status_ck" CHECK ("status" IN ('pending', 'failed', 'expired'))
);CREATE TABLE IF NOT EXISTS "domain_claim" (
"domain_claim_id" TEXT NOT NULL PRIMARY KEY,
"domain" TEXT NOT NULL,
"challenge_value" TEXT NOT NULL,
"method" TEXT NOT NULL,
"status" TEXT NOT NULL,
"requested_at" TEXT NOT NULL,
"expires_at" TEXT NOT NULL,
"tenant_id" TEXT NOT NULL,
CONSTRAINT "domain_claim_tenant_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "tenant" ("tenant_id"),
CONSTRAINT "domain_claim_method_ck" CHECK ("method" IN ('dns_txt', 'http_file', 'email')),
CONSTRAINT "domain_claim_status_ck" CHECK ("status" IN ('pending', 'failed', 'expired'))
);Read and written from TypeScript with the types the model gives: import { domainClaim } from "@intellectual-frontiers/data/sql/typed/models". Generated in commons/data/sql/typed/models/identity.auto.ts: do not edit.
import { from } from "@intellectual-frontiers/data/sql/typed";
import { domainClaim } from "@intellectual-frontiers/data/sql/typed/models";
const rows = await from(domainClaim).select((s) => ({ domainClaimId: s.domainClaim.domainClaimId, domain: s.domainClaim.domain })).run(runner);