Compare commits
19
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2b7f771c6 | ||
|
|
9e2e536a67 | ||
|
|
0762627a76 | ||
|
|
29e5de1082 | ||
|
|
315a3fe6a5 | ||
|
|
5b32922f39 | ||
|
|
02ac3d903b | ||
|
|
6256c5577d | ||
|
|
77fb5d426b | ||
|
|
c82e516769 | ||
|
|
887049974f | ||
|
|
48728e6507 | ||
|
|
7e1497e2b5 | ||
|
|
b0b2de1c56 | ||
|
|
9e6d38198c | ||
|
|
213c963ff5 | ||
|
|
532c150c99 | ||
|
|
f7a37d27fe | ||
|
|
e055e76df4 |
@@ -120,7 +120,7 @@ Packages duplicated across 3+ workspaces are prime candidates:
|
||||
| `nanoid` | 4 | Yes |
|
||||
| `@lingui/core` / `macro` / `react` | 2-3 | Yes |
|
||||
| `@simplewebauthn/server` | 3 | Yes |
|
||||
| `@hanzo/sign-*` (internal) | varies | No (use `workspace:*`) |
|
||||
| `@hanzo/esign-*` (internal) | varies | No (use `workspace:*`) |
|
||||
| `@aws-sdk/*` | 2 | Yes |
|
||||
| `hono` | 2 | Yes |
|
||||
| `posthog-node` / `posthog-js` | 2 | Yes |
|
||||
@@ -210,13 +210,13 @@ This is a mechanical find-and-replace across all workspace `package.json` files.
|
||||
|
||||
#### Step 11: Convert internal references to `workspace:*`
|
||||
|
||||
All `@hanzo/sign-*` internal package references currently use `"*"`. Convert to pnpm's `workspace:*` protocol:
|
||||
All `@hanzo/esign-*` internal package references currently use `"*"`. Convert to pnpm's `workspace:*` protocol:
|
||||
|
||||
```json
|
||||
{
|
||||
"dependencies": {
|
||||
"@hanzo/sign-lib": "workspace:*",
|
||||
"@hanzo/sign-prisma": "workspace:*"
|
||||
"@hanzo/esign-lib": "workspace:*",
|
||||
"@hanzo/esign-prisma": "workspace:*"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -297,7 +297,7 @@ With catalogs and strict resolution, dependencies currently hoisted to root `pac
|
||||
- **Mitigation:** Update cache keys to use `pnpm-lock.yaml` hash. First CI run will be slower, subsequent runs will cache normally.
|
||||
|
||||
5. **Turbo + pnpm compatibility:** Turbo has first-class pnpm support, but `turbo prune` output format may differ slightly.
|
||||
- **Mitigation:** Test `turbo prune --scope=@hanzo/sign-remix --docker` and verify output structure before updating Dockerfile.
|
||||
- **Mitigation:** Test `turbo prune --scope=@hanzo/esign-remix --docker` and verify output structure before updating Dockerfile.
|
||||
|
||||
## Verification Checklist
|
||||
|
||||
|
||||
@@ -279,7 +279,7 @@ Create a reusable Hono middleware factory in `packages/lib/server-only/rate-limi
|
||||
```typescript
|
||||
import { type MiddlewareHandler } from 'hono';
|
||||
|
||||
import { getIpAddress } from '@hanzo/sign-lib/universal/get-ip-address';
|
||||
import { getIpAddress } from '@hanzo/esign-lib/universal/get-ip-address';
|
||||
|
||||
export const createRateLimitMiddleware = (
|
||||
limiter: ReturnType<typeof rateLimit>,
|
||||
@@ -326,8 +326,8 @@ import { rateLimiter } from 'hono-rate-limiter';
|
||||
const rateLimitMiddleware = rateLimiter({ ... });
|
||||
|
||||
// After
|
||||
import { createRateLimitMiddleware } from '@hanzo/sign-lib/server-only/rate-limit/rate-limit-middleware';
|
||||
import { apiV1RateLimit, apiV2RateLimit, aiRateLimit } from '@hanzo/sign-lib/server-only/rate-limit/rate-limits';
|
||||
import { createRateLimitMiddleware } from '@hanzo/esign-lib/server-only/rate-limit/rate-limit-middleware';
|
||||
import { apiV1RateLimit, apiV2RateLimit, aiRateLimit } from '@hanzo/esign-lib/server-only/rate-limit/rate-limits';
|
||||
|
||||
const apiV1RateLimitMiddleware = createRateLimitMiddleware(apiV1RateLimit);
|
||||
const apiV2RateLimitMiddleware = createRateLimitMiddleware(apiV2RateLimit);
|
||||
|
||||
+8
-4
@@ -2,7 +2,7 @@
|
||||
NEXT_PRIVATE_SIGN_LICENSE_KEY=
|
||||
|
||||
# [[AUTH]]
|
||||
NEXTAUTH_SECRET="secret"
|
||||
NEXT_PRIVATE_AUTH_SECRET="secret"
|
||||
|
||||
# [[CRYPTO]]
|
||||
# Application Key for symmetric encryption and decryption
|
||||
@@ -47,9 +47,13 @@ NEXT_PRIVATE_INTERNAL_WEBAPP_URL="http://localhost:3000"
|
||||
PORT=3000
|
||||
|
||||
# [[DATABASE]]
|
||||
NEXT_PRIVATE_DATABASE_URL="postgres://hanzo-sign:password@127.0.0.1:54320/hanzo-sign"
|
||||
# Defines the URL to use for the database when running migrations and other commands that won't work with a connection pool.
|
||||
NEXT_PRIVATE_DIRECT_DATABASE_URL="postgres://hanzo-sign:password@127.0.0.1:54320/hanzo-sign"
|
||||
# Per-tenant SQLite via Hanzo Base. Each org gets its own `sign.db` under BASE_PATH:
|
||||
# ${BASE_PATH}/${orgId}/sign.db
|
||||
# At runtime the connection URL is built per request from the JWT `owner` (org) claim.
|
||||
BASE_PATH="./base/data"
|
||||
# Single-file URL used by the Prisma CLI (generate / migrate). At runtime each org
|
||||
# overrides this with its own tenant file; for local dev it points at one tenant DB.
|
||||
DATABASE_URL="file:./base/data/_dev/sign.db"
|
||||
|
||||
# [[SIGNING]]
|
||||
# The transport to use for document signing. Available options: local (default) | gcloud-hsm
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/** @type {import('eslint').Linter.Config} */
|
||||
module.exports = {
|
||||
root: true,
|
||||
extends: ['@hanzo/sign-eslint-config'],
|
||||
extends: ['@hanzo/esign-eslint-config'],
|
||||
rules: {
|
||||
'@next/next/no-img-element': 'off',
|
||||
'no-unreachable': 'error',
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1280" height="640" viewBox="0 0 1280 640" role="img" aria-label="esign">
|
||||
<rect width="1280" height="640" fill="#0A0A0A"/>
|
||||
<svg x="96" y="215" width="210" height="210" viewBox="0 0 67 67"><path d="M22.21 67V44.6369H0V67H22.21Z" fill="#fff"/><path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#fff"/><path d="M22.21 0H0V22.3184H22.21V0Z" fill="#fff"/><path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#fff"/><path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#fff"/></svg>
|
||||
<text x="378" y="276" font-family="Inter,system-ui,-apple-system,sans-serif" font-size="78" font-weight="800" letter-spacing="-2" fill="#ffffff">esign</text>
|
||||
<text x="378" y="322" font-family="Inter,system-ui,sans-serif" font-size="30" fill="#ffffff" opacity=".66">The Open Source DocuSign Alternative.</text>
|
||||
<rect x="378" y="338" width="806" height="3" rx="1.5" fill="#ffffff" opacity=".9"/>
|
||||
<text x="378" y="390" font-family="Inter,system-ui,sans-serif" font-size="24" font-weight="600" fill="#ffffff" opacity=".5">github.com/hanzoai</text>
|
||||
<text x="1184" y="390" text-anchor="end" font-family="Inter,system-ui,sans-serif" font-size="24" font-weight="600" fill="#ffffff" opacity=".5">hanzo.ai</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -1,24 +1,8 @@
|
||||
name: Deploy to Production
|
||||
|
||||
name: deploy (moved to native pipeline)
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: hanzo-deploy-linux-amd64
|
||||
|
||||
notice:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- name: Push to release branch
|
||||
run: |
|
||||
git checkout release || git checkout -b release
|
||||
git merge --ff-only main
|
||||
git push origin release
|
||||
- run: echo "native pipeline is .hanzo/workflows/deploy.yml; GitHub is a mirror"
|
||||
|
||||
@@ -1,20 +1,8 @@
|
||||
name: Docker
|
||||
name: Docker (moved to native pipeline)
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [main, dev, test]
|
||||
tags: ['v*']
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
jobs:
|
||||
docker:
|
||||
uses: hanzoai/.github/.github/workflows/docker-build.yml@main
|
||||
with:
|
||||
image: ghcr.io/hanzoai/esign
|
||||
dockerfile: docker/Dockerfile
|
||||
# arm64 builds run on canonical native arcd labels — matches
|
||||
# spark (self-hosted + linux + arm64). Org isolation comes from
|
||||
# GitHub runner group + arcd's repo allowlist.
|
||||
runner-arm64: self-hosted
|
||||
secrets: inherit
|
||||
notice:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo "native pipeline is .hanzo/workflows/deploy.yml; GitHub is a mirror"
|
||||
|
||||
@@ -1,182 +1,8 @@
|
||||
name: Publish Docker
|
||||
|
||||
name: Publish Docker (moved to native pipeline)
|
||||
on:
|
||||
push:
|
||||
branches: ['release']
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: 'Git tag to build and publish (e.g., v1.0.0)'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build_and_publish_platform_containers:
|
||||
name: Build and publish platform containers
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- warp-ubuntu-latest-x64-4x
|
||||
- warp-ubuntu-latest-arm64-4x
|
||||
|
||||
notice:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.tag || github.ref }}
|
||||
fetch-tags: true
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- name: Build the docker image
|
||||
env:
|
||||
BUILD_PLATFORM: ${{ matrix.os == 'warp-ubuntu-latest-arm64-4x' && 'arm64' || 'amd64' }}
|
||||
NEXT_PRIVATE_TELEMETRY_KEY: ${{ secrets.NEXT_PRIVATE_TELEMETRY_KEY }}
|
||||
NEXT_PRIVATE_TELEMETRY_HOST: ${{ secrets.NEXT_PRIVATE_TELEMETRY_HOST }}
|
||||
APP_VERSION: ${{ inputs.tag || '' }}
|
||||
run: |
|
||||
if [ -z "$APP_VERSION" ]; then
|
||||
APP_VERSION="$(git name-rev --tags --name-only $(git rev-parse HEAD) | head -n 1 | sed 's/\^0//')"
|
||||
fi
|
||||
GIT_SHA="$(git rev-parse HEAD)"
|
||||
|
||||
docker build \
|
||||
-f ./docker/Dockerfile \
|
||||
--progress=plain \
|
||||
--build-arg NEXT_PRIVATE_TELEMETRY_KEY="${NEXT_PRIVATE_TELEMETRY_KEY:-}" \
|
||||
--build-arg NEXT_PRIVATE_TELEMETRY_HOST="${NEXT_PRIVATE_TELEMETRY_HOST:-}" \
|
||||
-t "hanzo-sign/hanzo-sign-$BUILD_PLATFORM:latest" \
|
||||
-t "hanzo-sign/hanzo-sign-$BUILD_PLATFORM:$GIT_SHA" \
|
||||
-t "hanzo-sign/hanzo-sign-$BUILD_PLATFORM:$APP_VERSION" \
|
||||
-t "ghcr.io/hanzo-sign/hanzo-sign-$BUILD_PLATFORM:latest" \
|
||||
-t "ghcr.io/hanzo-sign/hanzo-sign-$BUILD_PLATFORM:$GIT_SHA" \
|
||||
-t "ghcr.io/hanzo-sign/hanzo-sign-$BUILD_PLATFORM:$APP_VERSION" \
|
||||
.
|
||||
|
||||
- name: Push the docker image to DockerHub
|
||||
run: docker push --all-tags "hanzo-sign/hanzo-sign-$BUILD_PLATFORM"
|
||||
env:
|
||||
BUILD_PLATFORM: ${{ matrix.os == 'warp-ubuntu-latest-arm64-4x' && 'arm64' || 'amd64' }}
|
||||
|
||||
- name: Push the docker image to GitHub Container Registry
|
||||
run: docker push --all-tags "ghcr.io/hanzo-sign/hanzo-sign-$BUILD_PLATFORM"
|
||||
env:
|
||||
BUILD_PLATFORM: ${{ matrix.os == 'warp-ubuntu-latest-arm64-4x' && 'arm64' || 'amd64' }}
|
||||
|
||||
create_and_publish_manifest:
|
||||
name: Create and publish manifest
|
||||
runs-on: hanzo-build-linux-amd64
|
||||
needs: build_and_publish_platform_containers
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.tag || github.ref }}
|
||||
fetch-tags: true
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- name: Create and push DockerHub manifest
|
||||
env:
|
||||
APP_VERSION: ${{ inputs.tag || '' }}
|
||||
run: |
|
||||
if [ -z "$APP_VERSION" ]; then
|
||||
APP_VERSION="$(git name-rev --tags --name-only $(git rev-parse HEAD) | head -n 1 | sed 's/\^0//')"
|
||||
fi
|
||||
GIT_SHA="$(git rev-parse HEAD)"
|
||||
|
||||
# Check if the version is stable (no rc or beta in the version)
|
||||
if [[ "$APP_VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
docker manifest create \
|
||||
hanzo-sign/hanzo-sign:latest \
|
||||
--amend hanzo-sign/hanzo-sign-amd64:latest \
|
||||
--amend hanzo-sign/hanzo-sign-arm64:latest
|
||||
|
||||
docker manifest push hanzo-sign/hanzo-sign:latest
|
||||
fi
|
||||
|
||||
if [[ "$APP_VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$ ]]; then
|
||||
docker manifest create \
|
||||
hanzo-sign/hanzo-sign:rc \
|
||||
--amend hanzo-sign/hanzo-sign-amd64:rc \
|
||||
--amend hanzo-sign/hanzo-sign-arm64:rc
|
||||
|
||||
docker manifest push hanzo-sign/hanzo-sign:rc
|
||||
fi
|
||||
|
||||
docker manifest create \
|
||||
hanzo-sign/hanzo-sign:$GIT_SHA \
|
||||
--amend hanzo-sign/hanzo-sign-amd64:$GIT_SHA \
|
||||
--amend hanzo-sign/hanzo-sign-arm64:$GIT_SHA
|
||||
|
||||
docker manifest create \
|
||||
hanzo-sign/hanzo-sign:$APP_VERSION \
|
||||
--amend hanzo-sign/hanzo-sign-amd64:$APP_VERSION \
|
||||
--amend hanzo-sign/hanzo-sign-arm64:$APP_VERSION
|
||||
|
||||
docker manifest push hanzo-sign/hanzo-sign:$GIT_SHA
|
||||
docker manifest push hanzo-sign/hanzo-sign:$APP_VERSION
|
||||
|
||||
- name: Create and push Github Container Registry manifest
|
||||
env:
|
||||
APP_VERSION: ${{ inputs.tag || '' }}
|
||||
run: |
|
||||
if [ -z "$APP_VERSION" ]; then
|
||||
APP_VERSION="$(git name-rev --tags --name-only $(git rev-parse HEAD) | head -n 1 | sed 's/\^0//')"
|
||||
fi
|
||||
GIT_SHA="$(git rev-parse HEAD)"
|
||||
|
||||
# Check if the version is stable (no rc or beta in the version)
|
||||
if [[ "$APP_VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
docker manifest create \
|
||||
ghcr.io/hanzo-sign/hanzo-sign:latest \
|
||||
--amend ghcr.io/hanzo-sign/hanzo-sign-amd64:latest \
|
||||
--amend ghcr.io/hanzo-sign/hanzo-sign-arm64:latest
|
||||
|
||||
docker manifest push ghcr.io/hanzo-sign/hanzo-sign:latest
|
||||
fi
|
||||
|
||||
if [[ "$APP_VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$ ]]; then
|
||||
docker manifest create \
|
||||
ghcr.io/hanzo-sign/hanzo-sign:rc \
|
||||
--amend ghcr.io/hanzo-sign/hanzo-sign-amd64:rc \
|
||||
--amend ghcr.io/hanzo-sign/hanzo-sign-arm64:rc
|
||||
|
||||
docker manifest push ghcr.io/hanzo-sign/hanzo-sign:rc
|
||||
fi
|
||||
|
||||
docker manifest create \
|
||||
ghcr.io/hanzo-sign/hanzo-sign:$GIT_SHA \
|
||||
--amend ghcr.io/hanzo-sign/hanzo-sign-amd64:$GIT_SHA \
|
||||
--amend ghcr.io/hanzo-sign/hanzo-sign-arm64:$GIT_SHA
|
||||
|
||||
docker manifest create \
|
||||
ghcr.io/hanzo-sign/hanzo-sign:$APP_VERSION \
|
||||
--amend ghcr.io/hanzo-sign/hanzo-sign-amd64:$APP_VERSION \
|
||||
--amend ghcr.io/hanzo-sign/hanzo-sign-arm64:$APP_VERSION
|
||||
|
||||
docker manifest push ghcr.io/hanzo-sign/hanzo-sign:$GIT_SHA
|
||||
docker manifest push ghcr.io/hanzo-sign/hanzo-sign:$APP_VERSION
|
||||
- run: echo "native pipeline is .hanzo/workflows/deploy.yml; GitHub is a mirror"
|
||||
|
||||
@@ -70,3 +70,10 @@ scripts/output*
|
||||
|
||||
# tmp
|
||||
tmp/
|
||||
|
||||
# per-tenant SQLite (Hanzo Base) — runtime data, never committed
|
||||
base/data/
|
||||
*.db
|
||||
*.db-journal
|
||||
*.db-wal
|
||||
*.db-shm
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
name: deploy
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: hanzo-linux-amd64
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build + push image
|
||||
run: |
|
||||
SHA="${GITHUB_SHA::8}"
|
||||
buildctl-daemonless.sh build --frontend=dockerfile.v0 \
|
||||
--opt context="${{ github.server_url }}/${{ github.repository }}.git#${GITHUB_SHA}" \
|
||||
--opt filename=docker/Dockerfile --opt platform=linux/amd64 \
|
||||
--secret id=GIT_AUTH_TOKEN,env=GIT_AUTH_TOKEN \
|
||||
--output "type=image,name=ghcr.io/hanzoai/sign:${SHA},push=true" --progress=plain
|
||||
env:
|
||||
GIT_AUTH_TOKEN: ${{ secrets.GIT_CLONE_TOKEN }}
|
||||
- name: Deploy — declare tag to operator
|
||||
run: |
|
||||
for app in sign; do
|
||||
kubectl -n hanzo patch app "$app" --type=merge -p "{\"spec\":{\"image\":{\"repository\":\"ghcr.io/hanzoai/sign\",\"tag\":\"${GITHUB_SHA::8}\"}}}"
|
||||
done
|
||||
@@ -24,7 +24,7 @@ Run these commands to understand where the previous session left off:
|
||||
```bash
|
||||
git status # See uncommitted changes
|
||||
git log --oneline -10 # See recent commits
|
||||
npm run typecheck -w @hanzo/sign-remix # Check for type errors
|
||||
npm run typecheck -w @hanzo/esign-remix # Check for type errors
|
||||
npm run lint:fix # Check for linting issues
|
||||
```
|
||||
|
||||
@@ -67,9 +67,9 @@ Review the code that's already been written to understand:
|
||||
Work continuously through these steps:
|
||||
|
||||
1. **Implement** - Write the code for the current task
|
||||
2. **Typecheck** - Run `npm run typecheck -w @hanzo/sign-remix` to verify types
|
||||
2. **Typecheck** - Run `npm run typecheck -w @hanzo/esign-remix` to verify types
|
||||
3. **Lint** - Run `npm run lint:fix` to fix linting issues
|
||||
4. **Test** - If non-trivial, run E2E tests: `npm run test:dev -w @hanzo/sign-app-tests`
|
||||
4. **Test** - If non-trivial, run E2E tests: `npm run test:dev -w @hanzo/esign-app-tests`
|
||||
5. **Fix** - If tests fail, fix and re-run
|
||||
6. **Repeat** - Move to next task
|
||||
|
||||
@@ -93,14 +93,14 @@ Work continuously through these steps:
|
||||
|
||||
```bash
|
||||
# Type checking
|
||||
npm run typecheck -w @hanzo/sign-remix
|
||||
npm run typecheck -w @hanzo/esign-remix
|
||||
|
||||
# Linting
|
||||
npm run lint:fix
|
||||
|
||||
# E2E Tests (only for non-trivial work)
|
||||
npm run test:dev -w @hanzo/sign-app-tests # Run E2E tests in dev mode
|
||||
npm run test-ui:dev -w @hanzo/sign-app-tests # Run E2E tests with UI
|
||||
npm run test:dev -w @hanzo/esign-app-tests # Run E2E tests in dev mode
|
||||
npm run test-ui:dev -w @hanzo/esign-app-tests # Run E2E tests with UI
|
||||
npm run test:e2e # Run full E2E test suite
|
||||
|
||||
# Development
|
||||
|
||||
@@ -66,14 +66,14 @@ Brief description of what this module/feature does and when to use it.
|
||||
If there are specific packages or imports needed:
|
||||
|
||||
```bash
|
||||
npm install @hanzo/sign-package-name
|
||||
npm install @hanzo/esign-package-name
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
||||
```jsx
|
||||
// Minimal working example
|
||||
import { Component } from '@hanzo/sign-package';
|
||||
import { Component } from '@hanzo/esign-package';
|
||||
|
||||
const Example = () => {
|
||||
return <Component />;
|
||||
@@ -96,7 +96,7 @@ Description of what it does.
|
||||
#### Example
|
||||
|
||||
```jsx
|
||||
import { Component } from '@hanzo/sign-package';
|
||||
import { Component } from '@hanzo/esign-package';
|
||||
|
||||
<Component prop="value" optional={true} />;
|
||||
```
|
||||
|
||||
@@ -55,9 +55,9 @@ You are implementing a specification from the `.agents/plans/` directory. Work a
|
||||
Work continuously through these steps:
|
||||
|
||||
1. **Implement** - Write the code for the current task
|
||||
2. **Typecheck** - Run `npm run typecheck -w @hanzo/sign-remix` to verify types
|
||||
2. **Typecheck** - Run `npm run typecheck -w @hanzo/esign-remix` to verify types
|
||||
3. **Lint** - Run `npm run lint:fix` to fix linting issues
|
||||
4. **Test** - If non-trivial, run E2E tests: `npm run test:dev -w @hanzo/sign-app-tests`
|
||||
4. **Test** - If non-trivial, run E2E tests: `npm run test:dev -w @hanzo/esign-app-tests`
|
||||
5. **Fix** - If tests fail, fix and re-run
|
||||
6. **Repeat** - Move to next task
|
||||
|
||||
@@ -81,14 +81,14 @@ Work continuously through these steps:
|
||||
|
||||
```bash
|
||||
# Type checking
|
||||
npm run typecheck -w @hanzo/sign-remix
|
||||
npm run typecheck -w @hanzo/esign-remix
|
||||
|
||||
# Linting
|
||||
npm run lint:fix
|
||||
|
||||
# E2E Tests (only for non-trivial work)
|
||||
npm run test:dev -w @hanzo/sign-app-tests # Run E2E tests in dev mode
|
||||
npm run test-ui:dev -w @hanzo/sign-app-tests # Run E2E tests with UI
|
||||
npm run test:dev -w @hanzo/esign-app-tests # Run E2E tests in dev mode
|
||||
npm run test-ui:dev -w @hanzo/esign-app-tests # Run E2E tests with UI
|
||||
npm run test:e2e # Run full E2E test suite
|
||||
|
||||
# Development
|
||||
|
||||
@@ -79,8 +79,8 @@ import { type Page, expect, test } from '@playwright/test';
|
||||
// Prisma enums if needed for DB assertions
|
||||
import { SomePrismaEnum } from '@prisma/client';
|
||||
|
||||
import { nanoid } from '@hanzo/sign-lib/universal/id';
|
||||
import { prisma } from '@hanzo/sign-prisma';
|
||||
import { nanoid } from '@hanzo/esign-lib/universal/id';
|
||||
import { prisma } from '@hanzo/esign-prisma';
|
||||
|
||||
import {
|
||||
type TEnvelopeEditorSurface, // Import needed helpers from the fixture
|
||||
@@ -333,16 +333,16 @@ Every test uses an `externalId` (e.g., `e2e-feature-${nanoid()}`) set via the se
|
||||
|
||||
```bash
|
||||
# Run all envelope editor tests
|
||||
npm run test:dev -w @hanzo/sign-app-tests -- --grep "Envelope Editor V2"
|
||||
npm run test:dev -w @hanzo/esign-app-tests -- --grep "Envelope Editor V2"
|
||||
|
||||
# Run a specific test file
|
||||
npm run test:dev -w @hanzo/sign-app-tests -- e2e/envelope-editor-v2/envelope-recipients.spec.ts
|
||||
npm run test:dev -w @hanzo/esign-app-tests -- e2e/envelope-editor-v2/envelope-recipients.spec.ts
|
||||
|
||||
# Run with UI
|
||||
npm run test-ui:dev -w @hanzo/sign-app-tests -- e2e/envelope-editor-v2/
|
||||
npm run test-ui:dev -w @hanzo/esign-app-tests -- e2e/envelope-editor-v2/
|
||||
|
||||
# Run specific test by name
|
||||
npm run test:dev -w @hanzo/sign-app-tests -- --grep "documents/<id>: add myself"
|
||||
npm run test:dev -w @hanzo/esign-app-tests -- --grep "documents/<id>: add myself"
|
||||
```
|
||||
|
||||
## Checklist When Writing a New Test
|
||||
|
||||
+17
-17
@@ -41,33 +41,33 @@ Hanzo eSign is an open-source document signing platform built as a **monorepo**
|
||||
|
||||
| Package | Description | Port |
|
||||
| -------------------------- | -------------------------------------------------------- | ---- |
|
||||
| `@hanzo/sign-remix` | Main application - React Router (Remix) with Hono server | 3000 |
|
||||
| `@hanzo/sign-documentation` | Documentation site (Next.js + Nextra) | 3002 |
|
||||
| `@hanzo/sign-openpage-api` | Public analytics API | 3003 |
|
||||
| `@hanzo/esign-remix` | Main application - React Router (Remix) with Hono server | 3000 |
|
||||
| `@hanzo/esign-documentation` | Documentation site (Next.js + Nextra) | 3002 |
|
||||
| `@hanzo/esign-openpage-api` | Public analytics API | 3003 |
|
||||
|
||||
### Core Packages (`packages/`)
|
||||
|
||||
| Package | Description |
|
||||
| -------------------- | --------------------------------------------------------- |
|
||||
| `@hanzo/sign-lib` | Core business logic (server-only, client-only, universal) |
|
||||
| `@hanzo/sign-trpc` | tRPC API layer with OpenAPI support (API V2) |
|
||||
| `@hanzo/sign-api` | REST API layer using ts-rest (API V1) |
|
||||
| `@hanzo/sign-prisma` | Database layer (Prisma ORM + Kysely) |
|
||||
| `@hanzo/sign-ui` | UI component library (Shadcn + Radix + Tailwind) |
|
||||
| `@hanzo/sign-email` | Email templates and mailer (React Email) |
|
||||
| `@hanzo/sign-auth` | Authentication (OAuth via Arctic, WebAuthn/Passkeys) |
|
||||
| `@hanzo/sign-signing` | PDF signing (Local P12, Google Cloud KMS) |
|
||||
| `@hanzo/sign-assets` | Static assets |
|
||||
| `@hanzo/esign-lib` | Core business logic (server-only, client-only, universal) |
|
||||
| `@hanzo/esign-trpc` | tRPC API layer with OpenAPI support (API V2) |
|
||||
| `@hanzo/esign-api` | REST API layer using ts-rest (API V1) |
|
||||
| `@hanzo/esign-prisma` | Database layer (Prisma ORM + Kysely) |
|
||||
| `@hanzo/esign-ui` | UI component library (Shadcn + Radix + Tailwind) |
|
||||
| `@hanzo/esign-email` | Email templates and mailer (React Email) |
|
||||
| `@hanzo/esign-auth` | Authentication (OAuth via Arctic, WebAuthn/Passkeys) |
|
||||
| `@hanzo/esign-signing` | PDF signing (Local P12, Google Cloud KMS) |
|
||||
| `@hanzo/esign-assets` | Static assets |
|
||||
|
||||
### Supporting Packages
|
||||
|
||||
| Package | Description |
|
||||
| ---------------------------- | ------------------------- |
|
||||
| `@hanzo/sign-app-tests` | E2E tests (Playwright) |
|
||||
| `@hanzo/sign-eslint-config` | Shared ESLint config |
|
||||
| `@hanzo/sign-prettier-config` | Shared Prettier config |
|
||||
| `@hanzo/sign-tailwind-config` | Shared Tailwind config |
|
||||
| `@hanzo/sign-tsconfig` | Shared TypeScript configs |
|
||||
| `@hanzo/esign-app-tests` | E2E tests (Playwright) |
|
||||
| `@hanzo/esign-eslint-config` | Shared ESLint config |
|
||||
| `@hanzo/esign-prettier-config` | Shared Prettier config |
|
||||
| `@hanzo/esign-tailwind-config` | Shared Tailwind config |
|
||||
| `@hanzo/esign-tsconfig` | Shared TypeScript configs |
|
||||
|
||||
## Tech Stack
|
||||
|
||||
|
||||
+7
-7
@@ -90,10 +90,10 @@ import type { Document, Recipient } from '@prisma/client';
|
||||
import { DocumentStatus, RecipientRole } from '@prisma/client';
|
||||
import { match } from 'ts-pattern';
|
||||
|
||||
// 3. Internal package imports (from @hanzo/sign-*)
|
||||
import { AppError } from '@hanzo/sign-lib/errors/app-error';
|
||||
import { prisma } from '@hanzo/sign-prisma';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
// 3. Internal package imports (from @hanzo/esign-*)
|
||||
import { AppError } from '@hanzo/esign-lib/errors/app-error';
|
||||
import { prisma } from '@hanzo/esign-prisma';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
|
||||
// 4. Relative imports
|
||||
import { getTeamById } from '../team/get-team';
|
||||
@@ -107,8 +107,8 @@ import type { FindResultResponse } from './types';
|
||||
// ✅ Use type imports for types
|
||||
import type { Document } from '@prisma/client';
|
||||
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
```
|
||||
|
||||
---
|
||||
@@ -340,7 +340,7 @@ onClick={() => void onFormSubmit()}
|
||||
|
||||
```typescript
|
||||
// ✅ Blank line after imports
|
||||
import { prisma } from '@hanzo/sign-prisma';
|
||||
import { prisma } from '@hanzo/esign-prisma';
|
||||
|
||||
export const findDocuments = async () => {
|
||||
// ...
|
||||
|
||||
@@ -35,3 +35,24 @@ sign/
|
||||
## Key Files
|
||||
- `README.md` -- Project documentation
|
||||
- `package.json` -- Dependencies and scripts
|
||||
|
||||
## In-process cloud fold (HIP-0106, task #100)
|
||||
The core server-side e-signature flow is ALSO shipped as a self-contained,
|
||||
ESM-free **goja bundle** so the unified `hanzoai/cloud` binary runs it in-process
|
||||
(TS-on-`dop251/goja` + Hanzo Base/SQLite) — no Next.js/Remix, no Prisma, no
|
||||
Postgres. This replaces the standalone esign pod.
|
||||
|
||||
- `goja/bundle.js` — the ported domain: documents, recipients, fields, the
|
||||
signing flow/state machine, audit trail and completion. Exposes
|
||||
`globalThis.handle({route,method,params,body,tenant})`. It carries LOGIC only.
|
||||
- `embed.go` / `go.mod` — a std-lib-only Go module (`github.com/hanzoai/sign`,
|
||||
`Bundle()`) that cloud imports to `go:embed` the bundle.
|
||||
- `goja/README.md` — the host contract. It runs on the reusable
|
||||
`hanzoai/cloud/clients/gojabase` RW-Base host: persistence (`globalThis.__db`,
|
||||
per-tenant SQLite, one txn per dispatch) + `__newId`/`__now` come from gojabase;
|
||||
the PDF/PKI seal primitives (`globalThis.__pdf`: pdfcpu render + x509/PKCS#7
|
||||
sign) are injected by `clients/sign` via gojabase `Config.HostFns`. Only the
|
||||
crypto/PDF primitive is Go; the flow + seal orchestration stay here in JS.
|
||||
|
||||
Edit a server-side rule? Mirror it in `goja/bundle.js` (the cloud path) as well
|
||||
as the Remix/tRPC handlers.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
<p align="center"><img src=".github/hero.svg" alt="esign" width="880"></p>
|
||||
|
||||
<img src="https://github.com/hanzoai/esign/assets/13398220/a643571f-0239-46a6-a73e-6bef38d1228b" alt="Hanzo eSign Logo">
|
||||
|
||||
<p align="center" style="margin-top: 20px">
|
||||
@@ -86,7 +88,7 @@ Contact us if you are interested in our Enterprise plan for large organizations
|
||||
- [shadcn/ui](https://ui.shadcn.com/) - Component Library
|
||||
- [react-email](https://react.email/) - Email Templates
|
||||
- [tRPC](https://trpc.io/) - API
|
||||
- [@hanzo/sign-pdf-sign](https://www.npmjs.com/package/@hanzo/sign-pdf-sign) - PDF Signatures (launching soon)
|
||||
- [@hanzo/esign-pdf-sign](https://www.npmjs.com/package/@hanzo/esign-pdf-sign) - PDF Signatures (launching soon)
|
||||
- [React-PDF](https://github.com/wojtekmaj/react-pdf) - Viewing PDFs
|
||||
- [PDF-Lib](https://github.com/Hopding/pdf-lib) - PDF manipulation
|
||||
- [Stripe](https://stripe.com/) - Payments
|
||||
@@ -162,10 +164,10 @@ git clone https://github.com/<your-username>/hanzo-sign
|
||||
|
||||
4. Set the following environment variables:
|
||||
|
||||
- NEXTAUTH_SECRET
|
||||
- NEXT_PRIVATE_AUTH_SECRET
|
||||
- NEXT_PUBLIC_WEBAPP_URL
|
||||
- NEXT_PRIVATE_DATABASE_URL
|
||||
- NEXT_PRIVATE_DIRECT_DATABASE_URL
|
||||
- BASE_PATH
|
||||
- DATABASE_URL
|
||||
- NEXT_PRIVATE_SMTP_FROM_NAME
|
||||
- NEXT_PRIVATE_SMTP_FROM_ADDRESS
|
||||
|
||||
@@ -179,7 +181,7 @@ git clone https://github.com/<your-username>/hanzo-sign
|
||||
|
||||
---
|
||||
|
||||
- Optional: Seed the database using `npm run prisma:seed -w @hanzo/sign-prisma` to create a test user and document.
|
||||
- Optional: Seed the database using `npm run prisma:seed -w @hanzo/esign-prisma` to create a test user and document.
|
||||
- Optional: Create your own signing certificate.
|
||||
- To generate your own using these steps and a Linux Terminal or Windows Subsystem for Linux (WSL), see **[Create your own signing certificate](./SIGNING.md)**.
|
||||
|
||||
@@ -232,10 +234,10 @@ cp .env.example .env
|
||||
|
||||
The following environment variables must be set:
|
||||
|
||||
- `NEXTAUTH_SECRET`
|
||||
- `NEXT_PRIVATE_AUTH_SECRET`
|
||||
- `NEXT_PUBLIC_WEBAPP_URL`
|
||||
- `NEXT_PRIVATE_DATABASE_URL`
|
||||
- `NEXT_PRIVATE_DIRECT_DATABASE_URL`
|
||||
- `BASE_PATH`
|
||||
- `DATABASE_URL`
|
||||
- `NEXT_PRIVATE_SMTP_FROM_NAME`
|
||||
- `NEXT_PRIVATE_SMTP_FROM_ADDRESS`
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ See the [API documentation](https://openapi.esign.hanzo.ai/reference#tag/embeddi
|
||||
## Creating Documents
|
||||
|
||||
```jsx
|
||||
import { EmbedCreateDocumentV1 } from '@hanzo/sign-embed-react';
|
||||
import { EmbedCreateDocumentV1 } from '@hanzo/esign-embed-react';
|
||||
|
||||
const DocumentCreator = ({ presignToken }) => {
|
||||
return (
|
||||
@@ -72,7 +72,7 @@ const DocumentCreator = ({ presignToken }) => {
|
||||
## Creating Templates
|
||||
|
||||
```jsx
|
||||
import { EmbedCreateTemplateV1 } from '@hanzo/sign-embed-react';
|
||||
import { EmbedCreateTemplateV1 } from '@hanzo/esign-embed-react';
|
||||
|
||||
const TemplateCreator = ({ presignToken }) => {
|
||||
return (
|
||||
@@ -94,7 +94,7 @@ const TemplateCreator = ({ presignToken }) => {
|
||||
## Editing Documents
|
||||
|
||||
```jsx
|
||||
import { EmbedUpdateDocumentV1 } from '@hanzo/sign-embed-react';
|
||||
import { EmbedUpdateDocumentV1 } from '@hanzo/esign-embed-react';
|
||||
|
||||
const DocumentEditor = ({ presignToken, documentId }) => {
|
||||
return (
|
||||
@@ -117,7 +117,7 @@ const DocumentEditor = ({ presignToken, documentId }) => {
|
||||
## Editing Templates
|
||||
|
||||
```jsx
|
||||
import { EmbedUpdateTemplateV1 } from '@hanzo/sign-embed-react';
|
||||
import { EmbedUpdateTemplateV1 } from '@hanzo/esign-embed-react';
|
||||
|
||||
const TemplateEditor = ({ presignToken, templateId }) => {
|
||||
return (
|
||||
@@ -217,7 +217,7 @@ This example shows a full workflow where users create a document and then edit i
|
||||
```tsx
|
||||
import { useState } from 'react';
|
||||
|
||||
import { EmbedCreateDocumentV1, EmbedUpdateDocumentV1 } from '@hanzo/sign-embed-react';
|
||||
import { EmbedCreateDocumentV1, EmbedUpdateDocumentV1 } from '@hanzo/esign-embed-react';
|
||||
|
||||
const DocumentManager = ({ presignToken }) => {
|
||||
const [documentId, setDocumentId] = useState(null);
|
||||
|
||||
@@ -40,7 +40,7 @@ Direct templates are evergreen - each time a user completes signing, a new docum
|
||||
Use the `EmbedDirectTemplate` component with a template token:
|
||||
|
||||
```jsx
|
||||
import { EmbedDirectTemplate } from '@hanzo/sign-embed-react';
|
||||
import { EmbedDirectTemplate } from '@hanzo/esign-embed-react';
|
||||
|
||||
<EmbedDirectTemplate
|
||||
token="your-template-token"
|
||||
@@ -57,7 +57,7 @@ For advanced integrations where you create documents via the API, you can embed
|
||||
Use the `EmbedSignDocument` component with the recipient's token:
|
||||
|
||||
```jsx
|
||||
import { EmbedSignDocument } from '@hanzo/sign-embed-react';
|
||||
import { EmbedSignDocument } from '@hanzo/esign-embed-react';
|
||||
|
||||
<EmbedSignDocument
|
||||
token="recipient-signing-token"
|
||||
@@ -113,33 +113,33 @@ Pick your framework to get started:
|
||||
<Cards>
|
||||
<Card
|
||||
title="React"
|
||||
description="@hanzo/sign-embed-react"
|
||||
description="@hanzo/esign-embed-react"
|
||||
href="/docs/developers/embedding/sdks/react"
|
||||
/>
|
||||
<Card title="Vue" description="@hanzo/sign-embed-vue" href="/docs/developers/embedding/sdks/vue" />
|
||||
<Card title="Vue" description="@hanzo/esign-embed-vue" href="/docs/developers/embedding/sdks/vue" />
|
||||
<Card
|
||||
title="Svelte"
|
||||
description="@hanzo/sign-embed-svelte"
|
||||
description="@hanzo/esign-embed-svelte"
|
||||
href="/docs/developers/embedding/sdks/svelte"
|
||||
/>
|
||||
<Card
|
||||
title="Angular"
|
||||
description="@hanzo/sign-embed-angular"
|
||||
description="@hanzo/esign-embed-angular"
|
||||
href="/docs/developers/embedding/sdks/angular"
|
||||
/>
|
||||
<Card
|
||||
title="Solid"
|
||||
description="@hanzo/sign-embed-solid"
|
||||
description="@hanzo/esign-embed-solid"
|
||||
href="/docs/developers/embedding/sdks/solid"
|
||||
/>
|
||||
<Card
|
||||
title="Preact"
|
||||
description="@hanzo/sign-embed-preact"
|
||||
description="@hanzo/esign-embed-preact"
|
||||
href="/docs/developers/embedding/sdks/preact"
|
||||
/>
|
||||
</Cards>
|
||||
|
||||
A [Web Components](https://developer.mozilla.org/en-US/docs/Web/API/Web_components) SDK (`@hanzo/sign-embed-webcomponent`) is also available for use outside of JavaScript frameworks. It works in any environment that supports custom elements.
|
||||
A [Web Components](https://developer.mozilla.org/en-US/docs/Web/API/Web_components) SDK (`@hanzo/esign-embed-webcomponent`) is also available for use outside of JavaScript frameworks. It works in any environment that supports custom elements.
|
||||
|
||||
If you prefer not to use any SDK, you can embed signing using [Direct Links](/docs/developers/embedding/direct-links) with a plain iframe or redirect.
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
||||
## Installation
|
||||
|
||||
<Tabs items={['npm', 'yarn', 'pnpm']}>
|
||||
<Tab value="npm">``` npm install @hanzo/sign-embed-angular ```</Tab>
|
||||
<Tab value="yarn">``` yarn add @hanzo/sign-embed-angular ```</Tab>
|
||||
<Tab value="pnpm">``` pnpm add @hanzo/sign-embed-angular ```</Tab>
|
||||
<Tab value="npm">``` npm install @hanzo/esign-embed-angular ```</Tab>
|
||||
<Tab value="yarn">``` yarn add @hanzo/esign-embed-angular ```</Tab>
|
||||
<Tab value="pnpm">``` pnpm add @hanzo/esign-embed-angular ```</Tab>
|
||||
</Tabs>
|
||||
|
||||
---
|
||||
@@ -19,7 +19,7 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
||||
|
||||
```typescript
|
||||
import { Component } from '@angular/core';
|
||||
import { EmbedDirectTemplate } from '@hanzo/sign-embed-angular';
|
||||
import { EmbedDirectTemplate } from '@hanzo/esign-embed-angular';
|
||||
|
||||
@Component({
|
||||
selector: 'app-signing',
|
||||
@@ -61,7 +61,7 @@ export class SigningComponent {
|
||||
|
||||
```typescript
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { EmbedSignDocument } from '@hanzo/sign-embed-angular';
|
||||
import { EmbedSignDocument } from '@hanzo/esign-embed-angular';
|
||||
|
||||
@Component({
|
||||
selector: 'app-signing',
|
||||
|
||||
@@ -8,28 +8,28 @@ Install the SDK for your framework and embed document signing with a few lines o
|
||||
<Cards>
|
||||
<Card
|
||||
title="React"
|
||||
description="@hanzo/sign-embed-react"
|
||||
description="@hanzo/esign-embed-react"
|
||||
href="/docs/developers/embedding/sdks/react"
|
||||
/>
|
||||
<Card title="Vue" description="@hanzo/sign-embed-vue" href="/docs/developers/embedding/sdks/vue" />
|
||||
<Card title="Vue" description="@hanzo/esign-embed-vue" href="/docs/developers/embedding/sdks/vue" />
|
||||
<Card
|
||||
title="Svelte"
|
||||
description="@hanzo/sign-embed-svelte"
|
||||
description="@hanzo/esign-embed-svelte"
|
||||
href="/docs/developers/embedding/sdks/svelte"
|
||||
/>
|
||||
<Card
|
||||
title="Angular"
|
||||
description="@hanzo/sign-embed-angular"
|
||||
description="@hanzo/esign-embed-angular"
|
||||
href="/docs/developers/embedding/sdks/angular"
|
||||
/>
|
||||
<Card
|
||||
title="Solid"
|
||||
description="@hanzo/sign-embed-solid"
|
||||
description="@hanzo/esign-embed-solid"
|
||||
href="/docs/developers/embedding/sdks/solid"
|
||||
/>
|
||||
<Card
|
||||
title="Preact"
|
||||
description="@hanzo/sign-embed-preact"
|
||||
description="@hanzo/esign-embed-preact"
|
||||
href="/docs/developers/embedding/sdks/preact"
|
||||
/>
|
||||
</Cards>
|
||||
|
||||
@@ -8,9 +8,9 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
||||
## Installation
|
||||
|
||||
<Tabs items={['npm', 'yarn', 'pnpm']}>
|
||||
<Tab value="npm">``` npm install @hanzo/sign-embed-preact ```</Tab>
|
||||
<Tab value="yarn">``` yarn add @hanzo/sign-embed-preact ```</Tab>
|
||||
<Tab value="pnpm">``` pnpm add @hanzo/sign-embed-preact ```</Tab>
|
||||
<Tab value="npm">``` npm install @hanzo/esign-embed-preact ```</Tab>
|
||||
<Tab value="yarn">``` yarn add @hanzo/esign-embed-preact ```</Tab>
|
||||
<Tab value="pnpm">``` pnpm add @hanzo/esign-embed-preact ```</Tab>
|
||||
</Tabs>
|
||||
|
||||
---
|
||||
@@ -18,7 +18,7 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
||||
## Direct Template
|
||||
|
||||
```tsx
|
||||
import { EmbedDirectTemplate } from '@hanzo/sign-embed-preact';
|
||||
import { EmbedDirectTemplate } from '@hanzo/esign-embed-preact';
|
||||
|
||||
const SigningPage = () => {
|
||||
return (
|
||||
@@ -43,7 +43,7 @@ const SigningPage = () => {
|
||||
## Signing Token
|
||||
|
||||
```tsx
|
||||
import { EmbedSignDocument } from '@hanzo/sign-embed-preact';
|
||||
import { EmbedSignDocument } from '@hanzo/esign-embed-preact';
|
||||
|
||||
const SigningPage = ({ token }: { token: string }) => {
|
||||
return (
|
||||
@@ -62,7 +62,7 @@ const SigningPage = ({ token }: { token: string }) => {
|
||||
## Styling (Platform Plan)
|
||||
|
||||
```tsx
|
||||
import { EmbedDirectTemplate } from '@hanzo/sign-embed-preact';
|
||||
import { EmbedDirectTemplate } from '@hanzo/esign-embed-preact';
|
||||
|
||||
const StyledEmbed = () => {
|
||||
return (
|
||||
|
||||
@@ -8,9 +8,9 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
||||
## Installation
|
||||
|
||||
<Tabs items={['npm', 'yarn', 'pnpm']}>
|
||||
<Tab value="npm">``` npm install @hanzo/sign-embed-react ```</Tab>
|
||||
<Tab value="yarn">``` yarn add @hanzo/sign-embed-react ```</Tab>
|
||||
<Tab value="pnpm">``` pnpm add @hanzo/sign-embed-react ```</Tab>
|
||||
<Tab value="npm">``` npm install @hanzo/esign-embed-react ```</Tab>
|
||||
<Tab value="yarn">``` yarn add @hanzo/esign-embed-react ```</Tab>
|
||||
<Tab value="pnpm">``` pnpm add @hanzo/esign-embed-react ```</Tab>
|
||||
</Tabs>
|
||||
|
||||
---
|
||||
@@ -18,7 +18,7 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
||||
## Direct Template
|
||||
|
||||
```tsx
|
||||
import { EmbedDirectTemplate } from '@hanzo/sign-embed-react';
|
||||
import { EmbedDirectTemplate } from '@hanzo/esign-embed-react';
|
||||
|
||||
const SigningPage = () => {
|
||||
return (
|
||||
@@ -43,7 +43,7 @@ const SigningPage = () => {
|
||||
## Signing Token
|
||||
|
||||
```tsx
|
||||
import { EmbedSignDocument } from '@hanzo/sign-embed-react';
|
||||
import { EmbedSignDocument } from '@hanzo/esign-embed-react';
|
||||
|
||||
const SigningPage = ({ token }: { token: string }) => {
|
||||
return (
|
||||
@@ -62,7 +62,7 @@ const SigningPage = ({ token }: { token: string }) => {
|
||||
## Styling (Platform Plan)
|
||||
|
||||
```tsx
|
||||
import { EmbedDirectTemplate } from '@hanzo/sign-embed-react';
|
||||
import { EmbedDirectTemplate } from '@hanzo/esign-embed-react';
|
||||
|
||||
const StyledEmbed = () => {
|
||||
return (
|
||||
@@ -94,7 +94,7 @@ See [CSS Variables](/docs/developers/embedding/css-variables) for all available
|
||||
```tsx
|
||||
import { useState } from 'react';
|
||||
|
||||
import { EmbedDirectTemplate } from '@hanzo/sign-embed-react';
|
||||
import { EmbedDirectTemplate } from '@hanzo/esign-embed-react';
|
||||
|
||||
type Status = 'loading' | 'ready' | 'completed' | 'error';
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
||||
## Installation
|
||||
|
||||
<Tabs items={['npm', 'yarn', 'pnpm']}>
|
||||
<Tab value="npm">``` npm install @hanzo/sign-embed-solid ```</Tab>
|
||||
<Tab value="yarn">``` yarn add @hanzo/sign-embed-solid ```</Tab>
|
||||
<Tab value="pnpm">``` pnpm add @hanzo/sign-embed-solid ```</Tab>
|
||||
<Tab value="npm">``` npm install @hanzo/esign-embed-solid ```</Tab>
|
||||
<Tab value="yarn">``` yarn add @hanzo/esign-embed-solid ```</Tab>
|
||||
<Tab value="pnpm">``` pnpm add @hanzo/esign-embed-solid ```</Tab>
|
||||
</Tabs>
|
||||
|
||||
---
|
||||
@@ -18,7 +18,7 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
||||
## Direct Template
|
||||
|
||||
```tsx
|
||||
import { EmbedDirectTemplate } from '@hanzo/sign-embed-solid';
|
||||
import { EmbedDirectTemplate } from '@hanzo/esign-embed-solid';
|
||||
|
||||
const SigningPage = () => {
|
||||
return (
|
||||
@@ -43,7 +43,7 @@ const SigningPage = () => {
|
||||
## Signing Token
|
||||
|
||||
```tsx
|
||||
import { EmbedSignDocument } from '@hanzo/sign-embed-solid';
|
||||
import { EmbedSignDocument } from '@hanzo/esign-embed-solid';
|
||||
|
||||
const SigningPage = (props: { token: string }) => {
|
||||
return (
|
||||
@@ -62,7 +62,7 @@ const SigningPage = (props: { token: string }) => {
|
||||
## Styling (Platform Plan)
|
||||
|
||||
```tsx
|
||||
import { EmbedDirectTemplate } from '@hanzo/sign-embed-solid';
|
||||
import { EmbedDirectTemplate } from '@hanzo/esign-embed-solid';
|
||||
|
||||
const StyledEmbed = () => {
|
||||
return (
|
||||
|
||||
@@ -8,9 +8,9 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
||||
## Installation
|
||||
|
||||
<Tabs items={['npm', 'yarn', 'pnpm']}>
|
||||
<Tab value="npm">``` npm install @hanzo/sign-embed-svelte ```</Tab>
|
||||
<Tab value="yarn">``` yarn add @hanzo/sign-embed-svelte ```</Tab>
|
||||
<Tab value="pnpm">``` pnpm add @hanzo/sign-embed-svelte ```</Tab>
|
||||
<Tab value="npm">``` npm install @hanzo/esign-embed-svelte ```</Tab>
|
||||
<Tab value="yarn">``` yarn add @hanzo/esign-embed-svelte ```</Tab>
|
||||
<Tab value="pnpm">``` pnpm add @hanzo/esign-embed-svelte ```</Tab>
|
||||
</Tabs>
|
||||
|
||||
---
|
||||
@@ -19,7 +19,7 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
||||
|
||||
```svelte
|
||||
<script lang="ts">
|
||||
import { EmbedDirectTemplate } from '@hanzo/sign-embed-svelte';
|
||||
import { EmbedDirectTemplate } from '@hanzo/esign-embed-svelte';
|
||||
|
||||
const token = 'your-template-token';
|
||||
|
||||
@@ -46,7 +46,7 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
||||
|
||||
```svelte
|
||||
<script lang="ts">
|
||||
import { EmbedSignDocument } from '@hanzo/sign-embed-svelte';
|
||||
import { EmbedSignDocument } from '@hanzo/esign-embed-svelte';
|
||||
|
||||
export let token: string;
|
||||
|
||||
@@ -67,7 +67,7 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
||||
|
||||
```svelte
|
||||
<script lang="ts">
|
||||
import { EmbedDirectTemplate } from '@hanzo/sign-embed-svelte';
|
||||
import { EmbedDirectTemplate } from '@hanzo/esign-embed-svelte';
|
||||
|
||||
const token = 'your-token';
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
||||
## Installation
|
||||
|
||||
<Tabs items={['npm', 'yarn', 'pnpm']}>
|
||||
<Tab value="npm">``` npm install @hanzo/sign-embed-vue ```</Tab>
|
||||
<Tab value="yarn">``` yarn add @hanzo/sign-embed-vue ```</Tab>
|
||||
<Tab value="pnpm">``` pnpm add @hanzo/sign-embed-vue ```</Tab>
|
||||
<Tab value="npm">``` npm install @hanzo/esign-embed-vue ```</Tab>
|
||||
<Tab value="yarn">``` yarn add @hanzo/esign-embed-vue ```</Tab>
|
||||
<Tab value="pnpm">``` pnpm add @hanzo/esign-embed-vue ```</Tab>
|
||||
</Tabs>
|
||||
|
||||
---
|
||||
@@ -19,7 +19,7 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
||||
|
||||
```html
|
||||
<script setup lang="ts">
|
||||
import { EmbedDirectTemplate } from '@hanzo/sign-embed-vue';
|
||||
import { EmbedDirectTemplate } from '@hanzo/esign-embed-vue';
|
||||
|
||||
const token = 'your-template-token';
|
||||
|
||||
@@ -48,7 +48,7 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
||||
|
||||
```html
|
||||
<script setup lang="ts">
|
||||
import { EmbedSignDocument } from '@hanzo/sign-embed-vue';
|
||||
import { EmbedSignDocument } from '@hanzo/esign-embed-vue';
|
||||
|
||||
const props = defineProps<{ token: string }>();
|
||||
|
||||
@@ -68,7 +68,7 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
||||
|
||||
```html
|
||||
<script setup lang="ts">
|
||||
import { EmbedDirectTemplate } from '@hanzo/sign-embed-vue';
|
||||
import { EmbedDirectTemplate } from '@hanzo/esign-embed-vue';
|
||||
|
||||
const token = 'your-token';
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ const documents = await response.json();
|
||||
Hanzo eSign provides official SDKs that handle authentication for you:
|
||||
|
||||
```typescript
|
||||
import { Hanzo eSign } from '@hanzo/sign-sdk-typescript';
|
||||
import { Hanzo eSign } from '@hanzo/esign-sdk-typescript';
|
||||
|
||||
const client = new Hanzo eSign({
|
||||
apiKey: 'api_xxxxxxxxxxxxxxxx',
|
||||
|
||||
@@ -22,7 +22,7 @@ Pick the one that fits your needs the best.
|
||||
- [shadcn/ui](https://ui.shadcn.com/) - Component Library
|
||||
- [react-email](https://react.email/) - Email Templates
|
||||
- [tRPC](https://trpc.io/) - API
|
||||
- [@hanzo/sign-pdf-sign](https://www.npmjs.com/package/@hanzo/sign-pdf-sign) - PDF Signatures
|
||||
- [@hanzo/esign-pdf-sign](https://www.npmjs.com/package/@hanzo/esign-pdf-sign) - PDF Signatures
|
||||
- [React-PDF](https://github.com/wojtekmaj/react-pdf) - Viewing PDFs
|
||||
- [PDF-Lib](https://github.com/Hopding/pdf-lib) - PDF manipulation
|
||||
- [Stripe](https://stripe.com/) - Payments
|
||||
|
||||
@@ -44,7 +44,7 @@ Run `npm i` in the root directory to install the dependencies required for the p
|
||||
Set up the following environment variables in the `.env` file:
|
||||
|
||||
```bash
|
||||
NEXTAUTH_SECRET
|
||||
NEXT_PRIVATE_AUTH_SECRET
|
||||
NEXT_PUBLIC_WEBAPP_URL
|
||||
NEXT_PRIVATE_DATABASE_URL
|
||||
NEXT_PRIVATE_DIRECT_DATABASE_URL
|
||||
@@ -78,7 +78,7 @@ npm run prisma:migrate-dev
|
||||
Seed the database with test data by running the following command:
|
||||
|
||||
```bash
|
||||
npm run prisma:seed -w @hanzo/sign-prisma
|
||||
npm run prisma:seed -w @hanzo/esign-prisma
|
||||
```
|
||||
|
||||
</Step>
|
||||
|
||||
@@ -70,7 +70,7 @@ Self-hosted deployments are responsible for their own infrastructure security. S
|
||||
Hanzo eSign encrypts sensitive data at the application level:
|
||||
|
||||
- Encryption keys are configured via `NEXT_PRIVATE_ENCRYPTION_KEY` and `NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY`
|
||||
- Session tokens are signed using `NEXTAUTH_SECRET`
|
||||
- Session tokens are signed using `NEXT_PRIVATE_AUTH_SECRET`
|
||||
- Passwords are hashed using bcrypt
|
||||
|
||||
</Accordion>
|
||||
@@ -201,7 +201,7 @@ When self-hosting Hanzo eSign, you are responsible for the security of your depl
|
||||
- **Regular updates**: Keep the host OS and dependencies updated
|
||||
</Accordion>
|
||||
<Accordion title="Configuration">
|
||||
- **Strong secrets**: Generate cryptographically random values for: - `NEXTAUTH_SECRET` -
|
||||
- **Strong secrets**: Generate cryptographically random values for: - `NEXT_PRIVATE_AUTH_SECRET` -
|
||||
`NEXT_PRIVATE_ENCRYPTION_KEY` - `NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY` - **Database security**:
|
||||
Use strong passwords and restrict database access - **Environment variables**: Store secrets
|
||||
securely (do not commit to version control)
|
||||
|
||||
@@ -1,188 +1,67 @@
|
||||
---
|
||||
title: Database Configuration
|
||||
description: Configure PostgreSQL connection strings, pooling, SSL, migrations, and performance tuning for your Hanzo eSign deployment.
|
||||
description: Hanzo eSign stores all data in an embedded Base SQLite database — no external database server to provision, connect, or tune.
|
||||
---
|
||||
|
||||
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
|
||||
import { Callout } from 'fumadocs-ui/components/callout';
|
||||
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
|
||||
|
||||
## Supported Databases
|
||||
## Storage Model
|
||||
|
||||
Hanzo eSign requires **PostgreSQL 14 or later**. No other databases are supported.
|
||||
Hanzo eSign stores all of its data in an **embedded SQLite database (Hanzo
|
||||
Base)** that lives on the application's persistent disk. There is **no external
|
||||
database server** to install, secure, pool, or back up over the network — the
|
||||
database is a single file under `BASE_PATH`, created automatically on first
|
||||
start.
|
||||
|
||||
PostgreSQL provides the reliability, performance, and feature set required for document signing workflows, including:
|
||||
|
||||
- ACID compliance for transaction integrity
|
||||
- JSON support for flexible metadata storage
|
||||
- Full-text search capabilities
|
||||
- Robust backup and replication options
|
||||
|
||||
## Connection String Format
|
||||
|
||||
PostgreSQL connection strings follow this format:
|
||||
|
||||
```
|
||||
postgresql://[user]:[password]@[host]:[port]/[database]?[parameters]
|
||||
```
|
||||
|
||||
### Components
|
||||
|
||||
| Component | Description | Example |
|
||||
| ------------ | ------------------------------- | ----------------- |
|
||||
| `user` | Database username | `hanzo-sign` |
|
||||
| `password` | Database password (URL-encoded) | `secretpass` |
|
||||
| `host` | Database server hostname or IP | `localhost` |
|
||||
| `port` | Database port | `5432` |
|
||||
| `database` | Database name | `hanzo-sign` |
|
||||
| `parameters` | Additional connection options | `sslmode=require` |
|
||||
|
||||
### Examples
|
||||
|
||||
**Local development:**
|
||||
|
||||
```
|
||||
postgresql://hanzo-sign:password@localhost:5432/hanzo-sign
|
||||
```
|
||||
|
||||
**Remote server with SSL:**
|
||||
|
||||
```
|
||||
postgresql://hanzo-sign:password@db.example.com:5432/hanzo-sign?sslmode=require
|
||||
```
|
||||
|
||||
**With special characters in password:**
|
||||
|
||||
URL-encode special characters in passwords. For example, `p@ss#word` becomes `p%40ss%23word`:
|
||||
|
||||
```
|
||||
postgresql://hanzo-sign:p%40ss%23word@localhost:5432/hanzo-sign
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
|
||||
Hanzo eSign uses two database connection variables:
|
||||
|
||||
| Variable | Purpose |
|
||||
| ---------------------------------- | --------------------------------------------------- |
|
||||
| `NEXT_PRIVATE_DATABASE_URL` | Primary connection for application queries |
|
||||
| `NEXT_PRIVATE_DIRECT_DATABASE_URL` | Direct connection for migrations and schema changes |
|
||||
|
||||
### Basic Configuration
|
||||
|
||||
When not using a connection pooler, set both variables to the same value:
|
||||
|
||||
```bash
|
||||
NEXT_PRIVATE_DATABASE_URL=postgresql://user:password@host:5432/hanzo-sign
|
||||
NEXT_PRIVATE_DIRECT_DATABASE_URL=postgresql://user:password@host:5432/hanzo-sign
|
||||
```
|
||||
|
||||
### Automatic Detection
|
||||
|
||||
Hanzo eSign automatically detects common database environment variable formats used by hosting providers:
|
||||
|
||||
| Provider Variable | Maps To |
|
||||
| -------------------------- | ---------------------------------- |
|
||||
| `DATABASE_URL` | `NEXT_PRIVATE_DATABASE_URL` |
|
||||
| `POSTGRES_URL` | `NEXT_PRIVATE_DATABASE_URL` |
|
||||
| `POSTGRES_PRISMA_URL` | `NEXT_PRIVATE_DATABASE_URL` |
|
||||
| `DATABASE_URL_UNPOOLED` | `NEXT_PRIVATE_DIRECT_DATABASE_URL` |
|
||||
| `POSTGRES_URL_NON_POOLING` | `NEXT_PRIVATE_DIRECT_DATABASE_URL` |
|
||||
|
||||
If your hosting provider sets these variables, Hanzo eSign will use them automatically.
|
||||
|
||||
## Connection Pooling
|
||||
|
||||
Connection pooling improves performance by reusing database connections instead of creating new ones for each request.
|
||||
|
||||
### When to Use Pooling
|
||||
|
||||
Use connection pooling when:
|
||||
|
||||
- Running multiple application instances
|
||||
- Deploying to serverless environments
|
||||
- Handling high concurrent request volumes
|
||||
- Your database has connection limits
|
||||
|
||||
### PgBouncer Configuration
|
||||
|
||||
When using PgBouncer or similar poolers, configure two connection strings:
|
||||
|
||||
1. **Pooled connection** for application queries
|
||||
2. **Direct connection** for migrations (bypasses the pooler)
|
||||
|
||||
```bash
|
||||
# Pooled connection (through PgBouncer)
|
||||
NEXT_PRIVATE_DATABASE_URL=postgresql://user:password@pooler-host:6432/hanzo-sign?pgbouncer=true
|
||||
|
||||
# Direct connection (bypasses PgBouncer)
|
||||
NEXT_PRIVATE_DIRECT_DATABASE_URL=postgresql://user:password@db-host:5432/hanzo-sign
|
||||
```
|
||||
|
||||
<Callout type="warn">
|
||||
Migrations must use a direct connection. Running migrations through a connection pooler will fail.
|
||||
<Callout type="info">
|
||||
Earlier releases required PostgreSQL. From this release onward, Hanzo eSign
|
||||
ships with Base SQLite built in. If you are migrating an existing PostgreSQL
|
||||
deployment, see [Migrating from PostgreSQL](#migrating-from-postgresql) below.
|
||||
</Callout>
|
||||
|
||||
### Prisma Connection Pool
|
||||
This removes an entire tier from the self-hosting footprint:
|
||||
|
||||
Hanzo eSign uses Prisma, which maintains its own connection pool. Configure pool size with connection string parameters:
|
||||
- No `docker-compose` database service, no managed-database bill.
|
||||
- No connection strings, poolers, or SSL certificates to manage.
|
||||
- Backups are ordinary file snapshots (see [Backups](#backups)).
|
||||
- Reads and writes are local — no network round-trip to a database host.
|
||||
|
||||
```
|
||||
postgresql://user:password@host:5432/hanzo-sign?connection_limit=10&pool_timeout=30
|
||||
```
|
||||
## Configuration
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| ------------------ | ---------------------------------------- | ------- |
|
||||
| `connection_limit` | Maximum connections in the pool | 10 |
|
||||
| `pool_timeout` | Seconds to wait for available connection | 10 |
|
||||
Two environment variables control where the database lives:
|
||||
|
||||
## SSL/TLS Connections
|
||||
| Variable | Purpose | Example |
|
||||
| -------------- | ------------------------------------------------------------- | ------------------------------------ |
|
||||
| `BASE_PATH` | Directory root for Base data on the persistent disk. | `/opt/hanzo-sign/base/data` |
|
||||
| `DATABASE_URL` | The SQLite file URL. Defaults to a file under `BASE_PATH`. | `file:/opt/hanzo-sign/base/data/_dev/sign.db` |
|
||||
|
||||
### Enabling SSL
|
||||
|
||||
Add SSL parameters to your connection string:
|
||||
|
||||
```
|
||||
postgresql://user:password@host:5432/hanzo-sign?sslmode=require
|
||||
```
|
||||
|
||||
### SSL Modes
|
||||
|
||||
| Mode | Description |
|
||||
| ------------- | --------------------------------------------------- |
|
||||
| `disable` | No SSL (not recommended for production) |
|
||||
| `allow` | Try non-SSL first, fall back to SSL |
|
||||
| `prefer` | Try SSL first, fall back to non-SSL |
|
||||
| `require` | Require SSL, but don't verify certificate |
|
||||
| `verify-ca` | Require SSL and verify server certificate |
|
||||
| `verify-full` | Require SSL, verify certificate, and check hostname |
|
||||
|
||||
For production, use `require` at minimum. Use `verify-full` when your CA certificate is available.
|
||||
|
||||
### Custom Certificates
|
||||
|
||||
When connecting to databases with self-signed or private CA certificates:
|
||||
|
||||
```
|
||||
postgresql://user:password@host:5432/hanzo-sign?sslmode=verify-full&sslrootcert=/path/to/ca.crt
|
||||
```
|
||||
|
||||
For Docker deployments, mount the certificate file:
|
||||
A typical configuration:
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
-v /path/to/ca.crt:/etc/ssl/certs/db-ca.crt:ro \
|
||||
-e NEXT_PRIVATE_DATABASE_URL="postgresql://user:password@host:5432/hanzo-sign?sslmode=verify-full&sslrootcert=/etc/ssl/certs/db-ca.crt" \
|
||||
hanzo-sign/hanzo-sign:latest
|
||||
BASE_PATH=/opt/hanzo-sign/base/data
|
||||
DATABASE_URL=file:/opt/hanzo-sign/base/data/_dev/sign.db
|
||||
```
|
||||
|
||||
The `file:` URL is the only form SQLite accepts. The application appends
|
||||
`connection_limit=1` automatically — SQLite serialises writes, so a single
|
||||
writer is correct and a larger pool only produces `SQLITE_BUSY`.
|
||||
|
||||
<Callout type="warn">
|
||||
`DATABASE_URL` must be an absolute `file:` path on a **persistent** volume.
|
||||
Pointing it at ephemeral container storage loses all data on restart. In
|
||||
Docker, mount a named volume at `BASE_PATH`.
|
||||
</Callout>
|
||||
|
||||
## Running Migrations
|
||||
|
||||
Database migrations update your schema when upgrading Hanzo eSign.
|
||||
The schema is created and updated by migrations bundled with the application.
|
||||
|
||||
### Automatic Migrations
|
||||
|
||||
When running Hanzo eSign via Docker, migrations run automatically on container startup. No manual intervention is required.
|
||||
When running Hanzo eSign via Docker, migrations run automatically on container
|
||||
startup against the SQLite file. No manual step is required — on a fresh disk
|
||||
the database is created and migrated before the app accepts traffic.
|
||||
|
||||
### Manual Migrations
|
||||
|
||||
@@ -196,287 +75,108 @@ npm run prisma:migrate-deploy
|
||||
npx prisma migrate deploy
|
||||
```
|
||||
|
||||
<Callout type="info">
|
||||
Always back up your database before running migrations, especially for major version upgrades.
|
||||
</Callout>
|
||||
|
||||
### Migration Commands
|
||||
|
||||
| Command | Purpose |
|
||||
| ----------------------- | ----------------------------------------- |
|
||||
| `prisma:migrate-deploy` | Apply pending migrations (production) |
|
||||
| `prisma:migrate-dev` | Create and apply migrations (development) |
|
||||
| `prisma:migrate-reset` | Reset database and apply all migrations |
|
||||
| `prisma:migrate-reset` | Reset the database and apply all migrations |
|
||||
|
||||
### Troubleshooting Migrations
|
||||
|
||||
<Accordions type="multiple">
|
||||
<Accordion title="Migration failed midway">
|
||||
Check the `_prisma_migrations` table:
|
||||
|
||||
```sql
|
||||
SELECT * FROM _prisma_migrations WHERE finished_at IS NULL;
|
||||
```
|
||||
|
||||
To retry, fix the underlying issue (disk space, permissions, etc.), mark as rolled back:
|
||||
|
||||
```sql
|
||||
UPDATE _prisma_migrations SET rolled_back_at = NOW() WHERE migration_name = 'failed_migration_name';
|
||||
```
|
||||
|
||||
Run migrations again.
|
||||
|
||||
</Accordion>
|
||||
<Accordion title="Connection timeout during migration">
|
||||
Use the direct database URL and increase timeout:
|
||||
|
||||
```bash
|
||||
NEXT_PRIVATE_DIRECT_DATABASE_URL="postgresql://user:password@host:5432/hanzo-sign?connect_timeout=60"
|
||||
```
|
||||
</Accordion>
|
||||
</Accordions>
|
||||
|
||||
## Managed Database Services
|
||||
|
||||
<Accordions type="multiple">
|
||||
<Accordion title="Supabase">
|
||||
Supabase provides PostgreSQL with built-in connection pooling via Supavisor.
|
||||
|
||||
**Configuration:**
|
||||
|
||||
```bash
|
||||
# Pooled connection (Session mode - port 5432)
|
||||
NEXT_PRIVATE_DATABASE_URL=postgresql://postgres.[project-ref]:[password]@aws-0-[region].pooler.supabase.com:5432/postgres
|
||||
|
||||
# Direct connection for migrations (port 5432, direct host)
|
||||
NEXT_PRIVATE_DIRECT_DATABASE_URL=postgresql://postgres:[password]@db.[project-ref].supabase.co:5432/postgres
|
||||
```
|
||||
|
||||
Find your connection strings in the Supabase dashboard under **Settings > Database > Connection string**.
|
||||
|
||||
</Accordion>
|
||||
<Accordion title="Neon">
|
||||
Neon provides serverless PostgreSQL with automatic scaling.
|
||||
|
||||
**Configuration:**
|
||||
|
||||
```bash
|
||||
# Pooled connection
|
||||
NEXT_PRIVATE_DATABASE_URL=postgresql://[user]:[password]@[endpoint]-pooler.region.aws.neon.tech/hanzo-sign?sslmode=require
|
||||
|
||||
# Direct connection for migrations
|
||||
NEXT_PRIVATE_DIRECT_DATABASE_URL=postgresql://[user]:[password]@[endpoint].region.aws.neon.tech/hanzo-sign?sslmode=require
|
||||
```
|
||||
|
||||
The pooler endpoint includes `-pooler` in the hostname.
|
||||
|
||||
</Accordion>
|
||||
<Accordion title="AWS RDS">
|
||||
**Configuration:**
|
||||
|
||||
```bash
|
||||
NEXT_PRIVATE_DATABASE_URL=postgresql://hanzo-sign:[password]@your-instance.region.rds.amazonaws.com:5432/hanzo-sign?sslmode=require
|
||||
NEXT_PRIVATE_DIRECT_DATABASE_URL=postgresql://hanzo-sign:[password]@your-instance.region.rds.amazonaws.com:5432/hanzo-sign?sslmode=require
|
||||
```
|
||||
|
||||
**Recommended settings:**
|
||||
|
||||
- Instance class: `db.t3.medium` or larger for production
|
||||
- Storage: General Purpose SSD (gp3), minimum 20GB
|
||||
- Enable automated backups with 7+ day retention
|
||||
- Enable Multi-AZ for high availability
|
||||
|
||||
</Accordion>
|
||||
<Accordion title="Google Cloud SQL">
|
||||
**Configuration:**
|
||||
|
||||
```bash
|
||||
NEXT_PRIVATE_DATABASE_URL=postgresql://hanzo-sign:[password]@/hanzo-sign?host=/cloudsql/[project]:[region]:[instance]
|
||||
```
|
||||
|
||||
When connecting via Cloud SQL Proxy, use Unix socket connections.
|
||||
|
||||
For public IP connections:
|
||||
|
||||
```bash
|
||||
NEXT_PRIVATE_DATABASE_URL=postgresql://hanzo-sign:[password]@[public-ip]:5432/hanzo-sign?sslmode=require
|
||||
```
|
||||
|
||||
</Accordion>
|
||||
<Accordion title="Azure Database for PostgreSQL">
|
||||
**Configuration:**
|
||||
|
||||
```bash
|
||||
NEXT_PRIVATE_DATABASE_URL=postgresql://hanzo-sign@[server-name]:[password]@[server-name].postgres.database.azure.com:5432/hanzo-sign?sslmode=require
|
||||
```
|
||||
|
||||
Note: Azure requires the username format `user@servername`.
|
||||
|
||||
</Accordion>
|
||||
<Accordion title="DigitalOcean Managed Databases">
|
||||
**Configuration:**
|
||||
|
||||
```bash
|
||||
NEXT_PRIVATE_DATABASE_URL=postgresql://doadmin:[password]@[cluster-host]:25060/hanzo-sign?sslmode=require
|
||||
```
|
||||
|
||||
DigitalOcean uses port 25060 by default and requires SSL.
|
||||
|
||||
</Accordion>
|
||||
</Accordions>
|
||||
|
||||
## Backup Recommendations
|
||||
|
||||
### Backup Strategies
|
||||
|
||||
| Strategy | Frequency | Retention | Use Case |
|
||||
| ---------------------- | ------------ | ----------- | ---------------------- |
|
||||
| Automated snapshots | Daily | 7-30 days | Point-in-time recovery |
|
||||
| Logical backups | Daily/Weekly | 30-90 days | Long-term retention |
|
||||
| Continuous replication | Real-time | 24-72 hours | Disaster recovery |
|
||||
|
||||
### PostgreSQL Backup Commands
|
||||
|
||||
**Create a logical backup:**
|
||||
|
||||
```bash
|
||||
pg_dump -h host -U user -d hanzo-sign -F c -f hanzo-sign_backup.dump
|
||||
```
|
||||
|
||||
**Restore from backup:**
|
||||
|
||||
```bash
|
||||
pg_restore -h host -U user -d hanzo-sign -c hanzo-sign_backup.dump
|
||||
```
|
||||
|
||||
### Managed Service Backups
|
||||
|
||||
Most managed database services provide automated backups:
|
||||
|
||||
<Tabs items={['Supabase', 'Neon', 'AWS RDS', 'Google Cloud SQL', 'Azure']}>
|
||||
<Tab value="Supabase">Daily backups with point-in-time recovery (Pro plan)</Tab>
|
||||
<Tab value="Neon">Automatic branching for instant recovery</Tab>
|
||||
<Tab value="AWS RDS">Automated backups with configurable retention</Tab>
|
||||
<Tab value="Google Cloud SQL">Automated and on-demand backups</Tab>
|
||||
<Tab value="Azure">Automatic backups with geo-redundancy options</Tab>
|
||||
</Tabs>
|
||||
|
||||
<Callout type="warn">
|
||||
Always test your backup restoration process. Untested backups may not work when needed.
|
||||
<Callout type="info">
|
||||
Snapshot the SQLite file before running migrations for a major version
|
||||
upgrade — a file copy is your rollback.
|
||||
</Callout>
|
||||
|
||||
## Performance Tuning
|
||||
## Backups
|
||||
|
||||
### PostgreSQL Configuration
|
||||
Because the database is a single file, backups are file snapshots — no
|
||||
`pg_dump`, no replication topology.
|
||||
|
||||
Key parameters for Hanzo eSign workloads:
|
||||
### File Snapshot
|
||||
|
||||
| Parameter | Recommended Value | Description |
|
||||
| ---------------------- | ----------------- | ------------------------------------- |
|
||||
| `shared_buffers` | 25% of RAM | Memory for caching data |
|
||||
| `effective_cache_size` | 75% of RAM | Planner's estimate of available cache |
|
||||
| `work_mem` | 64MB-256MB | Memory per sort/hash operation |
|
||||
| `maintenance_work_mem` | 512MB-1GB | Memory for maintenance operations |
|
||||
| `max_connections` | 100-200 | Maximum concurrent connections |
|
||||
Stop writes (or accept a crash-consistent copy under WAL) and copy the file:
|
||||
|
||||
### Connection Limits
|
||||
|
||||
Calculate your connection limit:
|
||||
|
||||
```
|
||||
max_connections = (application_instances × connection_pool_size) + admin_overhead
|
||||
```bash
|
||||
# Crash-consistent online copy (includes the WAL):
|
||||
sqlite3 /opt/hanzo-sign/base/data/_dev/sign.db ".backup '/backups/sign-$(date +%F).db'"
|
||||
```
|
||||
|
||||
Example: 3 app instances with pool size 10 = `(3 × 10) + 10 = 40` connections minimum.
|
||||
The `.backup` command produces a consistent copy even while the app is running.
|
||||
A plain `cp` is safe only when the app is stopped.
|
||||
|
||||
### Indexing
|
||||
### Restore
|
||||
|
||||
Hanzo eSign includes necessary indexes by default. Additional indexes may help for:
|
||||
Stop the app, replace the file, restart:
|
||||
|
||||
- Custom reporting queries
|
||||
- High-volume document searches
|
||||
- Audit log analysis
|
||||
|
||||
Check for slow queries:
|
||||
|
||||
```sql
|
||||
SELECT query, calls, mean_time, total_time
|
||||
FROM pg_stat_statements
|
||||
ORDER BY total_time DESC
|
||||
LIMIT 10;
|
||||
```bash
|
||||
cp /backups/sign-2026-06-21.db /opt/hanzo-sign/base/data/_dev/sign.db
|
||||
```
|
||||
|
||||
### Monitoring
|
||||
### Volume Snapshots
|
||||
|
||||
Monitor these metrics:
|
||||
If `BASE_PATH` is on a managed volume (e.g. a cloud block device), the
|
||||
provider's volume snapshots back up the database along with uploaded documents.
|
||||
This is the simplest strategy for production: schedule daily volume snapshots
|
||||
with 7–30 day retention.
|
||||
|
||||
| Metric | Warning Threshold | Action |
|
||||
| -------------------- | ----------------- | ------------------------------- |
|
||||
| Connection usage | > 80% | Increase limits or add pooling |
|
||||
| Disk usage | > 80% | Add storage or archive old data |
|
||||
| Cache hit ratio | < 95% | Increase `shared_buffers` |
|
||||
| Long-running queries | > 30 seconds | Optimize query or add indexes |
|
||||
<Callout type="warn">
|
||||
Always test restoration. An untested backup is not a backup.
|
||||
</Callout>
|
||||
|
||||
## Migrating from PostgreSQL
|
||||
|
||||
If you are upgrading a deployment that previously used PostgreSQL, copy your
|
||||
data into the new SQLite store **before** cutting over — a fresh deploy starts
|
||||
on an empty `sign.db`.
|
||||
|
||||
A backfill script ships with the source tree:
|
||||
|
||||
```bash
|
||||
PG_URL=postgresql://user:password@host:5432/sign \
|
||||
SQLITE_PATH=/opt/hanzo-sign/base/data/_dev/sign.db \
|
||||
MIGRATION_SQL=packages/prisma/migrations/0_init/migration.sql \
|
||||
npx tsx scripts/backfill-pg-to-sqlite.ts --fresh
|
||||
```
|
||||
|
||||
The script is idempotent and resumable: it records per-table progress in a
|
||||
`_backfill_progress` control table, so an interrupted run continues where it
|
||||
left off. It JSON-encodes the array columns to match the SQLite storage format
|
||||
and preserves all ids and foreign keys.
|
||||
|
||||
**Recommended cutover (maintenance window):**
|
||||
|
||||
1. Stop the eSign app (drain in-flight requests).
|
||||
2. Run the backfill against the live PostgreSQL database.
|
||||
3. Set `DATABASE_URL` to the new `file:` path.
|
||||
4. Restart the app on SQLite and verify (sign in, list documents).
|
||||
5. Once verified, decommission PostgreSQL.
|
||||
|
||||
For zero-downtime, run a blue/green cutover: stand up a SQLite-backed instance
|
||||
in parallel, backfill, flip the load balancer, then retire the PostgreSQL
|
||||
instance.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
<Accordions type="multiple">
|
||||
<Accordion title="Connection refused">
|
||||
Causes:
|
||||
- PostgreSQL not running
|
||||
- Incorrect host or port
|
||||
- Firewall blocking
|
||||
|
||||
Solutions:
|
||||
- Verify PostgreSQL is running with `pg_isready -h host -p 5432`
|
||||
- Check the connection string
|
||||
- Verify firewall rules
|
||||
with `pg_isready -h host -p 5432`, check the connection string, verify firewall rules.
|
||||
<Accordion title="SQLITE_BUSY / database is locked">
|
||||
SQLite allows one writer at a time. This is expected under brief contention
|
||||
and resolves on retry. Persistent locking usually means two processes are
|
||||
writing the same file — ensure only ONE app instance owns a given
|
||||
`DATABASE_URL`. Do not point multiple replicas at the same file over a
|
||||
network share.
|
||||
</Accordion>
|
||||
<Accordion title="Authentication failed">
|
||||
Causes:
|
||||
- Incorrect password
|
||||
- User doesn't exist
|
||||
- Password contains special characters
|
||||
|
||||
Solutions:
|
||||
- Reset password with `ALTER USER hanzo-sign WITH PASSWORD 'newpassword';`
|
||||
- Verify credentials in `pg_hba.conf`
|
||||
- Verify URL-encoded special characters
|
||||
<Accordion title="unable to open database file">
|
||||
The directory in `DATABASE_URL` does not exist or is not writable. Ensure
|
||||
`BASE_PATH` is mounted and writable by the app user, and that the path is
|
||||
absolute. The app creates the file but not missing parent directories on
|
||||
some platforms.
|
||||
</Accordion>
|
||||
<Accordion title="SSL connection required">
|
||||
Add SSL mode to your connection string:
|
||||
|
||||
```bash
|
||||
postgresql://user:password@host:5432/hanzo-sign?sslmode=require
|
||||
```
|
||||
|
||||
<Accordion title="Data disappeared after restart">
|
||||
`DATABASE_URL` pointed at ephemeral storage. Move it onto a persistent
|
||||
volume mounted at `BASE_PATH` and restore from your last snapshot.
|
||||
</Accordion>
|
||||
<Accordion title="Too many connections">
|
||||
Causes:
|
||||
- Connection pool exhausted
|
||||
- Connections not released
|
||||
- Multiple instances exceeding limits
|
||||
|
||||
Solutions:
|
||||
- Reduce `connection_limit`
|
||||
- Increase `max_connections`
|
||||
- Implement PgBouncer
|
||||
</Accordion>
|
||||
<Accordion title="Database does not exist">
|
||||
Create the database:
|
||||
|
||||
```sql
|
||||
CREATE DATABASE hanzo-sign;
|
||||
GRANT ALL PRIVILEGES ON DATABASE hanzo-sign TO hanzo-sign;
|
||||
```
|
||||
</Accordion>
|
||||
<Accordion title="Permission denied">
|
||||
Grant permissions:
|
||||
|
||||
```sql
|
||||
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO hanzo-sign;
|
||||
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO hanzo-sign;
|
||||
```
|
||||
<Accordion title="disk I/O error">
|
||||
The persistent volume is full or failing. Check free space on `BASE_PATH`
|
||||
and the volume's health.
|
||||
</Accordion>
|
||||
</Accordions>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ These variables must be set for Hanzo eSign to function:
|
||||
|
||||
| Variable | Description |
|
||||
| --------------------------------------- | ------------------------------------------------------------------------------------------ |
|
||||
| `NEXTAUTH_SECRET` | Secret key for NextAuth.js encryption and signing. Generate with `openssl rand -base64 32` |
|
||||
| `NEXT_PRIVATE_AUTH_SECRET` | Secret key for NextAuth.js encryption and signing. Generate with `openssl rand -base64 32` |
|
||||
| `NEXT_PRIVATE_ENCRYPTION_KEY` | Primary encryption key for symmetric encryption (minimum 32 characters) |
|
||||
| `NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY` | Secondary encryption key for symmetric encryption (minimum 32 characters) |
|
||||
| `NEXT_PUBLIC_WEBAPP_URL` | Public URL of your Hanzo eSign instance (e.g., `https://sign.example.com`) |
|
||||
@@ -53,7 +53,7 @@ For detailed database setup, see [Database Configuration](/docs/self-hosting/con
|
||||
|
||||
| Variable | Required | Description |
|
||||
| --------------------------------------- | -------- | ------------------------------------------------------------------------- |
|
||||
| `NEXTAUTH_SECRET` | Yes | Secret for NextAuth.js session encryption. Must be at least 32 characters |
|
||||
| `NEXT_PRIVATE_AUTH_SECRET` | Yes | Secret for NextAuth.js session encryption. Must be at least 32 characters |
|
||||
| `NEXT_PRIVATE_ENCRYPTION_KEY` | Yes | Primary key for encrypting sensitive data. Must be at least 32 characters |
|
||||
| `NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY` | Yes | Secondary encryption key for key rotation. Must be at least 32 characters |
|
||||
|
||||
@@ -306,7 +306,7 @@ A minimal production configuration:
|
||||
|
||||
```bash
|
||||
# Required
|
||||
NEXTAUTH_SECRET="your-random-secret-at-least-32-chars"
|
||||
NEXT_PRIVATE_AUTH_SECRET="your-random-secret-at-least-32-chars"
|
||||
NEXT_PRIVATE_ENCRYPTION_KEY="your-encryption-key-at-least-32-chars"
|
||||
NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY="your-secondary-key-at-least-32-chars"
|
||||
NEXT_PUBLIC_WEBAPP_URL="https://sign.example.com"
|
||||
|
||||
@@ -124,7 +124,7 @@ POSTGRES_PASSWORD=your-secure-database-password
|
||||
POSTGRES_DB=hanzo-sign
|
||||
|
||||
# Application secrets (generate with: openssl rand -base64 32)
|
||||
NEXTAUTH_SECRET=your-nextauth-secret
|
||||
NEXT_PRIVATE_AUTH_SECRET=your-nextauth-secret
|
||||
NEXT_PRIVATE_ENCRYPTION_KEY=your-encryption-key-min-32-characters
|
||||
NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY=your-secondary-key-min-32-characters
|
||||
|
||||
@@ -167,8 +167,8 @@ For the complete list of environment variables, see [Environment Variables](/doc
|
||||
Generate the required secrets:
|
||||
|
||||
```bash
|
||||
# Generate NEXTAUTH_SECRET
|
||||
echo "NEXTAUTH_SECRET=$(openssl rand -base64 32)"
|
||||
# Generate NEXT_PRIVATE_AUTH_SECRET
|
||||
echo "NEXT_PRIVATE_AUTH_SECRET=$(openssl rand -base64 32)"
|
||||
|
||||
# Generate encryption keys
|
||||
echo "NEXT_PRIVATE_ENCRYPTION_KEY=$(openssl rand -base64 32)"
|
||||
|
||||
@@ -50,7 +50,7 @@ These variables must be set for Hanzo eSign to start:
|
||||
|
||||
| Variable | Description | Default |
|
||||
| --------------------------------------- | --------------------------------------------------------------------------- | ----------------------------- |
|
||||
| `NEXTAUTH_SECRET` | Secret key for session encryption. Generate with `openssl rand -base64 32` | - |
|
||||
| `NEXT_PRIVATE_AUTH_SECRET` | Secret key for session encryption. Generate with `openssl rand -base64 32` | - |
|
||||
| `NEXT_PRIVATE_ENCRYPTION_KEY` | Primary encryption key (minimum 32 characters) | - |
|
||||
| `NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY` | Secondary encryption key (minimum 32 characters) | - |
|
||||
| `NEXT_PUBLIC_WEBAPP_URL` | Public URL where Hanzo eSign is accessible (e.g., `https://sign.example.com`) | - |
|
||||
@@ -113,7 +113,7 @@ docker run -d \
|
||||
--name hanzo-sign \
|
||||
-p 3000:3000 \
|
||||
-v /path/to/cert.p12:/opt/hanzo-sign/cert.p12:ro \
|
||||
-e NEXTAUTH_SECRET="$(openssl rand -base64 32)" \
|
||||
-e NEXT_PRIVATE_AUTH_SECRET="$(openssl rand -base64 32)" \
|
||||
-e NEXT_PRIVATE_ENCRYPTION_KEY="your-encryption-key-min-32-chars" \
|
||||
-e NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY="your-secondary-key-min-32-chars" \
|
||||
-e NEXT_PUBLIC_WEBAPP_URL="https://sign.example.com" \
|
||||
@@ -154,7 +154,7 @@ For easier management, use an environment file:
|
||||
Create `.env`:
|
||||
|
||||
```bash
|
||||
NEXTAUTH_SECRET=your-secret-here
|
||||
NEXT_PRIVATE_AUTH_SECRET=your-secret-here
|
||||
NEXT_PRIVATE_ENCRYPTION_KEY=your-encryption-key-min-32-chars
|
||||
NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY=your-secondary-key-min-32-chars
|
||||
NEXT_PUBLIC_WEBAPP_URL=https://sign.example.com
|
||||
|
||||
@@ -68,7 +68,7 @@ Store sensitive configuration in Kubernetes Secrets.
|
||||
First, generate the required secret values:
|
||||
|
||||
```bash
|
||||
# Generate NEXTAUTH_SECRET
|
||||
# Generate NEXT_PRIVATE_AUTH_SECRET
|
||||
openssl rand -base64 32
|
||||
|
||||
# Generate encryption keys (minimum 32 characters each)
|
||||
@@ -89,7 +89,7 @@ metadata:
|
||||
app.kubernetes.io/name: hanzo-sign
|
||||
type: Opaque
|
||||
stringData:
|
||||
NEXTAUTH_SECRET: 'your-generated-secret-here'
|
||||
NEXT_PRIVATE_AUTH_SECRET: 'your-generated-secret-here'
|
||||
NEXT_PRIVATE_ENCRYPTION_KEY: 'your-encryption-key-min-32-chars'
|
||||
NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY: 'your-secondary-key-min-32-chars'
|
||||
NEXT_PRIVATE_DATABASE_URL: 'postgresql://user:password@postgres-host:5432/hanzo-sign'
|
||||
@@ -709,7 +709,7 @@ metadata:
|
||||
namespace: hanzo-sign
|
||||
type: Opaque
|
||||
stringData:
|
||||
NEXTAUTH_SECRET: 'REPLACE_WITH_GENERATED_SECRET'
|
||||
NEXT_PRIVATE_AUTH_SECRET: 'REPLACE_WITH_GENERATED_SECRET'
|
||||
NEXT_PRIVATE_ENCRYPTION_KEY: 'REPLACE_WITH_32_CHAR_KEY'
|
||||
NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY: 'REPLACE_WITH_32_CHAR_KEY'
|
||||
NEXT_PRIVATE_DATABASE_URL: 'postgresql://user:password@host:5432/hanzo-sign'
|
||||
|
||||
@@ -45,7 +45,7 @@ cp .env.example .env
|
||||
Open the `.env` file and configure the required variables:
|
||||
|
||||
```bash
|
||||
NEXTAUTH_SECRET="your-secret-here"
|
||||
NEXT_PRIVATE_AUTH_SECRET="your-secret-here"
|
||||
NEXT_PRIVATE_ENCRYPTION_KEY="your-encryption-key-min-32-chars"
|
||||
NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY="your-secondary-key-min-32-chars"
|
||||
NEXT_PUBLIC_WEBAPP_URL="https://your-domain.com"
|
||||
|
||||
@@ -56,7 +56,7 @@ Railway will prompt you to configure required variables. At minimum, set:
|
||||
| `NEXT_PRIVATE_SMTP_FROM_ADDRESS` | Sender email address |
|
||||
| `NEXT_PRIVATE_SMTP_FROM_NAME` | Sender display name |
|
||||
|
||||
The template automatically generates secure values for `NEXTAUTH_SECRET`, `NEXT_PRIVATE_ENCRYPTION_KEY`, and `NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY`.
|
||||
The template automatically generates secure values for `NEXT_PRIVATE_AUTH_SECRET`, `NEXT_PRIVATE_ENCRYPTION_KEY`, and `NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY`.
|
||||
|
||||
</Step>
|
||||
|
||||
@@ -129,7 +129,7 @@ Click on the Hanzo eSign service and go to the "Variables" tab. Add the followin
|
||||
**Required variables:**
|
||||
|
||||
```bash
|
||||
NEXTAUTH_SECRET=<generate with: openssl rand -base64 32>
|
||||
NEXT_PRIVATE_AUTH_SECRET=<generate with: openssl rand -base64 32>
|
||||
NEXT_PRIVATE_ENCRYPTION_KEY=<minimum 32 character random string>
|
||||
NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY=<minimum 32 character random string>
|
||||
NEXT_PUBLIC_WEBAPP_URL=https://<your-railway-url>.up.railway.app
|
||||
|
||||
@@ -11,20 +11,23 @@ Hanzo eSign requires the following external services:
|
||||
|
||||
| Service | Purpose | Minimum Version |
|
||||
| ------------- | ---------------------------- | --------------- |
|
||||
| PostgreSQL | Primary database | 14+ |
|
||||
| SMTP server | Sending emails to recipients | Any |
|
||||
| Reverse proxy | SSL termination, routing | Any |
|
||||
|
||||
### PostgreSQL Database
|
||||
The database is **embedded** — there is no external database server to run.
|
||||
|
||||
Hanzo eSign uses PostgreSQL for all data storage including documents, users, and audit logs. You cannot use MySQL, SQLite, or other databases.
|
||||
### Database (embedded Base SQLite)
|
||||
|
||||
Hanzo eSign requires two connection strings:
|
||||
Hanzo eSign stores all data — documents, users, audit logs — in an embedded
|
||||
SQLite database (Hanzo Base) on its persistent disk. There is no PostgreSQL,
|
||||
MySQL, or other database server to provision. The only configuration is where
|
||||
the file lives:
|
||||
|
||||
- **Pooled connection** (`NEXT_PRIVATE_DATABASE_URL`) - For general application queries
|
||||
- **Direct connection** (`NEXT_PRIVATE_DIRECT_DATABASE_URL`) - For migrations and operations that require a direct connection
|
||||
- `BASE_PATH` — directory root on the persistent disk (e.g. `/opt/hanzo-sign/base/data`).
|
||||
- `DATABASE_URL` — the `file:` URL, defaulting to a file under `BASE_PATH`.
|
||||
|
||||
If you're not using a connection pooler (like PgBouncer), both can point to the same database URL.
|
||||
See [Database Configuration](/docs/self-hosting/configuration/database) for
|
||||
details and for migrating an existing PostgreSQL deployment.
|
||||
|
||||
### Email Server
|
||||
|
||||
@@ -73,7 +76,7 @@ These services are not required but improve functionality or scalability:
|
||||
|
||||
### Document Storage
|
||||
|
||||
By default, Hanzo eSign stores documents in the PostgreSQL database. For production deployments with significant document volume, use S3-compatible storage:
|
||||
By default, Hanzo eSign stores documents in the embedded Base SQLite database. For production deployments with significant document volume, use S3-compatible storage:
|
||||
|
||||
- Amazon S3
|
||||
- MinIO
|
||||
@@ -85,7 +88,7 @@ See [Storage Configuration](/docs/self-hosting/configuration/storage) for setup
|
||||
|
||||
### Background Jobs
|
||||
|
||||
Hanzo eSign processes background jobs (email delivery, document processing) using a PostgreSQL-based queue. No additional services like Redis are required: the job queue is built into the application and uses your existing database.
|
||||
Hanzo eSign processes background jobs (email delivery, document processing) using a database-backed queue. No additional services like Redis are required: the job queue is built into the application and uses the embedded Base SQLite database.
|
||||
|
||||
For high-throughput deployments, Hanzo eSign optionally supports [Inngest](https://www.inngest.com/) as an alternative job provider. Set `NEXT_PRIVATE_JOBS_PROVIDER=inngest` and configure `INNGEST_EVENT_KEY` and `INNGEST_SIGNING_KEY`. Most self-hosted instances do not need this.
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ Choose a deployment method based on your needs:
|
||||
<Cards>
|
||||
<Card
|
||||
title="Docker"
|
||||
description="Single container with external database."
|
||||
description="Single container with an embedded database."
|
||||
href="/docs/self-hosting/deployment/docker"
|
||||
/>
|
||||
<Card
|
||||
@@ -59,7 +59,7 @@ Choose a deployment method based on your needs:
|
||||
/>
|
||||
<Card
|
||||
title="Database"
|
||||
description="PostgreSQL setup and connection."
|
||||
description="Embedded Base SQLite — storage, backups, migration."
|
||||
href="/docs/self-hosting/configuration/database"
|
||||
/>
|
||||
<Card
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@hanzo/sign-docs",
|
||||
"name": "@hanzo/esign-docs",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
@@ -1 +1 @@
|
||||
# @hanzo/sign-openpage-api
|
||||
# @hanzo/esign-openpage-api
|
||||
|
||||
@@ -1,32 +1,37 @@
|
||||
import { DocumentStatus, EnvelopeType } from '@prisma/client';
|
||||
import { DateTime } from 'luxon';
|
||||
|
||||
import { kyselyPrisma, sql } from '@hanzo/sign-prisma';
|
||||
import { kyselyPrisma, monthTrunc, sql } from '@hanzo/esign-prisma';
|
||||
|
||||
import { addZeroMonth } from '../add-zero-month';
|
||||
|
||||
export const getCompletedDocumentsMonthly = async (type: 'count' | 'cumulative' = 'count') => {
|
||||
// SQLite month truncation (epoch-ms DateTime → YYYY-MM-01 via strftime).
|
||||
const monthExpr = monthTrunc('Envelope.updatedAt');
|
||||
|
||||
const qb = kyselyPrisma.$kysely
|
||||
.selectFrom('Envelope')
|
||||
.select(({ fn }) => [
|
||||
fn<Date>('DATE_TRUNC', [sql.lit('MONTH'), 'Envelope.updatedAt']).as('month'),
|
||||
monthExpr.as('month'),
|
||||
fn.count('id').as('count'),
|
||||
fn
|
||||
.sum(fn.count('id'))
|
||||
// Feels like a bug in the Kysely extension but I just can not do this orderBy in a type-safe manner
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions, @typescript-eslint/no-explicit-any
|
||||
.over((ob) => ob.orderBy(fn('DATE_TRUNC', [sql.lit('MONTH'), 'Envelope.updatedAt']) as any))
|
||||
.over((ob) => ob.orderBy(monthExpr as any))
|
||||
.as('cume_count'),
|
||||
])
|
||||
.where(() => sql`"Envelope"."status" = ${DocumentStatus.COMPLETED}::"DocumentStatus"`)
|
||||
.where(() => sql`"Envelope"."type" = ${EnvelopeType.DOCUMENT}::"EnvelopeType"`)
|
||||
.where('Envelope.status', '=', sql.lit(DocumentStatus.COMPLETED))
|
||||
.where('Envelope.type', '=', sql.lit(EnvelopeType.DOCUMENT))
|
||||
.groupBy('month')
|
||||
.orderBy('month', 'desc');
|
||||
|
||||
const result = await qb.execute();
|
||||
|
||||
const transformedData = {
|
||||
labels: result.map((row) => DateTime.fromJSDate(row.month).toFormat('MMM yyyy')).reverse(),
|
||||
labels: result
|
||||
.map((row) => DateTime.fromFormat(row.month, 'yyyy-MM-dd').toFormat('MMM yyyy'))
|
||||
.reverse(),
|
||||
datasets: [
|
||||
{
|
||||
label: type === 'count' ? 'Completed Documents per Month' : 'Total Completed Documents',
|
||||
|
||||
@@ -1,31 +1,36 @@
|
||||
import { DateTime } from 'luxon';
|
||||
|
||||
import { kyselyPrisma, sql } from '@hanzo/sign-prisma';
|
||||
import { kyselyPrisma, monthTrunc } from '@hanzo/esign-prisma';
|
||||
|
||||
import { addZeroMonth } from '../add-zero-month';
|
||||
|
||||
export const getSignerConversionMonthly = async (type: 'count' | 'cumulative' = 'count') => {
|
||||
// SQLite month truncation (epoch-ms DateTime → YYYY-MM-01 via strftime).
|
||||
const monthExpr = monthTrunc('User.createdAt');
|
||||
|
||||
const qb = kyselyPrisma.$kysely
|
||||
.selectFrom('Recipient')
|
||||
.innerJoin('User', 'Recipient.email', 'User.email')
|
||||
.select(({ fn }) => [
|
||||
fn<Date>('DATE_TRUNC', [sql.lit('MONTH'), 'User.createdAt']).as('month'),
|
||||
monthExpr.as('month'),
|
||||
fn.count('Recipient.email').distinct().as('count'),
|
||||
fn
|
||||
.sum(fn.count('Recipient.email').distinct())
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions, @typescript-eslint/no-explicit-any
|
||||
.over((ob) => ob.orderBy(fn('DATE_TRUNC', [sql.lit('MONTH'), 'User.createdAt']) as any))
|
||||
.over((ob) => ob.orderBy(monthExpr as any))
|
||||
.as('cume_count'),
|
||||
])
|
||||
.where('Recipient.signedAt', 'is not', null)
|
||||
.where('Recipient.signedAt', '<', (eb) => eb.ref('User.createdAt'))
|
||||
.groupBy(({ fn }) => fn('DATE_TRUNC', [sql.lit('MONTH'), 'User.createdAt']))
|
||||
.groupBy(monthExpr)
|
||||
.orderBy('month', 'desc');
|
||||
|
||||
const result = await qb.execute();
|
||||
|
||||
const transformedData = {
|
||||
labels: result.map((row) => DateTime.fromJSDate(row.month).toFormat('MMM yyyy')).reverse(),
|
||||
labels: result
|
||||
.map((row) => DateTime.fromFormat(row.month, 'yyyy-MM-dd').toFormat('MMM yyyy'))
|
||||
.reverse(),
|
||||
datasets: [
|
||||
{
|
||||
label: type === 'count' ? 'Signers That Signed Up' : 'Total Signers That Signed Up',
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
import { DateTime } from 'luxon';
|
||||
|
||||
import { kyselyPrisma, sql } from '@hanzo/sign-prisma';
|
||||
import { kyselyPrisma, monthTrunc } from '@hanzo/esign-prisma';
|
||||
|
||||
import { addZeroMonth } from '../add-zero-month';
|
||||
|
||||
export const getUserMonthlyGrowth = async (type: 'count' | 'cumulative' = 'count') => {
|
||||
// SQLite month truncation (epoch-ms DateTime → YYYY-MM-01 via strftime).
|
||||
const monthExpr = monthTrunc('User.createdAt');
|
||||
|
||||
const qb = kyselyPrisma.$kysely
|
||||
.selectFrom('User')
|
||||
.select(({ fn }) => [
|
||||
fn<Date>('DATE_TRUNC', [sql.lit('MONTH'), 'User.createdAt']).as('month'),
|
||||
monthExpr.as('month'),
|
||||
fn.count('id').as('count'),
|
||||
fn
|
||||
.sum(fn.count('id'))
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions, @typescript-eslint/no-explicit-any
|
||||
.over((ob) => ob.orderBy(fn('DATE_TRUNC', [sql.lit('MONTH'), 'User.createdAt']) as any))
|
||||
.over((ob) => ob.orderBy(monthExpr as any))
|
||||
.as('cume_count'),
|
||||
])
|
||||
.groupBy('month')
|
||||
@@ -22,7 +25,9 @@ export const getUserMonthlyGrowth = async (type: 'count' | 'cumulative' = 'count
|
||||
const result = await qb.execute();
|
||||
|
||||
const transformedData = {
|
||||
labels: result.map((row) => DateTime.fromJSDate(row.month).toFormat('MMM yyyy')).reverse(),
|
||||
labels: result
|
||||
.map((row) => DateTime.fromFormat(row.month, 'yyyy-MM-dd').toFormat('MMM yyyy'))
|
||||
.reverse(),
|
||||
datasets: [
|
||||
{
|
||||
label: type === 'count' ? 'New Users' : 'Total Users',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@hanzo/sign-openpage-api",
|
||||
"name": "@hanzo/esign-openpage-api",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
@@ -10,7 +10,7 @@
|
||||
"clean": "rimraf .next && rimraf node_modules"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hanzo/sign-prisma": "*",
|
||||
"@hanzo/esign-prisma": "*",
|
||||
"luxon": "^3.7.2",
|
||||
"next": "15.5.12"
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@import '@hanzo/sign-ui/styles/theme.css';
|
||||
@import '@hanzo/esign-ui/styles/theme.css';
|
||||
|
||||
/* Inter Variable Fonts */
|
||||
@font-face {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
// NEXT_PUBLIC_APP_NAME so tenants can drop in their own brand without
|
||||
// forking the component.
|
||||
|
||||
import { cn } from '@hanzo/sign-ui/lib/utils';
|
||||
import { cn } from '@hanzo/esign-ui/lib/utils';
|
||||
import type { SVGProps } from 'react';
|
||||
|
||||
export type HanzoMarkProps = SVGProps<SVGSVGElement> & {
|
||||
|
||||
@@ -4,11 +4,11 @@ import { msg } from '@lingui/core/macro';
|
||||
import { useLingui } from '@lingui/react';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
|
||||
import { authClient } from '@hanzo/sign-auth/client';
|
||||
import { useSession } from '@hanzo/sign-lib/client-only/providers/session';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Alert, AlertDescription, AlertTitle } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { authClient } from '@hanzo/esign-auth/client';
|
||||
import { useSession } from '@hanzo/esign-lib/client-only/providers/session';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Alert, AlertDescription, AlertTitle } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -17,10 +17,10 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { Label } from '@hanzo/sign-ui/primitives/label';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { Label } from '@hanzo/esign-ui/primitives/label';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type AccountDeleteDialogProps = {
|
||||
className?: string;
|
||||
|
||||
@@ -5,13 +5,13 @@ import { useLingui } from '@lingui/react';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import { useNavigate } from 'react-router';
|
||||
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import type {
|
||||
TDeleteDocumentRequest,
|
||||
TDeleteDocumentResponse,
|
||||
} from '@hanzo/sign-trpc/server/admin-router/delete-document.types';
|
||||
import { Alert, AlertDescription, AlertTitle } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
} from '@hanzo/esign-trpc/server/admin-router/delete-document.types';
|
||||
import { Alert, AlertDescription, AlertTitle } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -20,9 +20,9 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type AdminDocumentDeleteDialogProps = {
|
||||
envelopeId: string;
|
||||
|
||||
@@ -8,12 +8,12 @@ import { useForm } from 'react-hook-form';
|
||||
import { useNavigate } from 'react-router';
|
||||
import type { z } from 'zod';
|
||||
|
||||
import { AppError } from '@hanzo/sign-lib/errors/app-error';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import type { TCreateAdminOrganisationRequest } from '@hanzo/sign-trpc/server/admin-router/create-admin-organisation.types';
|
||||
import { ZCreateAdminOrganisationRequestSchema } from '@hanzo/sign-trpc/server/admin-router/create-admin-organisation.types';
|
||||
import { Alert, AlertDescription } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { AppError } from '@hanzo/esign-lib/errors/app-error';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import type { TCreateAdminOrganisationRequest } from '@hanzo/esign-trpc/server/admin-router/create-admin-organisation.types';
|
||||
import { ZCreateAdminOrganisationRequestSchema } from '@hanzo/esign-trpc/server/admin-router/create-admin-organisation.types';
|
||||
import { Alert, AlertDescription } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -30,9 +30,9 @@ import {
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type OrganisationCreateDialogProps = {
|
||||
trigger?: React.ReactNode;
|
||||
|
||||
@@ -10,14 +10,14 @@ import { useNavigate } from 'react-router';
|
||||
import { match } from 'ts-pattern';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { getHighestOrganisationRoleInGroup } from '@hanzo/sign-lib/utils/organisations';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import type { TGetAdminOrganisationResponse } from '@hanzo/sign-trpc/server/admin-router/get-admin-organisation.types';
|
||||
import { getHighestOrganisationRoleInGroup } from '@hanzo/esign-lib/utils/organisations';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import type { TGetAdminOrganisationResponse } from '@hanzo/esign-trpc/server/admin-router/get-admin-organisation.types';
|
||||
import type {
|
||||
TUpdateOrganisationMemberRoleRequest,
|
||||
TUpdateOrganisationMemberRoleResponse,
|
||||
} from '@hanzo/sign-trpc/server/admin-router/update-organisation-member-role.types';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
} from '@hanzo/esign-trpc/server/admin-router/update-organisation-member-role.types';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -34,15 +34,15 @@ import {
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from '@hanzo/sign-ui/primitives/select';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/select';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type AdminOrganisationMemberUpdateDialogProps = {
|
||||
trigger?: React.ReactNode;
|
||||
|
||||
@@ -3,15 +3,15 @@ import { useEffect, useMemo, useState } from 'react';
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
|
||||
import { AppError } from '@hanzo/sign-lib/errors/app-error';
|
||||
import { useZapMutation, useZapQuery, useZapUtils } from '@hanzo/sign-trpc/zap/react';
|
||||
import type { TFindAdminOrganisationsResponse } from '@hanzo/sign-trpc/server/admin-router/find-admin-organisations.types';
|
||||
import { AppError } from '@hanzo/esign-lib/errors/app-error';
|
||||
import { useZapMutation, useZapQuery, useZapUtils } from '@hanzo/esign-trpc/zap/react';
|
||||
import type { TFindAdminOrganisationsResponse } from '@hanzo/esign-trpc/server/admin-router/find-admin-organisations.types';
|
||||
import type {
|
||||
TSwapOrganisationSubscriptionRequest,
|
||||
TSwapOrganisationSubscriptionResponse,
|
||||
} from '@hanzo/sign-trpc/server/admin-router/swap-organisation-subscription.types';
|
||||
import { Alert, AlertDescription } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
} from '@hanzo/esign-trpc/server/admin-router/swap-organisation-subscription.types';
|
||||
import { Alert, AlertDescription } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -19,15 +19,15 @@ import {
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from '@hanzo/sign-ui/primitives/select';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/select';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type AdminSwapSubscriptionDialogProps = {
|
||||
open: boolean;
|
||||
|
||||
@@ -6,15 +6,15 @@ import { Trans } from '@lingui/react/macro';
|
||||
import { useNavigate } from 'react-router';
|
||||
import { match } from 'ts-pattern';
|
||||
|
||||
import { AppError, AppErrorCode } from '@hanzo/sign-lib/errors/app-error';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { AppError, AppErrorCode } from '@hanzo/esign-lib/errors/app-error';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import type {
|
||||
TDeleteUserRequest,
|
||||
TDeleteUserResponse,
|
||||
} from '@hanzo/sign-trpc/server/admin-router/delete-user.types';
|
||||
import type { TGetUserResponse } from '@hanzo/sign-trpc/server/admin-router/get-user.types';
|
||||
import { Alert, AlertDescription, AlertTitle } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
} from '@hanzo/esign-trpc/server/admin-router/delete-user.types';
|
||||
import type { TGetUserResponse } from '@hanzo/esign-trpc/server/admin-router/get-user.types';
|
||||
import { Alert, AlertDescription, AlertTitle } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -23,9 +23,9 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type AdminUserDeleteDialogProps = {
|
||||
className?: string;
|
||||
|
||||
@@ -5,15 +5,15 @@ import { useLingui } from '@lingui/react';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import { match } from 'ts-pattern';
|
||||
|
||||
import { AppError, AppErrorCode } from '@hanzo/sign-lib/errors/app-error';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { AppError, AppErrorCode } from '@hanzo/esign-lib/errors/app-error';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import type {
|
||||
TDisableUserRequest,
|
||||
TDisableUserResponse,
|
||||
} from '@hanzo/sign-trpc/server/admin-router/disable-user.types';
|
||||
import type { TGetUserResponse } from '@hanzo/sign-trpc/server/admin-router/get-user.types';
|
||||
import { Alert, AlertDescription, AlertTitle } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
} from '@hanzo/esign-trpc/server/admin-router/disable-user.types';
|
||||
import type { TGetUserResponse } from '@hanzo/esign-trpc/server/admin-router/get-user.types';
|
||||
import { Alert, AlertDescription, AlertTitle } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -22,9 +22,9 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type AdminUserDisableDialogProps = {
|
||||
className?: string;
|
||||
|
||||
@@ -5,15 +5,15 @@ import { useLingui } from '@lingui/react';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import { match } from 'ts-pattern';
|
||||
|
||||
import { AppError, AppErrorCode } from '@hanzo/sign-lib/errors/app-error';
|
||||
import { AppError, AppErrorCode } from '@hanzo/esign-lib/errors/app-error';
|
||||
import type {
|
||||
TEnableUserRequest,
|
||||
TEnableUserResponse,
|
||||
} from '@hanzo/sign-trpc/server/admin-router/enable-user.types';
|
||||
import type { TGetUserResponse } from '@hanzo/sign-trpc/server/admin-router/get-user.types';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Alert, AlertDescription, AlertTitle } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
} from '@hanzo/esign-trpc/server/admin-router/enable-user.types';
|
||||
import type { TGetUserResponse } from '@hanzo/esign-trpc/server/admin-router/get-user.types';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Alert, AlertDescription, AlertTitle } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -22,9 +22,9 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type AdminUserEnableDialogProps = {
|
||||
className?: string;
|
||||
|
||||
@@ -6,15 +6,15 @@ import { Trans } from '@lingui/react/macro';
|
||||
import { useRevalidator } from 'react-router';
|
||||
import { match } from 'ts-pattern';
|
||||
|
||||
import { AppError, AppErrorCode } from '@hanzo/sign-lib/errors/app-error';
|
||||
import type { TGetUserResponse } from '@hanzo/sign-trpc/server/admin-router/get-user.types';
|
||||
import { AppError, AppErrorCode } from '@hanzo/esign-lib/errors/app-error';
|
||||
import type { TGetUserResponse } from '@hanzo/esign-trpc/server/admin-router/get-user.types';
|
||||
import type {
|
||||
TResetTwoFactorRequest,
|
||||
TResetTwoFactorResponse,
|
||||
} from '@hanzo/sign-trpc/server/admin-router/reset-two-factor-authentication.types';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Alert, AlertDescription, AlertTitle } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
} from '@hanzo/esign-trpc/server/admin-router/reset-two-factor-authentication.types';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Alert, AlertDescription, AlertTitle } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -23,9 +23,9 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type AdminUserResetTwoFactorDialogProps = {
|
||||
className?: string;
|
||||
|
||||
@@ -4,17 +4,17 @@ import { useLingui } from '@lingui/react/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import { OrganisationMemberRole, TeamMemberRole } from '@prisma/client';
|
||||
|
||||
import { useCurrentOrganisation } from '@hanzo/sign-lib/client-only/providers/organisation';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Alert, AlertDescription } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { useCurrentOrganisation } from '@hanzo/esign-lib/client-only/providers/organisation';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Alert, AlertDescription } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
|
||||
import { useCurrentTeam } from '~/providers/team';
|
||||
|
||||
|
||||
@@ -6,18 +6,18 @@ import { useLingui } from '@lingui/react';
|
||||
import { Plural, Trans } from '@lingui/react/macro';
|
||||
import { CheckIcon, FormInputIcon, ShieldCheckIcon } from 'lucide-react';
|
||||
|
||||
import type { NormalizedFieldWithContext } from '@hanzo/sign-lib/server-only/ai/envelope/detect-fields/types';
|
||||
import { Alert, AlertDescription } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import type { NormalizedFieldWithContext } from '@hanzo/esign-lib/server-only/ai/envelope/detect-fields/types';
|
||||
import { Alert, AlertDescription } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { Label } from '@hanzo/sign-ui/primitives/label';
|
||||
import { Textarea } from '@hanzo/sign-ui/primitives/textarea';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { Label } from '@hanzo/esign-ui/primitives/label';
|
||||
import { Textarea } from '@hanzo/esign-ui/primitives/textarea';
|
||||
|
||||
import {
|
||||
AiApiError,
|
||||
|
||||
@@ -5,18 +5,18 @@ import { useLingui } from '@lingui/react';
|
||||
import { Plural, Trans } from '@lingui/react/macro';
|
||||
import { CheckIcon, ShieldCheckIcon, UserIcon, XIcon } from 'lucide-react';
|
||||
|
||||
import { RECIPIENT_ROLES_DESCRIPTION } from '@hanzo/sign-lib/constants/recipient-roles';
|
||||
import type { TDetectedRecipientSchema } from '@hanzo/sign-lib/server-only/ai/envelope/detect-recipients/schema';
|
||||
import { Alert, AlertDescription } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { AvatarWithText } from '@hanzo/sign-ui/primitives/avatar';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { RECIPIENT_ROLES_DESCRIPTION } from '@hanzo/esign-lib/constants/recipient-roles';
|
||||
import type { TDetectedRecipientSchema } from '@hanzo/esign-lib/server-only/ai/envelope/detect-recipients/schema';
|
||||
import { Alert, AlertDescription } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { AvatarWithText } from '@hanzo/esign-ui/primitives/avatar';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
|
||||
import {
|
||||
AiApiError,
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Trans, useLingui } from '@lingui/react/macro';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -21,8 +21,8 @@ import {
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
|
||||
import { DocumentSigningDisclosure } from '../general/document-signing/document-signing-disclosure';
|
||||
|
||||
|
||||
@@ -3,14 +3,14 @@ import { useState } from 'react';
|
||||
import { Trans, useLingui } from '@lingui/react/macro';
|
||||
import type { z } from 'zod';
|
||||
|
||||
import type { TLicenseClaim } from '@hanzo/sign-lib/types/license';
|
||||
import { generateDefaultSubscriptionClaim } from '@hanzo/sign-lib/utils/organisations-claims';
|
||||
import type { TLicenseClaim } from '@hanzo/esign-lib/types/license';
|
||||
import { generateDefaultSubscriptionClaim } from '@hanzo/esign-lib/utils/organisations-claims';
|
||||
import type {
|
||||
TCreateSubscriptionClaimRequest,
|
||||
ZCreateSubscriptionClaimRequestSchema,
|
||||
} from '@hanzo/sign-trpc/server/admin-router/create-subscription-claim.types';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
} from '@hanzo/esign-trpc/server/admin-router/create-subscription-claim.types';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -19,8 +19,8 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
import { SubscriptionClaimForm } from '../forms/subscription-claim-form';
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@ import { useState } from 'react';
|
||||
|
||||
import { Trans, useLingui } from '@lingui/react/macro';
|
||||
|
||||
import type { TDeleteSubscriptionClaimRequest } from '@hanzo/sign-trpc/server/admin-router/delete-subscription-claim.types';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Alert, AlertDescription } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import type { TDeleteSubscriptionClaimRequest } from '@hanzo/esign-trpc/server/admin-router/delete-subscription-claim.types';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Alert, AlertDescription } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -14,8 +14,8 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type ClaimDeleteDialogProps = {
|
||||
claimId: string;
|
||||
|
||||
@@ -2,11 +2,11 @@ import { useState } from 'react';
|
||||
|
||||
import { Trans, useLingui } from '@lingui/react/macro';
|
||||
|
||||
import type { TLicenseClaim } from '@hanzo/sign-lib/types/license';
|
||||
import type { TFindSubscriptionClaimsResponse } from '@hanzo/sign-trpc/server/admin-router/find-subscription-claims.types';
|
||||
import type { TUpdateSubscriptionClaimRequest } from '@hanzo/sign-trpc/server/admin-router/update-subscription-claim.types';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import type { TLicenseClaim } from '@hanzo/esign-lib/types/license';
|
||||
import type { TFindSubscriptionClaimsResponse } from '@hanzo/esign-trpc/server/admin-router/find-subscription-claims.types';
|
||||
import type { TUpdateSubscriptionClaimRequest } from '@hanzo/esign-trpc/server/admin-router/update-subscription-claim.types';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -15,8 +15,8 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
import { SubscriptionClaimForm } from '../forms/subscription-claim-form';
|
||||
|
||||
|
||||
@@ -6,14 +6,14 @@ import { Trans } from '@lingui/react/macro';
|
||||
import { DocumentStatus } from '@prisma/client';
|
||||
import { P, match } from 'ts-pattern';
|
||||
|
||||
import { useLimits } from '@hanzo/sign-lib/server-only/limits/provider/client';
|
||||
import { useLimits } from '@hanzo/esign-lib/server-only/limits/provider/client';
|
||||
import type {
|
||||
TDeleteDocumentRequest,
|
||||
TDeleteDocumentResponse,
|
||||
} from '@hanzo/sign-trpc/server/document-router/delete-document.types';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Alert, AlertDescription } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
} from '@hanzo/esign-trpc/server/document-router/delete-document.types';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Alert, AlertDescription } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -21,9 +21,9 @@ import {
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
type DocumentDeleteDialogProps = {
|
||||
id: number;
|
||||
|
||||
@@ -3,21 +3,21 @@ import { useLingui } from '@lingui/react';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import { useNavigate } from 'react-router';
|
||||
|
||||
import { formatDocumentsPath } from '@hanzo/sign-lib/utils/teams';
|
||||
import { formatDocumentsPath } from '@hanzo/esign-lib/utils/teams';
|
||||
import type {
|
||||
TDuplicateEnvelopeRequest,
|
||||
TDuplicateEnvelopeResponse,
|
||||
} from '@hanzo/sign-trpc/server/envelope-router/duplicate-envelope.types';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
} from '@hanzo/esign-trpc/server/envelope-router/duplicate-envelope.types';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
import { useCurrentTeam } from '~/providers/team';
|
||||
|
||||
|
||||
@@ -10,12 +10,12 @@ import { useForm } from 'react-hook-form';
|
||||
import { useNavigate } from 'react-router';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { AppError, AppErrorCode } from '@hanzo/sign-lib/errors/app-error';
|
||||
import { FolderType } from '@hanzo/sign-lib/types/folder-type';
|
||||
import { formatDocumentsPath } from '@hanzo/sign-lib/utils/teams';
|
||||
import type { TFolderWithSubfolders } from '@hanzo/sign-trpc/server/folder-router/schema';
|
||||
import { useZapMutation, useZapQuery } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { AppError, AppErrorCode } from '@hanzo/esign-lib/errors/app-error';
|
||||
import { FolderType } from '@hanzo/esign-lib/types/folder-type';
|
||||
import { formatDocumentsPath } from '@hanzo/esign-lib/utils/teams';
|
||||
import type { TFolderWithSubfolders } from '@hanzo/esign-trpc/server/folder-router/schema';
|
||||
import { useZapMutation, useZapQuery } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -31,9 +31,9 @@ import {
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
import { useCurrentTeam } from '~/providers/team';
|
||||
|
||||
|
||||
@@ -9,18 +9,18 @@ import { History } from 'lucide-react';
|
||||
import { useForm, useWatch } from 'react-hook-form';
|
||||
import * as z from 'zod';
|
||||
|
||||
import { useSession } from '@hanzo/sign-lib/client-only/providers/session';
|
||||
import { getRecipientType } from '@hanzo/sign-lib/client-only/recipient-type';
|
||||
import { recipientAbbreviation } from '@hanzo/sign-lib/utils/recipient-formatter';
|
||||
import type { Document } from '@hanzo/sign-prisma/types/document-legacy-schema';
|
||||
import { useSession } from '@hanzo/esign-lib/client-only/providers/session';
|
||||
import { getRecipientType } from '@hanzo/esign-lib/client-only/recipient-type';
|
||||
import { recipientAbbreviation } from '@hanzo/esign-lib/utils/recipient-formatter';
|
||||
import type { Document } from '@hanzo/esign-prisma/types/document-legacy-schema';
|
||||
import type {
|
||||
TRedistributeDocumentRequest,
|
||||
TRedistributeDocumentResponse,
|
||||
} from '@hanzo/sign-trpc/server/document-router/redistribute-document.types';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { cn } from '@hanzo/sign-ui/lib/utils';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { Checkbox } from '@hanzo/sign-ui/primitives/checkbox';
|
||||
} from '@hanzo/esign-trpc/server/document-router/redistribute-document.types';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { cn } from '@hanzo/esign-ui/lib/utils';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import { Checkbox } from '@hanzo/esign-ui/primitives/checkbox';
|
||||
import {
|
||||
Dialog,
|
||||
DialogClose,
|
||||
@@ -29,16 +29,16 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { DropdownMenuItem } from '@hanzo/sign-ui/primitives/dropdown-menu';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { DropdownMenuItem } from '@hanzo/esign-ui/primitives/dropdown-menu';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormLabel,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
import { useCurrentTeam } from '~/providers/team';
|
||||
|
||||
|
||||
@@ -6,14 +6,14 @@ import { Trans } from '@lingui/react/macro';
|
||||
import { DocumentStatus, EnvelopeType } from '@prisma/client';
|
||||
import { P, match } from 'ts-pattern';
|
||||
|
||||
import { useLimits } from '@hanzo/sign-lib/server-only/limits/provider/client';
|
||||
import { useLimits } from '@hanzo/esign-lib/server-only/limits/provider/client';
|
||||
import type {
|
||||
TDeleteEnvelopeRequest,
|
||||
TDeleteEnvelopeResponse,
|
||||
} from '@hanzo/sign-trpc/server/envelope-router/delete-envelope.types';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Alert, AlertDescription } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
} from '@hanzo/esign-trpc/server/envelope-router/delete-envelope.types';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Alert, AlertDescription } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogClose,
|
||||
@@ -23,9 +23,9 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
type EnvelopeDeleteDialogProps = {
|
||||
id: string;
|
||||
|
||||
@@ -11,18 +11,18 @@ import { useNavigate } from 'react-router';
|
||||
import { match } from 'ts-pattern';
|
||||
import * as z from 'zod';
|
||||
|
||||
import { useCurrentEnvelopeEditor } from '@hanzo/sign-lib/client-only/providers/envelope-editor-provider';
|
||||
import { useCurrentOrganisation } from '@hanzo/sign-lib/client-only/providers/organisation';
|
||||
import { DO_NOT_INVALIDATE_QUERY_ON_MUTATION } from '@hanzo/sign-lib/constants/trpc';
|
||||
import { extractDocumentAuthMethods } from '@hanzo/sign-lib/utils/document-auth';
|
||||
import { getRecipientsWithMissingFields } from '@hanzo/sign-lib/utils/recipients';
|
||||
import type { TDistributeEnvelopeRequest } from '@hanzo/sign-trpc/server/envelope-router/distribute-envelope.types';
|
||||
import type { TFindOrganisationEmailsResponse } from '@hanzo/sign-trpc/server/organisation-router/find-organisation-emails.types';
|
||||
import { useZapMutation, useZapQuery } from '@hanzo/sign-trpc/zap/react';
|
||||
import { DocumentSendEmailMessageHelper } from '@hanzo/sign-ui/components/document/document-send-email-message-helper';
|
||||
import { cn } from '@hanzo/sign-ui/lib/utils';
|
||||
import { Alert, AlertDescription } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { useCurrentEnvelopeEditor } from '@hanzo/esign-lib/client-only/providers/envelope-editor-provider';
|
||||
import { useCurrentOrganisation } from '@hanzo/esign-lib/client-only/providers/organisation';
|
||||
import { DO_NOT_INVALIDATE_QUERY_ON_MUTATION } from '@hanzo/esign-lib/constants/trpc';
|
||||
import { extractDocumentAuthMethods } from '@hanzo/esign-lib/utils/document-auth';
|
||||
import { getRecipientsWithMissingFields } from '@hanzo/esign-lib/utils/recipients';
|
||||
import type { TDistributeEnvelopeRequest } from '@hanzo/esign-trpc/server/envelope-router/distribute-envelope.types';
|
||||
import type { TFindOrganisationEmailsResponse } from '@hanzo/esign-trpc/server/organisation-router/find-organisation-emails.types';
|
||||
import { useZapMutation, useZapQuery } from '@hanzo/esign-trpc/zap/react';
|
||||
import { DocumentSendEmailMessageHelper } from '@hanzo/esign-ui/components/document/document-send-email-message-helper';
|
||||
import { cn } from '@hanzo/esign-ui/lib/utils';
|
||||
import { Alert, AlertDescription } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogClose,
|
||||
@@ -32,7 +32,7 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -40,20 +40,20 @@ import {
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from '@hanzo/sign-ui/primitives/select';
|
||||
import { SpinnerBox } from '@hanzo/sign-ui/primitives/spinner';
|
||||
import { Tabs, TabsList, TabsTrigger } from '@hanzo/sign-ui/primitives/tabs';
|
||||
import { Textarea } from '@hanzo/sign-ui/primitives/textarea';
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from '@hanzo/sign-ui/primitives/tooltip';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/select';
|
||||
import { SpinnerBox } from '@hanzo/esign-ui/primitives/spinner';
|
||||
import { Tabs, TabsList, TabsTrigger } from '@hanzo/esign-ui/primitives/tabs';
|
||||
import { Textarea } from '@hanzo/esign-ui/primitives/textarea';
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from '@hanzo/esign-ui/primitives/tooltip';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type EnvelopeDistributeDialogProps = {
|
||||
onDistribute?: () => Promise<void>;
|
||||
|
||||
@@ -5,9 +5,9 @@ import { Trans } from '@lingui/react/macro';
|
||||
import { DocumentStatus, type EnvelopeItem } from '@prisma/client';
|
||||
import { DownloadIcon, FileTextIcon } from 'lucide-react';
|
||||
|
||||
import { downloadPDF } from '@hanzo/sign-lib/client-only/download-pdf';
|
||||
import { useZapQuery } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { downloadPDF } from '@hanzo/esign-lib/client-only/download-pdf';
|
||||
import { useZapQuery } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -15,9 +15,9 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { Skeleton } from '@hanzo/sign-ui/primitives/skeleton';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { Skeleton } from '@hanzo/esign-ui/primitives/skeleton';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
type EnvelopeItemToDownload = Pick<EnvelopeItem, 'id' | 'envelopeId' | 'title' | 'order'>;
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@ import { Trans } from '@lingui/react/macro';
|
||||
import { EnvelopeType } from '@prisma/client';
|
||||
import { useNavigate } from 'react-router';
|
||||
|
||||
import { formatDocumentsPath, formatTemplatesPath } from '@hanzo/sign-lib/utils/teams';
|
||||
import { formatDocumentsPath, formatTemplatesPath } from '@hanzo/esign-lib/utils/teams';
|
||||
import type {
|
||||
TDuplicateEnvelopeRequest,
|
||||
TDuplicateEnvelopeResponse,
|
||||
} from '@hanzo/sign-trpc/server/envelope-router/duplicate-envelope.types';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
} from '@hanzo/esign-trpc/server/envelope-router/duplicate-envelope.types';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -20,8 +20,8 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
import { useCurrentTeam } from '~/providers/team';
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ import { Trans } from '@lingui/react/macro';
|
||||
import type {
|
||||
TDeleteEnvelopeItemRequest,
|
||||
TDeleteEnvelopeItemResponse,
|
||||
} from '@hanzo/sign-trpc/server/envelope-router/delete-envelope-item.types';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Alert, AlertDescription } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
} from '@hanzo/esign-trpc/server/envelope-router/delete-envelope-item.types';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Alert, AlertDescription } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -18,8 +18,8 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type EnvelopeItemDeleteDialogProps = {
|
||||
canItemBeDeleted: boolean;
|
||||
|
||||
@@ -8,14 +8,14 @@ import { DocumentStatus, EnvelopeType, type Recipient, SigningStatus } from '@pr
|
||||
import { useForm } from 'react-hook-form';
|
||||
import * as z from 'zod';
|
||||
|
||||
import { getRecipientType } from '@hanzo/sign-lib/client-only/recipient-type';
|
||||
import type { TEnvelope } from '@hanzo/sign-lib/types/envelope';
|
||||
import { recipientAbbreviation } from '@hanzo/sign-lib/utils/recipient-formatter';
|
||||
import type { TRedistributeEnvelopeRequest } from '@hanzo/sign-trpc/server/envelope-router/redistribute-envelope.types';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { cn } from '@hanzo/sign-ui/lib/utils';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { Checkbox } from '@hanzo/sign-ui/primitives/checkbox';
|
||||
import { getRecipientType } from '@hanzo/esign-lib/client-only/recipient-type';
|
||||
import type { TEnvelope } from '@hanzo/esign-lib/types/envelope';
|
||||
import { recipientAbbreviation } from '@hanzo/esign-lib/utils/recipient-formatter';
|
||||
import type { TRedistributeEnvelopeRequest } from '@hanzo/esign-trpc/server/envelope-router/redistribute-envelope.types';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { cn } from '@hanzo/esign-ui/lib/utils';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import { Checkbox } from '@hanzo/esign-ui/primitives/checkbox';
|
||||
import {
|
||||
Dialog,
|
||||
DialogClose,
|
||||
@@ -25,15 +25,15 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormLabel,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
import { StackAvatar } from '../general/stack-avatar';
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ import type * as DialogPrimitive from '@radix-ui/react-dialog';
|
||||
import type {
|
||||
TBulkDeleteEnvelopesRequest,
|
||||
TBulkDeleteEnvelopesResponse,
|
||||
} from '@hanzo/sign-trpc/server/envelope-router/bulk-delete-envelopes.types';
|
||||
import { useZapMutation, useZapUtils } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Alert, AlertDescription } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
} from '@hanzo/esign-trpc/server/envelope-router/bulk-delete-envelopes.types';
|
||||
import { useZapMutation, useZapUtils } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Alert, AlertDescription } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -18,8 +18,8 @@ import {
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type EnvelopesBulkDeleteDialogProps = {
|
||||
envelopeIds: string[];
|
||||
|
||||
@@ -10,14 +10,14 @@ import { useForm } from 'react-hook-form';
|
||||
import { match } from 'ts-pattern';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { AppError, AppErrorCode } from '@hanzo/sign-lib/errors/app-error';
|
||||
import { AppError, AppErrorCode } from '@hanzo/esign-lib/errors/app-error';
|
||||
import type {
|
||||
TBulkMoveEnvelopesRequest,
|
||||
TBulkMoveEnvelopesResponse,
|
||||
} from '@hanzo/sign-trpc/server/envelope-router/bulk-move-envelopes.types';
|
||||
import type { TFolderWithSubfolders } from '@hanzo/sign-trpc/server/folder-router/schema';
|
||||
import { useZapMutation, useZapQuery, useZapUtils } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
} from '@hanzo/esign-trpc/server/envelope-router/bulk-move-envelopes.types';
|
||||
import type { TFolderWithSubfolders } from '@hanzo/esign-trpc/server/folder-router/schema';
|
||||
import { useZapMutation, useZapQuery, useZapUtils } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -33,9 +33,9 @@ import {
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type EnvelopesBulkMoveDialogProps = {
|
||||
envelopeIds: string[];
|
||||
|
||||
@@ -9,8 +9,8 @@ import { useForm } from 'react-hook-form';
|
||||
import { useParams } from 'react-router';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -27,9 +27,9 @@ import {
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
const ZCreateFolderFormSchema = z.object({
|
||||
name: z.string().min(1, { message: 'Folder name is required' }),
|
||||
|
||||
@@ -7,11 +7,11 @@ import type * as DialogPrimitive from '@radix-ui/react-dialog';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { AppError, AppErrorCode } from '@hanzo/sign-lib/errors/app-error';
|
||||
import type { TFolderWithSubfolders } from '@hanzo/sign-trpc/server/folder-router/schema';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Alert, AlertDescription } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { AppError, AppErrorCode } from '@hanzo/esign-lib/errors/app-error';
|
||||
import type { TFolderWithSubfolders } from '@hanzo/esign-trpc/server/folder-router/schema';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Alert, AlertDescription } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -27,9 +27,9 @@ import {
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type FolderDeleteDialogProps = {
|
||||
folder: TFolderWithSubfolders;
|
||||
|
||||
@@ -8,10 +8,10 @@ import { FolderIcon, HomeIcon, Search } from 'lucide-react';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { AppError, AppErrorCode } from '@hanzo/sign-lib/errors/app-error';
|
||||
import type { TFolderWithSubfolders } from '@hanzo/sign-trpc/server/folder-router/schema';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { AppError, AppErrorCode } from '@hanzo/esign-lib/errors/app-error';
|
||||
import type { TFolderWithSubfolders } from '@hanzo/esign-trpc/server/folder-router/schema';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -19,16 +19,16 @@ import {
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type FolderMoveDialogProps = {
|
||||
foldersData: TFolderWithSubfolders[] | undefined;
|
||||
|
||||
@@ -7,11 +7,11 @@ import type * as DialogPrimitive from '@radix-ui/react-dialog';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { AppError, AppErrorCode } from '@hanzo/sign-lib/errors/app-error';
|
||||
import { DocumentVisibility } from '@hanzo/sign-lib/types/document-visibility';
|
||||
import type { TFolderWithSubfolders } from '@hanzo/sign-trpc/server/folder-router/schema';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { AppError, AppErrorCode } from '@hanzo/esign-lib/errors/app-error';
|
||||
import { DocumentVisibility } from '@hanzo/esign-lib/types/document-visibility';
|
||||
import type { TFolderWithSubfolders } from '@hanzo/esign-trpc/server/folder-router/schema';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogClose,
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -28,16 +28,16 @@ import {
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from '@hanzo/sign-ui/primitives/select';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/select';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
import { useOptionalCurrentTeam } from '~/providers/team';
|
||||
|
||||
|
||||
@@ -8,15 +8,15 @@ import { useForm } from 'react-hook-form';
|
||||
import { useSearchParams } from 'react-router';
|
||||
import type { z } from 'zod';
|
||||
|
||||
import { useUpdateSearchParams } from '@hanzo/sign-lib/client-only/hooks/use-update-search-params';
|
||||
import { useSession } from '@hanzo/sign-lib/client-only/providers/session';
|
||||
import { AppError } from '@hanzo/sign-lib/errors/app-error';
|
||||
import { useUpdateSearchParams } from '@hanzo/esign-lib/client-only/hooks/use-update-search-params';
|
||||
import { useSession } from '@hanzo/esign-lib/client-only/providers/session';
|
||||
import { AppError } from '@hanzo/esign-lib/errors/app-error';
|
||||
import {
|
||||
type TCreateOrganisationResponse,
|
||||
ZCreateOrganisationRequestSchema,
|
||||
} from '@hanzo/sign-trpc/server/organisation-router/create-organisation.types';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
} from '@hanzo/esign-trpc/server/organisation-router/create-organisation.types';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -33,9 +33,9 @@ import {
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type OrganisationCreateDialogProps = {
|
||||
trigger?: React.ReactNode;
|
||||
|
||||
@@ -8,11 +8,11 @@ import { useForm } from 'react-hook-form';
|
||||
import { useNavigate } from 'react-router';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { useCurrentOrganisation } from '@hanzo/sign-lib/client-only/providers/organisation';
|
||||
import { useSession } from '@hanzo/sign-lib/client-only/providers/session';
|
||||
import { AppError } from '@hanzo/sign-lib/errors/app-error';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { useCurrentOrganisation } from '@hanzo/esign-lib/client-only/providers/organisation';
|
||||
import { useSession } from '@hanzo/esign-lib/client-only/providers/session';
|
||||
import { AppError } from '@hanzo/esign-lib/errors/app-error';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -29,9 +29,9 @@ import {
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type OrganisationDeleteDialogProps = {
|
||||
trigger?: React.ReactNode;
|
||||
|
||||
@@ -6,10 +6,10 @@ import type * as DialogPrimitive from '@radix-ui/react-dialog';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import type { z } from 'zod';
|
||||
|
||||
import { AppError, AppErrorCode } from '@hanzo/sign-lib/errors/app-error';
|
||||
import { ZCreateOrganisationEmailRequestSchema } from '@hanzo/sign-trpc/server/organisation-router/create-organisation-email.types';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { AppError, AppErrorCode } from '@hanzo/esign-lib/errors/app-error';
|
||||
import { ZCreateOrganisationEmailRequestSchema } from '@hanzo/esign-trpc/server/organisation-router/create-organisation-email.types';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -27,9 +27,9 @@ import {
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
type EmailDomain = {
|
||||
id: string;
|
||||
|
||||
@@ -3,10 +3,10 @@ import { useState } from 'react';
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
|
||||
import { useCurrentOrganisation } from '@hanzo/sign-lib/client-only/providers/organisation';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Alert, AlertDescription } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { useCurrentOrganisation } from '@hanzo/esign-lib/client-only/providers/organisation';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Alert, AlertDescription } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -15,8 +15,8 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type OrganisationEmailDeleteDialogProps = {
|
||||
emailId: string;
|
||||
|
||||
@@ -7,11 +7,11 @@ import type * as DialogPrimitive from '@radix-ui/react-dialog';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import type { z } from 'zod';
|
||||
|
||||
import { useCurrentOrganisation } from '@hanzo/sign-lib/client-only/providers/organisation';
|
||||
import { AppError, AppErrorCode } from '@hanzo/sign-lib/errors/app-error';
|
||||
import { ZCreateOrganisationEmailDomainRequestSchema } from '@hanzo/sign-trpc/server/organisation-router/create-organisation-email-domain.types';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { useCurrentOrganisation } from '@hanzo/esign-lib/client-only/providers/organisation';
|
||||
import { AppError, AppErrorCode } from '@hanzo/esign-lib/errors/app-error';
|
||||
import { ZCreateOrganisationEmailDomainRequestSchema } from '@hanzo/esign-trpc/server/organisation-router/create-organisation-email-domain.types';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -29,9 +29,9 @@ import {
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
import { OrganisationEmailDomainRecordContent } from './organisation-email-domain-records-dialog';
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ import { Trans } from '@lingui/react/macro';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { useCurrentOrganisation } from '@hanzo/sign-lib/client-only/providers/organisation';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { useCurrentOrganisation } from '@hanzo/esign-lib/client-only/providers/organisation';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -25,9 +25,9 @@ import {
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type OrganisationEmailDomainDeleteDialogProps = {
|
||||
emailDomainId: string;
|
||||
|
||||
@@ -2,9 +2,9 @@ import { useLingui } from '@lingui/react/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import type * as DialogPrimitive from '@radix-ui/react-dialog';
|
||||
|
||||
import { CopyTextButton } from '@hanzo/sign-ui/components/common/copy-text-button';
|
||||
import { Alert, AlertDescription } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { CopyTextButton } from '@hanzo/esign-ui/components/common/copy-text-button';
|
||||
import { Alert, AlertDescription } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogClose,
|
||||
@@ -14,10 +14,10 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { Label } from '@hanzo/sign-ui/primitives/label';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { Label } from '@hanzo/esign-ui/primitives/label';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type OrganisationEmailDomainRecordsDialogProps = {
|
||||
trigger: React.ReactNode;
|
||||
|
||||
@@ -6,13 +6,13 @@ import type * as DialogPrimitive from '@radix-ui/react-dialog';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import type { z } from 'zod';
|
||||
|
||||
import type { TGetOrganisationEmailDomainResponse } from '@hanzo/sign-trpc/server/organisation-router/get-organisation-email-domain.types';
|
||||
import type { TGetOrganisationEmailDomainResponse } from '@hanzo/esign-trpc/server/organisation-router/get-organisation-email-domain.types';
|
||||
import {
|
||||
type TUpdateOrganisationEmailRequest,
|
||||
ZUpdateOrganisationEmailRequestSchema,
|
||||
} from '@hanzo/sign-trpc/server/organisation-router/update-organisation-email.types';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
} from '@hanzo/esign-trpc/server/organisation-router/update-organisation-email.types';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -30,9 +30,9 @@ import {
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type OrganisationEmailUpdateDialogProps = {
|
||||
trigger: React.ReactNode;
|
||||
|
||||
@@ -8,14 +8,14 @@ import type * as DialogPrimitive from '@radix-ui/react-dialog';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import type { z } from 'zod';
|
||||
|
||||
import { useCurrentOrganisation } from '@hanzo/sign-lib/client-only/providers/organisation';
|
||||
import { ORGANISATION_MEMBER_ROLE_HIERARCHY } from '@hanzo/sign-lib/constants/organisations';
|
||||
import { EXTENDED_ORGANISATION_MEMBER_ROLE_MAP } from '@hanzo/sign-lib/constants/organisations-translations';
|
||||
import { AppError } from '@hanzo/sign-lib/errors/app-error';
|
||||
import { ZCreateOrganisationGroupRequestSchema } from '@hanzo/sign-trpc/server/organisation-router/create-organisation-group.types';
|
||||
import type { TFindOrganisationMembersResponse } from '@hanzo/sign-trpc/server/organisation-router/find-organisation-members.types';
|
||||
import { useZapMutation, useZapQuery } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { useCurrentOrganisation } from '@hanzo/esign-lib/client-only/providers/organisation';
|
||||
import { ORGANISATION_MEMBER_ROLE_HIERARCHY } from '@hanzo/esign-lib/constants/organisations';
|
||||
import { EXTENDED_ORGANISATION_MEMBER_ROLE_MAP } from '@hanzo/esign-lib/constants/organisations-translations';
|
||||
import { AppError } from '@hanzo/esign-lib/errors/app-error';
|
||||
import { ZCreateOrganisationGroupRequestSchema } from '@hanzo/esign-trpc/server/organisation-router/create-organisation-group.types';
|
||||
import type { TFindOrganisationMembersResponse } from '@hanzo/esign-trpc/server/organisation-router/find-organisation-members.types';
|
||||
import { useZapMutation, useZapQuery } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -33,17 +33,17 @@ import {
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { MultiSelectCombobox } from '@hanzo/sign-ui/primitives/multi-select-combobox';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { MultiSelectCombobox } from '@hanzo/esign-ui/primitives/multi-select-combobox';
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from '@hanzo/sign-ui/primitives/select';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/select';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type OrganisationGroupCreateDialogProps = {
|
||||
trigger?: React.ReactNode;
|
||||
|
||||
@@ -4,10 +4,10 @@ import { msg } from '@lingui/core/macro';
|
||||
import { useLingui } from '@lingui/react';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
|
||||
import { useCurrentOrganisation } from '@hanzo/sign-lib/client-only/providers/organisation';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Alert, AlertDescription } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { useCurrentOrganisation } from '@hanzo/esign-lib/client-only/providers/organisation';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Alert, AlertDescription } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -16,8 +16,8 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type OrganisationGroupDeleteDialogProps = {
|
||||
organisationGroupId: string;
|
||||
|
||||
@@ -4,12 +4,12 @@ import { useLingui } from '@lingui/react/macro';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import type { OrganisationMemberRole } from '@prisma/client';
|
||||
|
||||
import { ORGANISATION_MEMBER_ROLE_MAP } from '@hanzo/sign-lib/constants/organisations-translations';
|
||||
import { formatAvatarUrl } from '@hanzo/sign-lib/utils/avatars';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Alert } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { AvatarWithText } from '@hanzo/sign-ui/primitives/avatar';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { ORGANISATION_MEMBER_ROLE_MAP } from '@hanzo/esign-lib/constants/organisations-translations';
|
||||
import { formatAvatarUrl } from '@hanzo/esign-lib/utils/avatars';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Alert } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { AvatarWithText } from '@hanzo/esign-ui/primitives/avatar';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -18,8 +18,8 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type OrganisationLeaveDialogProps = {
|
||||
organisationId: string;
|
||||
|
||||
@@ -4,11 +4,11 @@ import { msg } from '@lingui/core/macro';
|
||||
import { useLingui } from '@lingui/react';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
|
||||
import { useCurrentOrganisation } from '@hanzo/sign-lib/client-only/providers/organisation';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Alert } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { AvatarWithText } from '@hanzo/sign-ui/primitives/avatar';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { useCurrentOrganisation } from '@hanzo/esign-lib/client-only/providers/organisation';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Alert } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { AvatarWithText } from '@hanzo/esign-ui/primitives/avatar';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -17,8 +17,8 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type OrganisationMemberDeleteDialogProps = {
|
||||
organisationMemberId: string;
|
||||
|
||||
@@ -11,22 +11,22 @@ import Papa, { type ParseResult } from 'papaparse';
|
||||
import { useFieldArray, useForm } from 'react-hook-form';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { downloadFile } from '@hanzo/sign-lib/client-only/download-file';
|
||||
import { useCurrentOrganisation } from '@hanzo/sign-lib/client-only/providers/organisation';
|
||||
import { IS_BILLING_ENABLED, SUPPORT_EMAIL } from '@hanzo/sign-lib/constants/app';
|
||||
import { ORGANISATION_MEMBER_ROLE_HIERARCHY } from '@hanzo/sign-lib/constants/organisations';
|
||||
import { ORGANISATION_MEMBER_ROLE_MAP } from '@hanzo/sign-lib/constants/organisations-translations';
|
||||
import { INTERNAL_CLAIM_ID } from '@hanzo/sign-lib/types/subscription';
|
||||
import { downloadFile } from '@hanzo/esign-lib/client-only/download-file';
|
||||
import { useCurrentOrganisation } from '@hanzo/esign-lib/client-only/providers/organisation';
|
||||
import { IS_BILLING_ENABLED, SUPPORT_EMAIL } from '@hanzo/esign-lib/constants/app';
|
||||
import { ORGANISATION_MEMBER_ROLE_HIERARCHY } from '@hanzo/esign-lib/constants/organisations';
|
||||
import { ORGANISATION_MEMBER_ROLE_MAP } from '@hanzo/esign-lib/constants/organisations-translations';
|
||||
import { INTERNAL_CLAIM_ID } from '@hanzo/esign-lib/types/subscription';
|
||||
import {
|
||||
type TCreateOrganisationMemberInvitesRequestSchema,
|
||||
ZCreateOrganisationMemberInvitesRequestSchema,
|
||||
} from '@hanzo/sign-trpc/server/organisation-router/create-organisation-member-invites.types';
|
||||
import type { TGetOrganisationResponse } from '@hanzo/sign-trpc/server/organisation-router/get-organisation.types';
|
||||
import { useZapMutation, useZapQuery } from '@hanzo/sign-trpc/zap/react';
|
||||
import { cn } from '@hanzo/sign-ui/lib/utils';
|
||||
import { Alert, AlertDescription } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { Card, CardContent } from '@hanzo/sign-ui/primitives/card';
|
||||
} from '@hanzo/esign-trpc/server/organisation-router/create-organisation-member-invites.types';
|
||||
import type { TGetOrganisationResponse } from '@hanzo/esign-trpc/server/organisation-router/get-organisation.types';
|
||||
import { useZapMutation, useZapQuery } from '@hanzo/esign-trpc/zap/react';
|
||||
import { cn } from '@hanzo/esign-ui/lib/utils';
|
||||
import { Alert, AlertDescription } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import { Card, CardContent } from '@hanzo/esign-ui/primitives/card';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -35,7 +35,7 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -43,18 +43,18 @@ import {
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from '@hanzo/sign-ui/primitives/select';
|
||||
import { SpinnerBox } from '@hanzo/sign-ui/primitives/spinner';
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@hanzo/sign-ui/primitives/tabs';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/select';
|
||||
import { SpinnerBox } from '@hanzo/esign-ui/primitives/spinner';
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@hanzo/esign-ui/primitives/tabs';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type OrganisationMemberInviteDialogProps = {
|
||||
trigger?: React.ReactNode;
|
||||
|
||||
@@ -9,12 +9,12 @@ import type * as DialogPrimitive from '@radix-ui/react-dialog';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { ORGANISATION_MEMBER_ROLE_HIERARCHY } from '@hanzo/sign-lib/constants/organisations';
|
||||
import { ORGANISATION_MEMBER_ROLE_MAP } from '@hanzo/sign-lib/constants/organisations-translations';
|
||||
import { isOrganisationRoleWithinUserHierarchy } from '@hanzo/sign-lib/utils/organisations';
|
||||
import type { ZUpdateOrganisationMemberRequestSchema } from '@hanzo/sign-trpc/server/organisation-router/update-organisation-members.types';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { ORGANISATION_MEMBER_ROLE_HIERARCHY } from '@hanzo/esign-lib/constants/organisations';
|
||||
import { ORGANISATION_MEMBER_ROLE_MAP } from '@hanzo/esign-lib/constants/organisations-translations';
|
||||
import { isOrganisationRoleWithinUserHierarchy } from '@hanzo/esign-lib/utils/organisations';
|
||||
import type { ZUpdateOrganisationMemberRequestSchema } from '@hanzo/esign-trpc/server/organisation-router/update-organisation-members.types';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -31,15 +31,15 @@ import {
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from '@hanzo/sign-ui/primitives/select';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/select';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type OrganisationMemberUpdateDialogProps = {
|
||||
currentUserOrganisationRole: OrganisationMemberRole;
|
||||
|
||||
@@ -10,13 +10,13 @@ import { match } from 'ts-pattern';
|
||||
import { UAParser } from 'ua-parser-js';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { MAXIMUM_PASSKEYS } from '@hanzo/sign-lib/constants/auth';
|
||||
import { AppError } from '@hanzo/sign-lib/errors/app-error';
|
||||
import type { TCreatePasskeyRequest } from '@hanzo/sign-trpc/server/auth-router/create-passkey.types';
|
||||
import type { TCreatePasskeyRegistrationOptionsResponse } from '@hanzo/sign-trpc/server/auth-router/create-passkey-registration-options.types';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { Alert, AlertDescription, AlertTitle } from '@hanzo/sign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { MAXIMUM_PASSKEYS } from '@hanzo/esign-lib/constants/auth';
|
||||
import { AppError } from '@hanzo/esign-lib/errors/app-error';
|
||||
import type { TCreatePasskeyRequest } from '@hanzo/esign-trpc/server/auth-router/create-passkey.types';
|
||||
import type { TCreatePasskeyRegistrationOptionsResponse } from '@hanzo/esign-trpc/server/auth-router/create-passkey-registration-options.types';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { Alert, AlertDescription, AlertTitle } from '@hanzo/esign-ui/primitives/alert';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -33,9 +33,9 @@ import {
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
export type PasskeyCreateDialogProps = {
|
||||
trigger?: React.ReactNode;
|
||||
|
||||
@@ -11,16 +11,16 @@ import { useForm } from 'react-hook-form';
|
||||
import { P, match } from 'ts-pattern';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { type Template } from '@hanzo/sign-prisma/types/template-legacy-schema';
|
||||
import { type Template } from '@hanzo/esign-prisma/types/template-legacy-schema';
|
||||
import {
|
||||
MAX_TEMPLATE_PUBLIC_DESCRIPTION_LENGTH,
|
||||
MAX_TEMPLATE_PUBLIC_TITLE_LENGTH,
|
||||
type ZUpdateTemplateRequestSchema,
|
||||
type ZUpdateTemplateResponseSchema,
|
||||
} from '@hanzo/sign-trpc/server/template-router/schema';
|
||||
import { useZapMutation } from '@hanzo/sign-trpc/zap/react';
|
||||
import { AnimateGenericFadeInOut } from '@hanzo/sign-ui/components/animate/animate-generic-fade-in-out';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
} from '@hanzo/esign-trpc/server/template-router/schema';
|
||||
import { useZapMutation } from '@hanzo/esign-trpc/zap/react';
|
||||
import { AnimateGenericFadeInOut } from '@hanzo/esign-ui/components/animate/animate-generic-fade-in-out';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogClose,
|
||||
@@ -30,7 +30,7 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -38,8 +38,8 @@ import {
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
@@ -47,9 +47,9 @@ import {
|
||||
TableHead,
|
||||
TableHeader,
|
||||
TableRow,
|
||||
} from '@hanzo/sign-ui/primitives/table';
|
||||
import { Textarea } from '@hanzo/sign-ui/primitives/textarea';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/table';
|
||||
import { Textarea } from '@hanzo/esign-ui/primitives/textarea';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
import { useCurrentTeam } from '~/providers/team';
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import { useState } from 'react';
|
||||
|
||||
import { Trans, useLingui } from '@lingui/react/macro';
|
||||
|
||||
import { authClient } from '@hanzo/sign-auth/client';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { authClient } from '@hanzo/esign-auth/client';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogClose,
|
||||
@@ -13,8 +13,8 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/sign-ui/primitives/use-toast';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { useToast } from '@hanzo/esign-ui/primitives/use-toast';
|
||||
|
||||
type SessionLogoutAllDialogProps = {
|
||||
onSuccess?: () => Promise<unknown>;
|
||||
|
||||
@@ -6,11 +6,11 @@ import { useForm, useWatch } from 'react-hook-form';
|
||||
import { match } from 'ts-pattern';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { validateCheckboxLength } from '@hanzo/sign-lib/advanced-fields-validation/validate-checkbox';
|
||||
import { type TCheckboxFieldMeta } from '@hanzo/sign-lib/types/field-meta';
|
||||
import { cn } from '@hanzo/sign-ui/lib/utils';
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { Checkbox } from '@hanzo/sign-ui/primitives/checkbox';
|
||||
import { validateCheckboxLength } from '@hanzo/esign-lib/advanced-fields-validation/validate-checkbox';
|
||||
import { type TCheckboxFieldMeta } from '@hanzo/esign-lib/types/field-meta';
|
||||
import { cn } from '@hanzo/esign-ui/lib/utils';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import { Checkbox } from '@hanzo/esign-ui/primitives/checkbox';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -18,8 +18,8 @@ import {
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
import { Form, FormControl, FormField, FormItem } from '@hanzo/sign-ui/primitives/form/form';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import { Form, FormControl, FormField, FormItem } from '@hanzo/esign-ui/primitives/form/form';
|
||||
|
||||
export type SignFieldCheckboxDialogProps = {
|
||||
fieldMeta: TCheckboxFieldMeta;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
import { createCallable } from 'react-call';
|
||||
|
||||
import type { TDropdownFieldMeta } from '@hanzo/sign-lib/types/field-meta';
|
||||
import type { TDropdownFieldMeta } from '@hanzo/esign-lib/types/field-meta';
|
||||
import {
|
||||
CommandDialog,
|
||||
CommandEmpty,
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
CommandInput,
|
||||
CommandItem,
|
||||
CommandList,
|
||||
} from '@hanzo/sign-ui/primitives/command';
|
||||
} from '@hanzo/esign-ui/primitives/command';
|
||||
|
||||
export type SignFieldDropdownDialogProps = {
|
||||
fieldMeta: TDropdownFieldMeta;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { createCallable } from 'react-call';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { Button } from '@hanzo/sign-ui/primitives/button';
|
||||
import { Button } from '@hanzo/esign-ui/primitives/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -13,15 +13,15 @@ import {
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@hanzo/sign-ui/primitives/dialog';
|
||||
} from '@hanzo/esign-ui/primitives/dialog';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormMessage,
|
||||
} from '@hanzo/sign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/sign-ui/primitives/input';
|
||||
} from '@hanzo/esign-ui/primitives/form/form';
|
||||
import { Input } from '@hanzo/esign-ui/primitives/input';
|
||||
|
||||
const ZSignFieldEmailFormSchema = z.object({
|
||||
email: z
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user