13 Commits

Author SHA1 Message Date
Sacha Al Himdani
944bcb7380 Add updated-from entity snapshot to updated webhooks
Update webhook events now carry a top-level "updatedFrom" field
alongside "data", containing a full snapshot of the entity as it was
before the update. This lets subscribers diff old vs new state (for
example the prior membership role on user:updated) without tracking
prior state themselves. It is a complete snapshot with the same shape as
"data", not a partial diff, so consumers select whatever fields they
need. The field is omitted for non-update events.

The webhook_data table gains a nullable updated_from JSONB column, and
webhook.InsertUpdateData enqueues both snapshots; InsertData delegates to
it with a nil updatedFrom so non-update callers are unaffected. Each
*:updated emission site snapshots the entity right after load, before
mutation: obligation, third-party, user (org and SCIM flows), document,
document-version, and document-version-approval-quorum. The document
emit helpers gained an optional updatedFrom argument threaded through to
the payload.

For document-version-approval-quorum:updated the snapshot requires an
extra query, so it is now gated behind the same subscription-existence
check the emitter uses: when no subscriber is configured the load is
skipped entirely rather than running (and potentially failing the
approval) for an event nobody receives.

Add integration tests (against a real Postgres, skipped when none is
reachable) covering the updated_from round-trip, the SQL NULL behavior
when no snapshot is provided, and the no-op when no subscription matches,
plus a unit test asserting updatedFrom is omitted from the payload when
absent.

Document the new field in the probod and n8n changelogs and the n8n
README.

Signed-off-by: Sacha Al Himdani <sacha@probo.com>
2026-07-15 13:59:41 +02:00
Sacha Al Himdani
4c57d201a4 Make license declarations consistently MIT
The source headers, LICENSE files, and license metadata had drifted
apart. Align the entire project to MIT:

- Convert every source-file header to the MIT text across all comment
  styles (Go, TS, TSX, JS, MJS, SQL, CSS, GraphQL, shell), including
  SPDX-License-Identifier tags
- Set the root and cookie-banner LICENSE files to the MIT text with a
  "MIT License" title line
- Switch the package.json license fields, Docker image label, and
  cookie-banner README to MIT
- Update docs and the genmodels header generator accordingly
- Normalize copyright lines to a single format
  (Copyright (c) <year(s)> Probo Inc <hello@probo.com>.): unify the
  hello@getprobo.com and hello@probo.inc emails to hello@probo.com and
  the comma-separated years to a hyphenated range

Genuine third-party references are intentionally left untouched: the
Lucide icon attributions (Lucide is ISC) and the trivy dependency
license allowlist.

Signed-off-by: Sacha Al Himdani <sacha@probo.com>
2026-07-13 16:21:14 +02:00
Sacha Al Himdani
9ac71f948f Update contact email to hello@probo.com
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-06-09 16:45:23 +02:00
Émile Ré
9156d6a16a Add wsl linter and fix
Signed-off-by: Émile Ré <emile@probo.com>
2026-05-20 09:27:28 +04:00
Bryan Frimin
f17fb7bf49 Upgrade to kit v0.3.0
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-03 11:56:06 +02:00
Sacha Al Himdani
8c02c53315 Update copyright headers across all Go files
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-25 17:38:32 +01:00
Sacha Al Himdani
d99b90fb8c Fix style
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-02-13 18:54:50 +01:00
Sacha Al Himdani
754bc6d222 Change insert event name
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-02-13 18:28:28 +01:00
Sacha Al Himdani
60538ef2bb Change webhook configuration to subscription
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-02-13 18:28:28 +01:00
Sacha Al Himdani
6de906d0a9 Remove status on webhook data
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-02-13 18:28:28 +01:00
Sacha Al Himdani
a1e726ec49 Change webhook table names
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-02-13 18:28:26 +01:00
Sacha Al Himdani
5a8c60a5aa Add webhooks type
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-02-13 18:28:25 +01:00
Sacha Al Himdani
f9de9c4834 Add webhooks
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-02-13 18:28:25 +01:00