@transloadit/convex 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +114 -134
- package/dist/client/index.d.ts +24 -13
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +14 -3
- package/dist/client/index.js.map +1 -1
- package/dist/component/_generated/api.d.ts +2 -2
- package/dist/component/_generated/dataModel.d.ts +1 -1
- package/dist/component/_generated/server.d.ts +1 -1
- package/dist/component/apiUtils.d.ts +26 -6
- package/dist/component/apiUtils.d.ts.map +1 -1
- package/dist/component/apiUtils.js +48 -38
- package/dist/component/apiUtils.js.map +1 -1
- package/dist/component/lib.d.ts +7 -9
- package/dist/component/lib.d.ts.map +1 -1
- package/dist/component/lib.js +74 -18
- package/dist/component/lib.js.map +1 -1
- package/dist/component/schema.d.ts +4 -6
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/schema.js +0 -7
- package/dist/component/schema.js.map +1 -1
- package/dist/debug/index.d.ts +19 -0
- package/dist/debug/index.d.ts.map +1 -0
- package/dist/debug/index.js +49 -0
- package/dist/debug/index.js.map +1 -0
- package/dist/react/index.d.ts +201 -3
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +674 -94
- package/dist/react/index.js.map +1 -1
- package/dist/shared/assemblyUrls.d.ts +10 -0
- package/dist/shared/assemblyUrls.d.ts.map +1 -0
- package/dist/shared/assemblyUrls.js +26 -0
- package/dist/shared/assemblyUrls.js.map +1 -0
- package/dist/shared/errors.d.ts +7 -0
- package/dist/shared/errors.d.ts.map +1 -0
- package/dist/shared/errors.js +10 -0
- package/dist/shared/errors.js.map +1 -0
- package/dist/shared/pollAssembly.d.ts +12 -0
- package/dist/shared/pollAssembly.d.ts.map +1 -0
- package/dist/shared/pollAssembly.js +50 -0
- package/dist/shared/pollAssembly.js.map +1 -0
- package/dist/shared/resultTypes.d.ts +37 -0
- package/dist/shared/resultTypes.d.ts.map +1 -0
- package/dist/shared/resultTypes.js +2 -0
- package/dist/shared/resultTypes.js.map +1 -0
- package/dist/shared/resultUtils.d.ts +4 -0
- package/dist/shared/resultUtils.d.ts.map +1 -0
- package/dist/shared/resultUtils.js +69 -0
- package/dist/shared/resultUtils.js.map +1 -0
- package/dist/shared/tusUpload.d.ts +13 -0
- package/dist/shared/tusUpload.d.ts.map +1 -0
- package/dist/shared/tusUpload.js +32 -0
- package/dist/shared/tusUpload.js.map +1 -0
- package/dist/test/index.d.ts +4 -4
- package/dist/test/nodeModules.d.ts +2 -0
- package/dist/test/nodeModules.d.ts.map +1 -0
- package/dist/test/nodeModules.js +19 -0
- package/dist/test/nodeModules.js.map +1 -0
- package/package.json +36 -6
- package/src/client/index.ts +73 -7
- package/src/component/_generated/api.ts +2 -2
- package/src/component/_generated/dataModel.ts +1 -1
- package/src/component/_generated/server.ts +1 -1
- package/src/component/apiUtils.test.ts +166 -2
- package/src/component/apiUtils.ts +96 -64
- package/src/component/lib.test.ts +170 -4
- package/src/component/lib.ts +113 -25
- package/src/component/schema.ts +0 -10
- package/src/debug/index.ts +84 -0
- package/src/react/index.test.tsx +340 -0
- package/src/react/index.tsx +1089 -179
- package/src/react/uploadWithTus.test.tsx +192 -0
- package/src/shared/assemblyUrls.test.ts +71 -0
- package/src/shared/assemblyUrls.ts +59 -0
- package/src/shared/errors.ts +23 -0
- package/src/shared/pollAssembly.ts +65 -0
- package/src/shared/resultTypes.ts +44 -0
- package/src/shared/resultUtils.test.ts +29 -0
- package/src/shared/resultUtils.ts +71 -0
- package/src/shared/tusUpload.ts +59 -0
- package/src/test/index.ts +1 -1
- package/src/test/nodeModules.ts +19 -0
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ A Convex component for creating Transloadit Assemblies, handling resumable uploa
|
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
- Create Assemblies with
|
|
7
|
+
- Create Assemblies with Templates or inline Steps.
|
|
8
8
|
- Resumable uploads via tus (client-side hook; form/XHR uploads are intentionally not supported).
|
|
9
9
|
- Webhook ingestion with signature verification (direct or queued).
|
|
10
10
|
- Persist Assembly status + results in Convex tables.
|
|
@@ -43,15 +43,12 @@ npx convex env set TRANSLOADIT_KEY <your_auth_key>
|
|
|
43
43
|
npx convex env set TRANSLOADIT_SECRET <your_auth_secret>
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
## Golden path (secure by default)
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
The script reads `TRANSLOADIT_KEY/TRANSLOADIT_SECRET` from `.env`, creates or updates the template `convex-demo`, and prints the template id. Use that id as `VITE_TRANSLOADIT_TEMPLATE_ID` in `example/.env` when running the demo app.
|
|
48
|
+
1. **Server-only create**: a Convex action creates the Assembly (auth secret stays server-side).
|
|
49
|
+
2. **Client upload**: use `useTransloaditUppy` for resumable uploads.
|
|
50
|
+
3. **Webhook ingestion**: verify the signature and `queueWebhook` for durable processing.
|
|
51
|
+
4. **Realtime UI**: query status/results and render the gallery.
|
|
55
52
|
|
|
56
53
|
## Backend API
|
|
57
54
|
|
|
@@ -72,7 +69,7 @@ export const {
|
|
|
72
69
|
} = makeTransloaditAPI(components.transloadit);
|
|
73
70
|
```
|
|
74
71
|
|
|
75
|
-
Note:
|
|
72
|
+
Note: pass `expires` in `createAssembly` when you need a custom expiry; otherwise the component defaults to 1 hour from now.
|
|
76
73
|
|
|
77
74
|
## Data model
|
|
78
75
|
|
|
@@ -83,7 +80,7 @@ assemblies 1 ──── * results
|
|
|
83
80
|
```
|
|
84
81
|
|
|
85
82
|
- `assemblies`: one row per Transloadit Assembly (status/ok, notify URL, uploads, raw payload, etc).
|
|
86
|
-
- `results`: one row per output file, keyed by `assemblyId` + `stepName
|
|
83
|
+
- `results`: one row per output file, keyed by `assemblyId` + `stepName`, plus normalized fields (name/size/mime/url) and the raw Transloadit output object.
|
|
87
84
|
|
|
88
85
|
Lifecycle:
|
|
89
86
|
1. `createAssembly` inserts the initial `assemblies` row.
|
|
@@ -97,7 +94,7 @@ Transloadit sends webhooks as `multipart/form-data` with `transloadit` (JSON) an
|
|
|
97
94
|
```ts
|
|
98
95
|
// convex/http.ts
|
|
99
96
|
import { httpRouter } from "convex/server";
|
|
100
|
-
import {
|
|
97
|
+
import { handleWebhookRequest } from "@transloadit/convex";
|
|
101
98
|
import { api } from "./_generated/api";
|
|
102
99
|
import { httpAction } from "./_generated/server";
|
|
103
100
|
|
|
@@ -106,38 +103,21 @@ const http = httpRouter();
|
|
|
106
103
|
http.route({
|
|
107
104
|
path: "/transloadit/webhook",
|
|
108
105
|
method: "POST",
|
|
109
|
-
handler: httpAction(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
rawBody,
|
|
116
|
-
signature,
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
return new Response(null, { status: 204 });
|
|
120
|
-
}),
|
|
106
|
+
handler: httpAction((ctx, request) =>
|
|
107
|
+
handleWebhookRequest(request, {
|
|
108
|
+
mode: "queue",
|
|
109
|
+
runAction: (args) => ctx.runAction(api.transloadit.queueWebhook, args),
|
|
110
|
+
}),
|
|
111
|
+
),
|
|
121
112
|
});
|
|
122
113
|
|
|
123
114
|
export default http;
|
|
124
115
|
```
|
|
125
116
|
|
|
126
|
-
|
|
117
|
+
## Client wrapper (optional)
|
|
127
118
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
payload,
|
|
131
|
-
rawBody,
|
|
132
|
-
signature,
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
return new Response(null, { status: 202 });
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
## Client wrapper
|
|
139
|
-
|
|
140
|
-
If you prefer a class-based API (similar to other Convex components), use `Transloadit`:
|
|
119
|
+
Most integrations should use `makeTransloaditAPI` (above). If you prefer a class-based API
|
|
120
|
+
(similar to other Convex components), use `Transloadit`:
|
|
141
121
|
|
|
142
122
|
```ts
|
|
143
123
|
import { Transloadit } from "@transloadit/convex";
|
|
@@ -149,93 +129,105 @@ const transloadit = new Transloadit(components.transloadit, {
|
|
|
149
129
|
});
|
|
150
130
|
```
|
|
151
131
|
|
|
152
|
-
## React usage
|
|
153
|
-
|
|
154
|
-
### Resumable tus upload
|
|
132
|
+
## React usage (Uppy)
|
|
155
133
|
|
|
156
134
|
```tsx
|
|
157
|
-
import {
|
|
135
|
+
import { useTransloaditUppy } from "@transloadit/convex/react";
|
|
158
136
|
import { api } from "../convex/_generated/api";
|
|
159
137
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
return (
|
|
173
|
-
<div>
|
|
174
|
-
<input type="file" onChange={(e) => handleUpload(e.target.files![0])} />
|
|
175
|
-
{isUploading && <p>Uploading: {progress}%</p>}
|
|
176
|
-
</div>
|
|
177
|
-
);
|
|
178
|
-
}
|
|
138
|
+
const { startUpload, status, results, stage } = useTransloaditUppy({
|
|
139
|
+
uppy,
|
|
140
|
+
createAssembly: api.wedding.createWeddingAssembly,
|
|
141
|
+
getStatus: api.transloadit.getAssemblyStatus,
|
|
142
|
+
listResults: api.transloadit.listResults,
|
|
143
|
+
refreshAssembly: api.transloadit.refreshAssembly,
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
await startUpload({
|
|
147
|
+
createAssemblyArgs: { guestName, uploadCode },
|
|
148
|
+
});
|
|
179
149
|
```
|
|
150
|
+
For advanced/legacy helpers (raw parsing, low-level tus uploads, polling utilities), see `docs/advanced.md`.
|
|
180
151
|
|
|
181
|
-
|
|
152
|
+
## Example app (Next.js + Uppy wedding gallery)
|
|
182
153
|
|
|
183
|
-
|
|
154
|
+
The `example/` app is a wedding gallery where guests upload photos + short videos. It uses Uppy on the client and Convex Auth (anonymous sign-in) to create assemblies securely. If you do not set `NEXT_PUBLIC_CONVEX_URL`, the example falls back to the in-process Convex test harness.
|
|
155
|
+
Uploads are stored via Transloadit directly into Cloudflare R2.
|
|
156
|
+
The client wiring uses the `useTransloaditUppy` hook from `@transloadit/convex/react` to keep Uppy + polling in sync.
|
|
184
157
|
|
|
185
|
-
|
|
186
|
-
import { useAssemblyStatus, useTransloaditFiles } from "@transloadit/convex/react";
|
|
187
|
-
import { api } from "../convex/_generated/api";
|
|
158
|
+
Quick start (local):
|
|
188
159
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
if (!status) return null;
|
|
196
|
-
return (
|
|
197
|
-
<div>
|
|
198
|
-
<p>Status: {status.ok}</p>
|
|
199
|
-
<p>Results: {results?.length ?? 0}</p>
|
|
200
|
-
</div>
|
|
201
|
-
);
|
|
202
|
-
}
|
|
203
|
-
```
|
|
160
|
+
```bash
|
|
161
|
+
# In repo root
|
|
162
|
+
export TRANSLOADIT_KEY=...
|
|
163
|
+
export TRANSLOADIT_SECRET=...
|
|
164
|
+
export TRANSLOADIT_R2_CREDENTIALS=...
|
|
204
165
|
|
|
205
|
-
|
|
166
|
+
# Get a public webhook URL (cloudflared is auto-downloaded if needed)
|
|
167
|
+
yarn tunnel --once
|
|
168
|
+
# Set TRANSLOADIT_NOTIFY_URL to the printed notifyUrl
|
|
169
|
+
export TRANSLOADIT_NOTIFY_URL=...
|
|
206
170
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
import { api } from "../convex/_generated/api";
|
|
171
|
+
yarn example:dev
|
|
172
|
+
```
|
|
210
173
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
);
|
|
174
|
+
If you want the API routes to talk to an existing Convex deployment (bypassing Convex Auth), set:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
export CONVEX_URL=...
|
|
178
|
+
export CONVEX_ADMIN_KEY=...
|
|
217
179
|
```
|
|
218
180
|
|
|
219
|
-
|
|
181
|
+
The example exposes `POST /transloadit/webhook` and forwards webhooks into Convex via `queueWebhook`.
|
|
182
|
+
Realtime “new upload” toasts use a Convex subscription on recent assemblies.
|
|
183
|
+
The demo also applies a simple per-user upload limit in the Convex backend (see `example/convex/wedding.ts`).
|
|
184
|
+
|
|
185
|
+
### Storage (required R2 persistence)
|
|
220
186
|
|
|
221
|
-
The
|
|
187
|
+
The example uses the `/cloudflare/store` robot to write processed files into Cloudflare R2. Configure one of these:
|
|
222
188
|
|
|
223
189
|
```bash
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
#
|
|
228
|
-
|
|
190
|
+
# Option A: Transloadit template credentials (recommended)
|
|
191
|
+
export TRANSLOADIT_R2_CREDENTIALS=...
|
|
192
|
+
|
|
193
|
+
# Option B: supply R2 details directly
|
|
194
|
+
export R2_BUCKET=...
|
|
195
|
+
export R2_ACCESS_KEY_ID=...
|
|
196
|
+
export R2_SECRET_ACCESS_KEY=...
|
|
197
|
+
export R2_ACCOUNT_ID=... # or R2_HOST
|
|
198
|
+
export R2_PUBLIC_URL=... # optional public URL prefix
|
|
229
199
|
```
|
|
230
200
|
|
|
231
|
-
|
|
201
|
+
The UI hides older items based on `NEXT_PUBLIC_GALLERY_RETENTION_HOURS` (default: 24) to discourage spam/abuse.
|
|
202
|
+
If you set `WEDDING_UPLOAD_CODE` on the Convex deployment, guests must enter the passcode before uploads can start.
|
|
203
|
+
|
|
204
|
+
### Deploy the example (Vercel + stable Convex)
|
|
205
|
+
|
|
206
|
+
For a public demo, deploy the `example/` app and point it at a stable Convex deployment.
|
|
207
|
+
|
|
208
|
+
1. Deploy a Convex app that includes this component (stable/prod deployment).
|
|
209
|
+
2. Set Vercel environment variables for the project:
|
|
210
|
+
- `NEXT_PUBLIC_CONVEX_URL` (point to the stable Convex deployment)
|
|
211
|
+
- `NEXT_PUBLIC_GALLERY_RETENTION_HOURS` (optional)
|
|
212
|
+
3. Set Convex environment variables on the deployment:
|
|
213
|
+
- `TRANSLOADIT_KEY` and `TRANSLOADIT_SECRET`
|
|
214
|
+
- `TRANSLOADIT_NOTIFY_URL` (set to `https://<deployment>.convex.site/transloadit/webhook`)
|
|
215
|
+
- R2 credentials (see above)
|
|
216
|
+
- `WEDDING_UPLOAD_CODE` (optional passcode for uploads)
|
|
217
|
+
4. Trigger the Vercel deploy hook (or deploy manually).
|
|
218
|
+
|
|
219
|
+
To deploy a stable Convex backend for the demo (once per environment), run:
|
|
232
220
|
|
|
233
221
|
```bash
|
|
234
|
-
|
|
235
|
-
|
|
222
|
+
export CONVEX_DEPLOY_KEY=...
|
|
223
|
+
export TRANSLOADIT_KEY=...
|
|
224
|
+
export TRANSLOADIT_SECRET=...
|
|
225
|
+
|
|
226
|
+
yarn deploy:cloud
|
|
236
227
|
```
|
|
237
228
|
|
|
238
|
-
|
|
229
|
+
Once deployed, use the Vercel URL as `E2E_REMOTE_APP_URL` for `yarn verify:cloud`.
|
|
230
|
+
CI expects a stable Vercel production URL in the `E2E_REMOTE_APP_URL` secret on `main`.
|
|
239
231
|
|
|
240
232
|
## Verification and QA
|
|
241
233
|
|
|
@@ -245,18 +237,29 @@ Fast checks:
|
|
|
245
237
|
yarn check
|
|
246
238
|
```
|
|
247
239
|
|
|
248
|
-
This runs format, lint, typecheck, and unit tests.
|
|
240
|
+
This runs format, lint, typecheck, and unit tests. For a full verification run:
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
yarn verify
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Additional commands:
|
|
249
247
|
|
|
250
248
|
- `yarn lint` (Biome)
|
|
251
249
|
- `yarn format` (Biome write)
|
|
252
250
|
- `yarn typecheck` (tsc)
|
|
253
251
|
- `yarn test` (Vitest unit tests)
|
|
254
|
-
- `yarn
|
|
252
|
+
- `yarn verify:local` (runs the Next.js wedding example + uploads an image + video)
|
|
253
|
+
- `yarn verify:cloud` (runs the browser flow against a deployed Next.js app)
|
|
254
|
+
- `yarn deploy:cloud` (deploys a stable Convex backend for the demo app)
|
|
255
255
|
- `yarn build` (tsc build + emit package json)
|
|
256
256
|
|
|
257
257
|
Notes:
|
|
258
|
-
- `yarn
|
|
258
|
+
- `yarn tunnel` is a support tool, not verification.
|
|
259
259
|
- CI should run non-mutating checks; local `yarn check` may format/fix.
|
|
260
|
+
- `yarn verify:local` needs `TRANSLOADIT_KEY`, `TRANSLOADIT_SECRET`, `TRANSLOADIT_NOTIFY_URL`, and R2 credentials.
|
|
261
|
+
- `yarn verify:cloud` needs `E2E_REMOTE_APP_URL`.
|
|
262
|
+
- Set `TRANSLOADIT_DEBUG=1` to enable verbose verify logs.
|
|
260
263
|
|
|
261
264
|
## Component test helpers
|
|
262
265
|
|
|
@@ -274,7 +277,7 @@ const t = createTransloaditTest();
|
|
|
274
277
|
|
|
275
278
|
## Release process
|
|
276
279
|
|
|
277
|
-
Releases are automated via GitHub Actions and published to npm using OIDC (Trusted Publisher).
|
|
280
|
+
Releases are automated via Changesets + GitHub Actions and published to npm using OIDC (Trusted Publisher).
|
|
278
281
|
|
|
279
282
|
1. Ensure CI is green on `main`.
|
|
280
283
|
2. Run local checks:
|
|
@@ -283,36 +286,13 @@ Releases are automated via GitHub Actions and published to npm using OIDC (Trust
|
|
|
283
286
|
yarn check
|
|
284
287
|
```
|
|
285
288
|
|
|
286
|
-
3.
|
|
287
|
-
|
|
288
|
-
```bash
|
|
289
|
-
git checkout main
|
|
290
|
-
git pull
|
|
291
|
-
# edit package.json version, then:
|
|
292
|
-
git add package.json
|
|
293
|
-
git commit -m "Release vX.Y.Z"
|
|
294
|
-
git push
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
4. Tag and push the release:
|
|
289
|
+
3. Add a changeset describing the release:
|
|
298
290
|
|
|
299
291
|
```bash
|
|
300
|
-
|
|
301
|
-
git push origin vX.Y.Z
|
|
292
|
+
yarn changeset
|
|
302
293
|
```
|
|
303
294
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
- create a draft GitHub release,
|
|
307
|
-
- publish the tarball to npm with provenance.
|
|
308
|
-
|
|
309
|
-
## Roadmap (condensed)
|
|
310
|
-
|
|
311
|
-
- Completed: tus-only uploads, webhook handling, polling fallback, typed API wrappers, React hooks, browser QA.
|
|
312
|
-
- Possible next steps: richer typed step/result validators, automated webhook retries with backoff, additional templates/recipes.
|
|
313
|
-
|
|
314
|
-
## References
|
|
295
|
+
4. Push the changeset to `main`. The Changesets workflow will open a “Version Packages” PR.
|
|
296
|
+
5. Merge the “Version Packages” PR. This will publish to npm and tag the release.
|
|
315
297
|
|
|
316
|
-
|
|
317
|
-
- Convex official components (e.g. Resend, Aggregate)
|
|
318
|
-
- Transloadit API docs (assembly status + resumable uploads)
|
|
298
|
+
Note: This package is 0.x, so breaking changes are allowed. Use changesets to document them clearly.
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
import type { AssemblyStatus } from "@transloadit/
|
|
2
|
-
import type { AssemblyInstructionsInput } from "@transloadit/
|
|
1
|
+
import type { AssemblyStatus } from "@transloadit/zod/v3/assemblyStatus";
|
|
2
|
+
import type { AssemblyInstructionsInput } from "@transloadit/zod/v3/template";
|
|
3
3
|
import { type Infer } from "convex/values";
|
|
4
|
-
import type { ComponentApi } from "../component/_generated/component.
|
|
5
|
-
import type { RunActionCtx, RunMutationCtx, RunQueryCtx } from "./types.
|
|
6
|
-
export {
|
|
4
|
+
import type { ComponentApi } from "../component/_generated/component.ts";
|
|
5
|
+
import type { RunActionCtx, RunMutationCtx, RunQueryCtx } from "./types.ts";
|
|
6
|
+
export { assemblyStatusErrCodeSchema, assemblyStatusOkCodeSchema, assemblyStatusResultsSchema, assemblyStatusSchema, isAssemblyBusy, isAssemblyBusyStatus, isAssemblyErrorStatus, isAssemblyOkStatus, isAssemblySysError, isAssemblyTerminal, isAssemblyTerminalError, isAssemblyTerminalOk, isAssemblyTerminalOkStatus, } from "@transloadit/zod/v3/assemblyStatus";
|
|
7
|
+
export type { ParsedWebhookRequest, VerifiedWebhookRequest, WebhookActionArgs, } from "../component/apiUtils.ts";
|
|
8
|
+
export { buildWebhookQueueArgs, handleWebhookRequest, parseAndVerifyTransloaditWebhook, parseTransloaditWebhook, } from "../component/apiUtils.ts";
|
|
9
|
+
export type { NormalizedAssemblyUrls, TransloaditAssembly, } from "../shared/assemblyUrls.ts";
|
|
10
|
+
export { ASSEMBLY_STATUS_COMPLETED, ASSEMBLY_STATUS_UPLOADING, getAssemblyStage, isAssemblyCompletedStatus, isAssemblyUploadingStatus, normalizeAssemblyUploadUrls, parseAssemblyFields, parseAssemblyResults, parseAssemblyStatus, parseAssemblyUrls, } from "../shared/assemblyUrls.ts";
|
|
11
|
+
export { pollAssembly } from "../shared/pollAssembly.ts";
|
|
12
|
+
export type { ImageResizeResult, ResultByRobot, ResultForRobot, StoreResult, TransloaditResult, VideoEncodeResult, VideoThumbsResult, } from "../shared/resultTypes.ts";
|
|
13
|
+
export { getResultOriginalKey, getResultUrl, } from "../shared/resultUtils.ts";
|
|
14
|
+
export type { TusMetadataOptions, TusUploadConfig, } from "../shared/tusUpload.ts";
|
|
15
|
+
export { buildTusUploadConfig } from "../shared/tusUpload.ts";
|
|
7
16
|
export type { AssemblyStatus, AssemblyInstructionsInput };
|
|
8
17
|
export interface TransloaditConfig {
|
|
9
18
|
authKey: string;
|
|
@@ -49,11 +58,11 @@ export declare const vAssemblyResponse: import("convex/values").VObject<{
|
|
|
49
58
|
}, "required", "assemblyId" | "status" | "ok" | "message" | "templateId" | "notifyUrl" | "numExpectedUploadFiles" | "fields" | "uploads" | "results" | "error" | "raw" | "userId" | "_id" | "_creationTime" | "createdAt" | "updatedAt" | `fields.${string}` | `results.${string}` | `error.${string}` | `raw.${string}`>;
|
|
50
59
|
export type AssemblyResponse = Infer<typeof vAssemblyResponse>;
|
|
51
60
|
export declare const vAssemblyResultResponse: import("convex/values").VObject<{
|
|
61
|
+
mime?: string | undefined;
|
|
52
62
|
name?: string | undefined;
|
|
53
|
-
resultId?: string | undefined;
|
|
54
|
-
sslUrl?: string | undefined;
|
|
55
63
|
size?: number | undefined;
|
|
56
|
-
|
|
64
|
+
sslUrl?: string | undefined;
|
|
65
|
+
resultId?: string | undefined;
|
|
57
66
|
assemblyId: string;
|
|
58
67
|
raw: any;
|
|
59
68
|
stepName: string;
|
|
@@ -72,7 +81,7 @@ export declare const vAssemblyResultResponse: import("convex/values").VObject<{
|
|
|
72
81
|
mime: import("convex/values").VString<string | undefined, "optional">;
|
|
73
82
|
raw: import("convex/values").VAny<any, "required", string>;
|
|
74
83
|
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
75
|
-
}, "required", "assemblyId" | "raw" | "stepName" | "
|
|
84
|
+
}, "required", "assemblyId" | "raw" | "stepName" | "mime" | "name" | "size" | "sslUrl" | "resultId" | "_id" | "_creationTime" | "createdAt" | `raw.${string}`>;
|
|
76
85
|
export type AssemblyResultResponse = Infer<typeof vAssemblyResultResponse>;
|
|
77
86
|
export declare const vCreateAssemblyArgs: import("convex/values").VObject<{
|
|
78
87
|
templateId?: string | undefined;
|
|
@@ -93,6 +102,9 @@ export declare const vCreateAssemblyArgs: import("convex/values").VObject<{
|
|
|
93
102
|
additionalParams: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
|
|
94
103
|
userId: import("convex/values").VString<string | undefined, "optional">;
|
|
95
104
|
}, "required", "templateId" | "notifyUrl" | "numExpectedUploadFiles" | "fields" | "userId" | "steps" | "expires" | "additionalParams" | `fields.${string}` | `steps.${string}` | `additionalParams.${string}`>;
|
|
105
|
+
/**
|
|
106
|
+
* @deprecated Prefer `makeTransloaditAPI` or `Transloadit` for new code.
|
|
107
|
+
*/
|
|
96
108
|
export declare class TransloaditClient {
|
|
97
109
|
component: TransloaditComponent;
|
|
98
110
|
config: TransloaditConfig;
|
|
@@ -161,7 +173,6 @@ export declare class TransloaditClient {
|
|
|
161
173
|
handleWebhook: import("convex/server").RegisteredAction<"public", {
|
|
162
174
|
rawBody?: string | undefined;
|
|
163
175
|
signature?: string | undefined;
|
|
164
|
-
verifySignature?: boolean | undefined;
|
|
165
176
|
payload: any;
|
|
166
177
|
}, Promise<{
|
|
167
178
|
assemblyId: string;
|
|
@@ -172,7 +183,6 @@ export declare class TransloaditClient {
|
|
|
172
183
|
queueWebhook: import("convex/server").RegisteredAction<"public", {
|
|
173
184
|
rawBody?: string | undefined;
|
|
174
185
|
signature?: string | undefined;
|
|
175
|
-
verifySignature?: boolean | undefined;
|
|
176
186
|
payload: any;
|
|
177
187
|
}, Promise<{
|
|
178
188
|
assemblyId: string;
|
|
@@ -208,6 +218,9 @@ export declare class TransloaditClient {
|
|
|
208
218
|
}
|
|
209
219
|
export declare class Transloadit extends TransloaditClient {
|
|
210
220
|
}
|
|
221
|
+
/**
|
|
222
|
+
* @deprecated Prefer `new Transloadit(...)` or `makeTransloaditAPI(...)`.
|
|
223
|
+
*/
|
|
211
224
|
export declare function createTransloadit(component: TransloaditComponent, config?: Partial<TransloaditConfig>): Transloadit;
|
|
212
225
|
export declare function makeTransloaditAPI(component: TransloaditComponent, config?: Partial<TransloaditConfig>): {
|
|
213
226
|
createAssembly: import("convex/server").RegisteredAction<"public", {
|
|
@@ -226,7 +239,6 @@ export declare function makeTransloaditAPI(component: TransloaditComponent, conf
|
|
|
226
239
|
handleWebhook: import("convex/server").RegisteredAction<"public", {
|
|
227
240
|
rawBody?: string | undefined;
|
|
228
241
|
signature?: string | undefined;
|
|
229
|
-
verifySignature?: boolean | undefined;
|
|
230
242
|
payload: any;
|
|
231
243
|
}, Promise<{
|
|
232
244
|
assemblyId: string;
|
|
@@ -237,7 +249,6 @@ export declare function makeTransloaditAPI(component: TransloaditComponent, conf
|
|
|
237
249
|
queueWebhook: import("convex/server").RegisteredAction<"public", {
|
|
238
250
|
rawBody?: string | undefined;
|
|
239
251
|
signature?: string | undefined;
|
|
240
|
-
verifySignature?: boolean | undefined;
|
|
241
252
|
payload: any;
|
|
242
253
|
}, Promise<{
|
|
243
254
|
assemblyId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAE9E,OAAO,EAAE,KAAK,KAAK,EAAK,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE5E,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC1B,2BAA2B,EAC3B,oBAAoB,EACpB,cAAc,EACd,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EACV,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,gCAAgC,EAChC,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,gBAAgB,EAChB,yBAAyB,EACzB,yBAAyB,EACzB,2BAA2B,EAC3B,mBAAmB,EACnB,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WAAY,SAAQ,iBAAiB;CAAG;AAErD;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,oBAAoB,EAC/B,MAAM,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,eAGpC;AAED,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,oBAAoB,EAC/B,MAAM,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiHpC"}
|
package/dist/client/index.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { actionGeneric, mutationGeneric, queryGeneric } from "convex/server";
|
|
2
2
|
import { v } from "convex/values";
|
|
3
|
-
export {
|
|
3
|
+
export { assemblyStatusErrCodeSchema, assemblyStatusOkCodeSchema, assemblyStatusResultsSchema, assemblyStatusSchema, isAssemblyBusy, isAssemblyBusyStatus, isAssemblyErrorStatus, isAssemblyOkStatus, isAssemblySysError, isAssemblyTerminal, isAssemblyTerminalError, isAssemblyTerminalOk, isAssemblyTerminalOkStatus, } from "@transloadit/zod/v3/assemblyStatus";
|
|
4
|
+
export { buildWebhookQueueArgs, handleWebhookRequest, parseAndVerifyTransloaditWebhook, parseTransloaditWebhook, } from "../component/apiUtils.js";
|
|
5
|
+
export { ASSEMBLY_STATUS_COMPLETED, ASSEMBLY_STATUS_UPLOADING, getAssemblyStage, isAssemblyCompletedStatus, isAssemblyUploadingStatus, normalizeAssemblyUploadUrls, parseAssemblyFields, parseAssemblyResults, parseAssemblyStatus, parseAssemblyUrls, } from "../shared/assemblyUrls.js";
|
|
6
|
+
export { pollAssembly } from "../shared/pollAssembly.js";
|
|
7
|
+
export { getResultOriginalKey, getResultUrl, } from "../shared/resultUtils.js";
|
|
8
|
+
export { buildTusUploadConfig } from "../shared/tusUpload.js";
|
|
4
9
|
function requireEnv(names) {
|
|
5
10
|
for (const name of names) {
|
|
6
11
|
const value = process.env[name];
|
|
@@ -52,6 +57,9 @@ export const vCreateAssemblyArgs = v.object({
|
|
|
52
57
|
additionalParams: v.optional(v.record(v.string(), v.any())),
|
|
53
58
|
userId: v.optional(v.string()),
|
|
54
59
|
});
|
|
60
|
+
/**
|
|
61
|
+
* @deprecated Prefer `makeTransloaditAPI` or `Transloadit` for new code.
|
|
62
|
+
*/
|
|
55
63
|
export class TransloaditClient {
|
|
56
64
|
constructor(component, config) {
|
|
57
65
|
this.component = component;
|
|
@@ -105,6 +113,9 @@ export class TransloaditClient {
|
|
|
105
113
|
}
|
|
106
114
|
export class Transloadit extends TransloaditClient {
|
|
107
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* @deprecated Prefer `new Transloadit(...)` or `makeTransloaditAPI(...)`.
|
|
118
|
+
*/
|
|
108
119
|
export function createTransloadit(component, config) {
|
|
109
120
|
return new Transloadit(component, config);
|
|
110
121
|
}
|
|
@@ -132,11 +143,12 @@ export function makeTransloaditAPI(component, config) {
|
|
|
132
143
|
payload: v.any(),
|
|
133
144
|
rawBody: v.optional(v.string()),
|
|
134
145
|
signature: v.optional(v.string()),
|
|
135
|
-
verifySignature: v.optional(v.boolean()),
|
|
136
146
|
},
|
|
137
147
|
returns: v.object({
|
|
138
148
|
assemblyId: v.string(),
|
|
139
149
|
resultCount: v.number(),
|
|
150
|
+
ok: v.optional(v.string()),
|
|
151
|
+
status: v.optional(v.string()),
|
|
140
152
|
}),
|
|
141
153
|
handler: async (ctx, args) => {
|
|
142
154
|
return ctx.runAction(component.lib.handleWebhook, {
|
|
@@ -150,7 +162,6 @@ export function makeTransloaditAPI(component, config) {
|
|
|
150
162
|
payload: v.any(),
|
|
151
163
|
rawBody: v.optional(v.string()),
|
|
152
164
|
signature: v.optional(v.string()),
|
|
153
|
-
verifySignature: v.optional(v.boolean()),
|
|
154
165
|
},
|
|
155
166
|
returns: v.object({
|
|
156
167
|
assemblyId: v.string(),
|
package/dist/client/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAc,CAAC,EAAE,MAAM,eAAe,CAAC;AAI9C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAc,CAAC,EAAE,MAAM,eAAe,CAAC;AAI9C,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC1B,2BAA2B,EAC3B,oBAAoB,EACpB,cAAc,EACd,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,oCAAoC,CAAC;AAM5C,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,gCAAgC,EAChC,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,gBAAgB,EAChB,yBAAyB,EACzB,yBAAyB,EACzB,2BAA2B,EAC3B,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAUzD,OAAO,EACL,oBAAoB,EACpB,YAAY,GACb,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAU9D,SAAS,UAAU,CAAC,KAAe;IACjC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAChC,IAAI,KAAK,EAAE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AAO,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAiB,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;YAC7C,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;gBAC3B,OAAO,GAAG,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC,CAAC;YACpE,CAAC;SACF,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* To regenerate, run `npx convex dev`.
|
|
7
7
|
* @module
|
|
8
8
|
*/
|
|
9
|
-
import type * as apiUtils from "../apiUtils.
|
|
10
|
-
import type * as lib from "../lib.
|
|
9
|
+
import type * as apiUtils from "../apiUtils.ts";
|
|
10
|
+
import type * as lib from "../lib.ts";
|
|
11
11
|
import type { ApiFromModules, FilterApi, FunctionReference } from "convex/server";
|
|
12
12
|
declare const fullApi: ApiFromModules<{
|
|
13
13
|
apiUtils: typeof apiUtils;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { DataModelFromSchemaDefinition, DocumentByName, TableNamesInDataModel, SystemTableNames } from "convex/server";
|
|
10
10
|
import type { GenericId } from "convex/values";
|
|
11
|
-
import schema from "../schema.
|
|
11
|
+
import schema from "../schema.ts";
|
|
12
12
|
export type TableNames = TableNamesInDataModel<DataModel>;
|
|
13
13
|
export type Doc<TableName extends TableNames> = DocumentByName<DataModel, TableName>;
|
|
14
14
|
export type Id<TableName extends TableNames | SystemTableNames> = GenericId<TableName>;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module
|
|
8
8
|
*/
|
|
9
9
|
import type { ActionBuilder, HttpActionBuilder, MutationBuilder, QueryBuilder, GenericActionCtx, GenericMutationCtx, GenericQueryCtx, GenericDatabaseReader, GenericDatabaseWriter } from "convex/server";
|
|
10
|
-
import type { DataModel } from "./dataModel.
|
|
10
|
+
import type { DataModel } from "./dataModel.ts";
|
|
11
11
|
export declare const query: QueryBuilder<DataModel, "public">;
|
|
12
12
|
export declare const internalQuery: QueryBuilder<DataModel, "internal">;
|
|
13
13
|
export declare const mutation: MutationBuilder<DataModel, "public">;
|