Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions model/protocol.cto
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ concept TemplateMetadata {
@description("An Accord Project template")
concept Template identified by uri {
o URI uri
o String hash optional
o String author
o String displayName optional
o String version
Expand Down Expand Up @@ -115,7 +116,7 @@ concept Metadata {
@description("Runtime status of an agreement")
enum AgreementStatusType {
o DRAFT // No signatories have signed yet
o SIGNNG // Signed by some but not all signatories
o SIGNING // Signed by some but not all signatories
o COMPLETED // Signing by all signatories completed
o SUPERSEDED // Superseded by subsequent agreement
}
Expand All @@ -125,6 +126,7 @@ enum AgreementStatusType {
concept Agreement identified by uri {
o URI uri
o JSON data
o String templateHash optional // Resolved hash of the template at the time the agreement was created
--> Template template // Template for the the agreement // Data for the agreement (an instance of the data for its template)
o JSON state optional // Runtime state of the agreement
o AgreementStatusType agreementStatus // Current status of agreement
Expand Down Expand Up @@ -169,7 +171,8 @@ concept Signature {
o AgreementParty signatory // The Agreement Party signing the Agreement
o DateTime signedAt optional // When the signing occurred
o Metadata metadata // Geolocation data, IP address, etc.
o Blob[] signatureImage // Selfie, proof-of-id, sign-on-glass image
o Blob[] signatureImage optional // Selfie, proof-of-id, sign-on-glass image
o JSON verifiableCredential optional // W3C Verifiable Credential carrying the cryptographic proof
}

@description("Abstract conversion options")
Expand Down
8 changes: 4 additions & 4 deletions server/db/schema.ts

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions server/drizzle/0002_rename_signing_enum.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- Rename the misspelled enum value SIGNNG -> SIGNING in AgreementStatusType.
-- RENAME VALUE is atomic and auto-updates every row that holds the old value
-- (Postgres >= 10), so no separate UPDATE is needed.
ALTER TYPE "public"."AgreementStatusType" RENAME VALUE 'SIGNNG' TO 'SIGNING';
323 changes: 323 additions & 0 deletions server/drizzle/meta/0002_snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,323 @@
{
"id": "c9fb89b7-a21f-43a6-b5ef-6255cc442569",
"prevId": "bac484a3-fa45-45ea-a9ae-222276cc52bd",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.Agreement": {
"name": "Agreement",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"uri": {
"name": "uri",
"type": "text",
"primaryKey": false,
"notNull": true
},
"data": {
"name": "data",
"type": "json",
"primaryKey": false,
"notNull": true
},
"template": {
"name": "template",
"type": "text",
"primaryKey": false,
"notNull": false
},
"template_hash": {
"name": "template_hash",
"type": "varchar(64)",
"primaryKey": false,
"notNull": false
},
"state": {
"name": "state",
"type": "json",
"primaryKey": false,
"notNull": false
},
"agreement_status": {
"name": "agreement_status",
"type": "AgreementStatusType",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"agreement_parties": {
"name": "agreement_parties",
"type": "json[]",
"primaryKey": false,
"notNull": false
},
"signatures": {
"name": "signatures",
"type": "json[]",
"primaryKey": false,
"notNull": false
},
"history_entries": {
"name": "history_entries",
"type": "json[]",
"primaryKey": false,
"notNull": false
},
"attachments": {
"name": "attachments",
"type": "json[]",
"primaryKey": false,
"notNull": false
},
"references": {
"name": "references",
"type": "text[]",
"primaryKey": false,
"notNull": false
},
"metadata": {
"name": "metadata",
"type": "json",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"Agreement_uri_unique": {
"name": "Agreement_uri_unique",
"nullsNotDistinct": false,
"columns": [
"uri"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.SharedModel": {
"name": "SharedModel",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"uri": {
"name": "uri",
"type": "text",
"primaryKey": false,
"notNull": true
},
"model": {
"name": "model",
"type": "json",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"SharedModel_uri_unique": {
"name": "SharedModel_uri_unique",
"nullsNotDistinct": false,
"columns": [
"uri"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.Template": {
"name": "Template",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"uri": {
"name": "uri",
"type": "text",
"primaryKey": false,
"notNull": true
},
"author": {
"name": "author",
"type": "text",
"primaryKey": false,
"notNull": true
},
"hash": {
"name": "hash",
"type": "varchar(64)",
"primaryKey": false,
"notNull": false
},
"display_name": {
"name": "display_name",
"type": "text",
"primaryKey": false,
"notNull": false
},
"version": {
"name": "version",
"type": "text",
"primaryKey": false,
"notNull": true
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": false
},
"license": {
"name": "license",
"type": "text",
"primaryKey": false,
"notNull": true
},
"keywords": {
"name": "keywords",
"type": "text[]",
"primaryKey": false,
"notNull": false
},
"metadata": {
"name": "metadata",
"type": "json",
"primaryKey": false,
"notNull": true
},
"logo": {
"name": "logo",
"type": "json",
"primaryKey": false,
"notNull": false
},
"template_model": {
"name": "template_model",
"type": "json",
"primaryKey": false,
"notNull": true
},
"text": {
"name": "text",
"type": "json",
"primaryKey": false,
"notNull": true
},
"logic": {
"name": "logic",
"type": "json",
"primaryKey": false,
"notNull": false
},
"sample_request": {
"name": "sample_request",
"type": "json",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"Template_uri_unique": {
"name": "Template_uri_unique",
"nullsNotDistinct": false,
"columns": [
"uri"
]
},
"Template_hash_unique": {
"name": "Template_hash_unique",
"nullsNotDistinct": false,
"columns": [
"hash"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
}
},
"enums": {
"public.AgreementStatusType": {
"name": "AgreementStatusType",
"schema": "public",
"values": [
"DRAFT",
"SIGNING",
"COMPLETED",
"SUPERSEDED"
]
},
"public.CodeEncodingType": {
"name": "CodeEncodingType",
"schema": "public",
"values": [
"PLAIN_TEXT",
"BASE64"
]
},
"public.CodeType": {
"name": "CodeType",
"schema": "public",
"values": [
"ES2015",
"WASM_BYTES",
"TYPESCRIPT"
]
},
"public.FeatureType": {
"name": "FeatureType",
"schema": "public",
"values": [
"TEMPLATE_MANAGE",
"TEMPLATE_VERIFY_SIGNATURES",
"TEMPLATE_LOGIC",
"TEMPLATE_STATEFUL",
"LOGIC_WASM",
"LOGIC_ES2015",
"LOGIC_TYPESCRIPT",
"AGREEMENT_MANAGE",
"AGREEMENT_TRIGGER",
"AGREEMENT_STATE",
"AGREEMENT_CONVERT_HTML",
"AGREEMENT_SIGNING",
"SHARED_MODEL_MANAGE"
]
}
},
"schemas": {},
"sequences": {},
"roles": {},
"policies": {},
"views": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}
7 changes: 7 additions & 0 deletions server/drizzle/meta/_journal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
"when": 1771737227233,
"tag": "0001_simple_clint_barton",
"breakpoints": true
},
{
"idx": 2,
"version": "7",
"when": 1779996510694,
"tag": "0002_rename_signing_enum",
"breakpoints": true
}
]
}
Loading
Loading