Skip to content
Merged
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
17 changes: 9 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,24 @@ jobs:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup pnpm
uses: pnpm/action-setup@v5

- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: "24"
cache: pnpm

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.11"

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: bun install --frozen-lockfile

- name: Check (lint + format + type check)
run: pnpm run check
run: bun run check

- name: Run tests
run: pnpm test
run: bun run test

- name: Build
run: pnpm run build
run: bun run build
19 changes: 10 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,36 +20,37 @@ jobs:
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v5
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.11"

- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: bun install --frozen-lockfile

- name: Check (lint + format + type check)
run: pnpm run check
run: bun run check

- name: Run tests
run: pnpm test
run: bun test

- name: Build
run: pnpm run build
run: bun run build

- name: Generate changelog
run: pnpm dlx changelogithub
run: bunx changelogithub
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish packages to npm
run: pnpm pack && npm publish ./*.tgz --access public --provenance
run: npm pack && npm publish ./*.tgz --access public --provenance
env:
NPM_CONFIG_PROVENANCE: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
415 changes: 415 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions docs/features/event-audit-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ Creates a new audit log event. The event is processed asynchronously (queued), b
| ------------------ | ------ | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `eventType` | string | Yes | Custom event type name (max 100 chars). Alphanumeric characters only — special characters and spaces are stripped. Stored with a `customEvent.` prefix (e.g., `"UserSignup"` becomes `"customEvent.UserSignup"`). |
| `actorId` | string | Yes | The ID of the user performing the action. Must be a valid, enabled user in your workspace. |
| `companyId` | string | Conditional | Required if `actorId` belongs to a client user. The client must belong to this company. |
| `actorType` | string | Yes | `"clientUser"` or `"internalUser"`. |
| `companyId` | string | Conditional | Required if `actorType` is `"clientUser"`. The client must belong to this company. |
| `eventDescription` | string | Yes | Human-readable description of the event (max 500 chars). |
| `context` | object | Yes | Arbitrary JSON object with additional event data. |

Expand All @@ -33,6 +34,7 @@ curl -X POST https://api.assembly.com/v1/events \
-d '{
"eventType": "InvoiceApproved",
"actorId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"actorType": "internalUser",
"eventDescription": "Invoice #1042 was approved by the account manager",
"context": {
"invoiceId": "inv_1042",
Expand Down Expand Up @@ -77,6 +79,7 @@ curl -X POST https://api.assembly.com/v1/events \
-d '{
"eventType": "DocumentViewed",
"actorId": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"actorType": "clientUser",
"companyId": "d4e5f6a7-b890-1234-5678-abcdef012345",
"eventDescription": "Client viewed the Q1 report",
"context": {
Expand Down Expand Up @@ -223,7 +226,7 @@ curl -X GET "https://api.assembly.com/v1/events/a1b2c3d4-e5f6-7890-abcd-ef123456
| `id` | string | Unique event ID (UUID). |
| `object` | string | Always `"auditLog"`. |
| `actorId` | string | ID of the user who performed the action. |
| `actorType` | string | `"internalUser"` or `"client"`. |
| `actorType` | string | `"internalUser"` or `"clientUser"`. |
| `companyId` | string or null | Company ID if the actor is a client user. |
| `source` | string | Where the event originated: `"platform"` (API-created), `"web"` (dashboard), `"automation"`, or `"system"`. |
| `eventType` | string | The event type. Custom events are prefixed with `customEvent.` (e.g., `customEvent.InvoiceApproved`). System events use predefined types (see below). |
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@
},
"devDependencies": {
"@assembly-js/app-bridge": "^1.1.1",
"@types/node": "^25.5.0",
"@types/node": "^25.5.2",
"@types/react": "^19.2.14",
"@typescript/native-preview": "7.0.0-dev.20260327.2",
"@typescript/native-preview": "7.0.0-dev.20260405.1",
"bumpp": "^11.0.1",
"pino": "^10.3.1",
"pino-pretty": "^13.1.3",
"react": "^19.1.0",
"react": "^19.2.4",
"typescript": "^6.0.2",
"vite-plus": "^0.1.14",
"vite-plus": "^0.1.15",
"zod": "^4.3.6"
},
"peerDependencies": {
Expand Down Expand Up @@ -83,7 +83,7 @@
"optional": true
}
},
"packageManager": "pnpm@10.33.0",
"packageManager": "bun@1.3.11",
"pnpm": {
"overrides": {
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
Expand Down
Loading
Loading