Skip to content

@aletheia-dev/api-client ​

0.7.0 ​

Minor Changes ​

  • 6ef571a: Uploads are presigned PUTs, which every S3-compatible store serves, Cloudflare R2 among them. DocumentUploadTicket.upload is { method: 'PUT', url, headers, expiresAt }: the URL is signed for the declared Content-Type and sizeBytes, and fields and maxBytes are gone. uploadToStorage sends the file as the request body with the ticket's headers, and UploadXhr gains setRequestHeader.

Patch Changes ​

  • 250c4b6: The package ships without source maps. Its homepage is its page on the documentation site, issues go to the support page or aletheia-dev@ajrd.net, and the changelog no longer links commits.
  • Updated dependencies [c7b166c]
  • Updated dependencies [6ef571a]
  • Updated dependencies [250c4b6]
    • @aletheia-dev/core@0.7.0

0.6.0 ​

Minor Changes ​

  • d6ddf8b: apps, appInvocations and appCallbacks cover the app routes: the catalogue, module uploads (upload sends the bytes as application/wasm), publishing and its approvals, installs, secrets, test calls, usage, health and the record of app calls and vendor sessions.

  • 26474ac: plugins, pluginInvocations and pluginCallbacks are removed with the plugin routes, and so are PluginSummary, ConfigurePluginBody, PluginHealthParams, PluginInvocationQuery, the plugin client types and the plugin schemas re-exported from @aletheia-dev/core. apps, appInvocations and appCallbacks cover the apps that replace them.

  • d40d16f: SubmissionEventInput (step_viewed with a stepId, upload_failed with a fieldKey and a lowercase reason code) and MAX_SUBMISSION_EVENTS: what the collection terminal reports to POST /collection-submissions/:id/events. FlowFunnel and FlowFunnelQuery: a flow's drop-off from GET /stats/flows/:key/funnel (opened, submitted, per step reached and stoppedHere, and uploadFailures), which the API client reads with stats.flowFunnel(key, { days }).

  • 78c68ac: An app whose asynchronous action starts a session the applicant takes part in (a liveness check, documents the vendor collects) declares handles.handoff (an AppHandoffSdk such as sumsub) and hands the session to the applicant's browser as an AppHandoff (sdk, a short-lived token and its expiresAt), or null once the vendor has everything. The collection terminal shows the vendor's SDK with it after the submit. HandoffUnavailableError (409 handoff_unavailable) says nothing waits for the applicant at a vendor, and SubmissionStatus.handoff is true while the run waits for such a check.

Patch Changes ​

  • Updated dependencies [7821afa, c9d9f77, 8984323, 19af0f9, 0b5f8ad, 26474ac, 729209c, e2bef29, d40d16f, 259e0b5, c05e741, e290fd4, 75b54c5, 1551100, 78c68ac]:
    • @aletheia-dev/core@0.6.0

0.5.0 ​

Minor Changes ​

  • 4bbc905: Approvals: a requester (or an admin) withdraws an open request with POST <prefix>/{key}/versions/{version}/withdraw, which closes it as withdrawn (a new ApprovalDecision) and returns the version to draft; anyone else gets 403 not_requester (NotRequesterError). Requests carry an append-only discussion (GET/POST /approvals/{id}/comments, ApprovalComment). GET /approvals filters on status (open or decided), kind, mine and stale, pages, and returns a total (ApprovalListQuery); GET /approvals/{id} returns the request with its version, published version, diff, latest backtest, dependencies, usage, eligible approvers and discussion (ApprovalDetail). POST /backtests also takes a workflow version (StartWorkflowBacktestInput, { workflowKey, version? }): each recorded evaluation of its runs is replayed through the rule step of the same id, and the summary adds the replayed outcomes in decisions; Backtest carries workflowKey and workflowVersion, with ruleKey and ruleVersion now optional. The client replaces governance.approvals.listOpen with list and adds approvals.get, comments and comment, governance.withdraw and isNotRequester.

  • 40ee302: Audit: every row written during an API request records meta (RequestMeta: request id, route, IP, user agent; TenantContext.request), included in exports as a meta column. GET /audit-events/{id} answers an AuditEventDetail: the event, its neighbors under the list filters it takes and the related case, decision, run and subject. GET /audit-events/count previews an export (AuditExportPreview). The export takes filename and trails X-Export-Rows. Saved views per user: GET, POST /audit-views, DELETE /audit-views/{id} (AuditView, AuditViewInput, AuditViewFilters). Scheduled exports: GET, POST /audit-export-schedules, GET, PUT, DELETE /audit-export-schedules/{id}, GET /audit-export-schedules/{id}/runs and POST /audit-export-runs/{id}/download (AuditExportSchedule, AuditExportScheduleInput, ScheduledExportFilter, CronExpression, AuditExportRun, AuditExportRunStatus, AuditExportDownload); AttentionItem gains export_failed. The client's audit.get takes the list filter and answers the detail, audit.count is new, audit.export and audit.exportUrl take a file name, and auditViews and auditExports are new.

  • e236779: Requests for information. POST /cases/:id/request-info sends the applicant the form the case's run collected again, pre-filled, with the reviewer's message; the case waits with its SLA paused (infoRequestedAt) and the run repeats its checks on the answers before handing the case back. An unanswered request expires with the case rejected (info_not_provided). Submissions gain the withdrawn and expired statuses and caseId, requestMessage and expiresAt; operators can re-issue a link (POST /collection-submissions/:id/link) or withdraw a submission (POST /collection-submissions/:id/withdraw), and GET /collection-submissions/:id/status names the form the run waits for next. The client adds cases.requestInfo, collectionSubmissions.reissueLink and collectionSubmissions.withdraw.

  • 6d17f78: Cases: GET /cases filters on queue (the routing label a run gives its case through the create_case step's queueFrom; priorityFrom sets the priority the same way), reasonCode, country and waiting, searches the subject and the case id, applies a queue with queueId and names the assignee with expand=assignee. GET /cases/{id}/evidence returns the rule hits, documents, vendor checks (with a readable resultLabel), events and decisions in one response, GET /case-types the types in use, and GET/PUT /reason-codes a reason-code catalogue that decisions are then checked against (ReasonCode, CaseEvidence, CaseType). Every tenant has the system queues; queues carry systemKey, visibility (everyone, admins, personal) and claimNext, are reordered with PUT /case-queues/order and previewed with POST /case-queues/preview, and POST /cases/claim-next {} draws from the claim-next queues. The client adds cases.evidence, types and reasonCodes, and caseQueues.reorder and preview.

  • 84e50a4: Definitions: PATCH <prefix>/{key}/versions/{version} saves a draft version in place (the body PUT takes, with an optional change note; 409 once it is no longer a draft), and every definition entity and DefinitionVersionSummary carries note and updatedBy (VersionNote, VersionNoteInput). POST /rule-definitions/validate and POST /rule-sets/validate answer a ValidationReport with warnings such as list_stale and unpublished_rule. Dry runs take versions (up to 5) and answer { key, results: [{ version, status, type, result, explanation }], dataPaths } (DryRunInput, DryRunResponse); analysts with backtests:run may run them. A workflow DefinitionDiff adds steps (DiffStep). GET /definitions/usage lists what names each rule, rule set and collection flow (DefinitionUsage, UsageLink). POST /workflow-definitions/context-paths lists the run-context paths a step can read (ContextPath). POST /collection-flows/{key}/versions/{version}/preview returns a 15-minute preview link (FlowPreviewLink) that the collection terminal opens with GET /collection-flow-preview (FlowPreview). GET /definitions/packs lists the starter packs (PolicyPackSummary) and POST /definitions/import?pack= imports one. The client adds updateDraft to every definition domain, ruleDefinitions.validate, ruleSets.validate, workflowDefinitions.contextPaths, collectionFlows.preview, definitions.usage, policyPacks.starters and importStarter; dryRun takes versions.

  • 6ba6815: Outbound webhooks: GET, POST /webhook-endpoints, GET, PUT, DELETE /webhook-endpoints/{id} (the signing secret is returned once), POST /webhook-endpoints/{id}/test (a signed ping), POST /webhook-endpoints/{id}/rotate-secret (the previous secret signs too for 24 hours), GET /webhook-deliveries with endpoint, status, event, run and time filters, POST /webhook-deliveries/{id}/retry and the catalogue GET /webhook-events (WebhookEventType, WEBHOOK_EVENTS, webhookEventOf, WebhookPayload, WebhookEndpoint, WebhookEndpointInput, CreatedWebhookEndpoint, RotatedWebhookSecret, WebhookTestResult, WebhookDelivery, WebhookDeliveryStatus, WebhookDeliveryFilter, WEBHOOK_MAX_ATTEMPTS, WEBHOOK_RETRY_DELAYS_MS, WEBHOOK_SECRET_OVERLAP_MS). Notifications: GET /notifications and POST /notifications/read (Notification, NotificationKind, NotificationList, NotificationQuery, MarkNotificationsRead, NotificationsMarked). RunRelated gains deliveries; AttentionItem gains webhook_exhausted. New environment variable WEBHOOK_ALLOW_PRIVATE_NETWORKS. The client adds webhooks and notifications.

  • 0019b2e: New permissions for the console routes to come: runs:write, ops:read, webhooks:read, webhooks:write and users:manage (admins) and notifications:read (admins and analysts). Named errors queue_name_taken (QueueNameTakenError), case_not_assigned (CaseNotAssignedError: deciding someone else's case; an unassigned case is claimed by the decision) and rate_limited (429 with Retry-After, per caller, API_RATE_LIMIT_PER_MINUTE). The client adds isQueueNameTaken, isCaseNotAssigned and isRateLimited.

  • ff4da19: Plugins: a manifest may give category, vendor, docsUrl (https) and pricingNote, which GET /plugins/available returns with actionDetails, each action's timeout, retry policy, idempotency, webhook timeout and input and output JSON Schemas (PluginSummary, PluginActionSummary). GET /plugins/health adds circuits, the plugins whose circuit breaker the workers report open or half-open (PluginCircuit, PluginCircuitState); Home's plugin_failing attention item carries circuit. POST /plugins/{name}/test calls one synchronous action once with the tenant configuration (TestPluginInput, PluginTestResult). POST /plugins/{name}/secrets/{secret} stores a secret value sealed with SECRET_STORE_KEY and answers its store: reference (SetPluginSecretInput, PluginSecretRef); DELETE revokes it. Service users: GET, POST /service-users, PATCH /service-users/{id}, POST /service-users/{id}/keys (the token is returned once) and DELETE /service-users/{id}/keys/{keyId} manage the tenant's machine users in Zitadel with ZITADEL_MANAGEMENT_PAT (ServiceUser, ServiceUserKey, CreateServiceUserInput, UpdateServiceUserInput, CreateServiceUserKeyInput, IssuedServiceUserKey). New errors: secret_store_unavailable and service_users_unavailable (503). The client adds plugins.test, plugins.setSecret, plugins.revokeSecret and serviceUsers; its PluginSummary is core's.

  • f1b6377: Runs record what started them (trigger: api, console or replay) and the caller's correlationId, set on POST /workflow-runs, filtered with trigger and matched exactly by search. The worker traces every step visit: GET /workflow-runs/{id}/steps returns each visit's status, timings, summary, input and output and the rows it wrote (RunStep), and GET /workflow-runs/{id}/related the run's cases, decision, replay links and, for ops:read, a trace link (RunRelated, TRACE_URL_TEMPLATE). Admins cancel an active run (POST /workflow-runs/{id}/cancel, which closes its open cases and withdraws its forms) and replay a finished one from a step it reached (POST /workflow-runs/{id}/replay). New errors run_finished, run_active and step_not_reached (RunFinishedError, RunActiveError, StepNotReachedError); the client adds workflowRuns.steps, related, cancel and replay and isRunFinished, isRunActive and isStepNotReached.

  • dec5e57: Search, Home, health and document thumbnails. GET /search finds subjects, cases, runs and definitions as far as the caller may read (SearchQuery, SearchResults, SearchGroup, SearchItem, SearchItemKind, SearchScope). GET /setup/checklist computes the setup steps (SetupChecklist, SetupItem, SetupItemId) and GET /activity tells recent decisions, breaches, publishes and approvals as sentences (ActivityFeed, ActivityItem, ActivityQuery). GET /health/summary reports the dependencies, failing plugins and given-up webhooks (HealthSummary, HealthState, DependencyStatus). The scan renders a grayscale thumbnail of clean images and of a PDF's first page (Document.thumbnailKey), served by GET /documents/{id}/thumbnail (DocumentThumbnail). The client adds home.search, home.setupChecklist, home.activity, health.summary and documents.thumbnail.

  • bcce30e: Statistics: GET /stats/overview answers Home's figures (StatsOverview: open, unassigned, breached and due cases, the last 24 hours of runs with autoDecidedPct, and the AttentionItems the caller may act on); GET /stats/definitions?kind= the activity per rule, workflow or collection flow over 1 to 90 days (DefinitionStats: RuleStats, WorkflowStats, FlowStats); GET /stats/sla SLA attainment, breaches and median time to decide, per workflow (SlaStats); GET /stats/rules/{key}/hits a rule's recorded hits per UTC day and, with compareVersion, that version's backtest beside them (RuleHits). A rule backtest's summary adds daily (BacktestDay). GET /cases, /subjects, /audit-events, /workflow-runs and /plugin-invocations stop counting at 100,000 and flag it with totalIsEstimate. GET /workflow-runs/summary takes every filter of the list and adds autoDecidedPct. GET /decisions pages (limit, offset, from, to) and returns total. GET /subjects/{id}/timeline pages by cursor and answers TimelinePage ({ items, nextCursor }) in place of offset. GET /plugin-callbacks filters by pluginName and returns total. The client adds stats (overview, definitions, sla, ruleHits), pluginCallbacks.list, decisions.listPage and Page.totalIsEstimate; subjects.timeline returns the page with its cursor, and workflowRuns.summary takes the list's filters. Core adds percentOf.

  • 774356c: Subjects can be changed with PATCH /subjects/{id} (UpdateSubjectInput: data as a JSON merge patch, tags, status), audited as subject.updated with the changed paths; core adds applyMergePatch, diffMergePatch and changedPaths. GET /subjects/{id} returns lastSeenAt (SubjectDetail), GET /subjects/{id}/links the subjects sharing a device, card, IP address, email, address or referral (SubjectLink), and GET /subjects/{id}/flags the derived signals (SubjectFlag). GET /subjects filters on country and lastDecision, and GET /subjects/export returns the filtered list as CSV. The client adds subjects.update, links, flags and exportCsv.

  • 98d2fec: Tenant settings gain cases.warnAtPct (the share of the SLA left when a new case turns due_soon, kept on the case as slaWarnPct), collection.defaultLinkTtlSeconds (the lifetime of links for flows that set none; CollectionFlowBody.linkTtlSeconds is optional and linkLifetime resolves it), and console.showRunContextTo and console.maskForAnalysts, which decide what people see of run context and personal data (maskPersonalData takes the kinds to mask; PERSONAL_DATA_KINDS). TenantProfile.region reports DEPLOYMENT_REGION. Statistics count days in the tenant's console.timeZone (RuleHits.timeZone; dayIn, midnightIn, daysIn).

  • f4cfd62: Tenant settings gain namespaces: cases.businessHours (BusinessHours, used by addBusinessTime to compute due times) and cases.onBreach (BreachActions), approvals.requiredFor (checked by approvalRequired), collection.flowUrl (CollectionSettings) and console (ConsoleSettings); tenant.settings.updated records the changed paths. Tenant gains status, suspendedAt, suspendedReason and linksValidAfter. New routes: GET /tenants/me (TenantProfile), POST /tenants/me/suspend (SuspendTenantInput), POST /tenants/me/resume and POST /tenants/me/revoke-links (RevokedLinks), each behind a recent sign-in sent as X-Aletheia-Reauth; GET /roles (RoleDescription); GET and PUT /me/preferences (UserPreferences); and the team under /team (TeamUser, InviteUserInput, ChangeRoleInput). Errors TenantSuspendedError (tenant_suspended) and ReauthRequiredError (reauth_required) are new. The client adds tenants.profile, suspend, resume, revokeLinks, roles, preferences, updatePreferences and tenants.team, the isTenantSuspended and isReauthRequired guards, and per-request headers.

Patch Changes ​

  • Updated dependencies [4bbc905, 40ee302, e236779, 6d17f78, 84e50a4, 6ba6815, 0019b2e, ff4da19, f1b6377, dec5e57, bcce30e, 774356c, 98d2fec, f4cfd62]:
    • @aletheia-dev/core@0.5.0

0.4.0 ​

Minor Changes ​

  • 3282c50: GET /collection-submissions lists submissions newest first, filtered by subjectId, workflowRunId and status, with the total. CollectionSubmissionFilter describes the filters, and the client's collectionSubmissions.list and listPage call it.

Patch Changes ​

  • Updated dependencies [3282c50]:
    • @aletheia-dev/core@0.4.0

0.3.0 ​

Minor Changes ​

  • eb2c640: Page-returning list variants: cases.listPage, subjects.listPage and audit.listPage resolve to { items, total } (Page<T>), where total counts every match ignoring limit and offset. cases.listPage takes expand: ['subject'] and subjects.listPage takes expand: ['openCases', 'lastDecision']. The array-returning list methods are unchanged.

    New case methods: cases.counts counts several named filters in one request, cases.claimNext atomically assigns the caller the next free case of a queue or filter (a 404 with the code nothing_to_claim when there is none; see isNothingToClaim), and cases.bulk assigns, claims or closes up to 100 cases. caseFilterBody turns a list query into a filter body.

    cases.assign, cases.claim and cases.close now read the { case } envelope the API answers with; they failed to parse real responses before. A case's context comes back redacted for callers without runs:context and masked for callers without subjects:pii, like the run context it was copied from.

  • eb2c640: ApiError carries requestId: the id in the API's error body (error.requestId), falling back to the x-request-id response header. ApiError.fromResponse takes the response headers as an optional fourth argument and the constructor an optional fifth; existing calls are unchanged. audit.export now needs the audit:export permission, and subject data, events, run context and plugin payloads come back masked or redacted for callers without subjects:pii or runs:context.

  • eb2c640: Runs across the tenant: workflowRuns.listPage resolves to { items, total } with the filters subjectId, status and outcome (repeated), definitionKey, from, to and search, and expand: ['subject']; each item carries durationMs and outcome. workflowRuns.summary reads the counts per status and the p95 duration of the runs started in a window. workflowRuns.listBySubject still returns an array of runs.

    audit.get reads one audit event by id. pluginInvocations.listPage pages the invocations with the new pluginName, status, from and to filters (also accepted by pluginInvocations.list, which still returns an array), pluginInvocations.get reads one invocation, and plugins.health reads the per-plugin calls, failures, timeouts, p95 and last call and failure times of a window (5 to 1440 minutes, 60 by default). Invocation payloads come back redacted for callers without runs:context.

Patch Changes ​

  • Updated dependencies [ffa9107, eb2c640, 7c5c045, eb2c640, eb2c640]:
    • @aletheia-dev/core@0.3.0

0.2.0 ​

Minor Changes ​

  • 2d95c87: New policyPacks domain: import(pack, { publish? }) posts a PolicyPack to POST /definitions/import and export(keys, { name?, version?, description? }) reads one back from GET /definitions/export. PolicyPack and the import result schema are re-exported.

Patch Changes ​

  • Updated dependencies [1b1c13f]:
    • @aletheia-dev/core@0.2.0

0.1.0 ​

Minor Changes ​

  • a783a44: First published release. @aletheia-dev/api-client and @aletheia-dev/collection-flow-ui are published for teams that embed collection flows or build their own back office; @aletheia-dev/core and @aletheia-dev/collection-flow are published as their dependencies and carry no stability promise before 1.0.

Patch Changes ​

  • Updated dependencies [a783a44]:
    • @aletheia-dev/core@0.1.0

Released under the Apache-2.0 License.