@transloadit/convex 0.0.6 → 0.1.0

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.
Files changed (43) hide show
  1. package/README.md +26 -17
  2. package/dist/client/index.d.ts +39 -92
  3. package/dist/client/index.d.ts.map +1 -1
  4. package/dist/client/index.js +34 -104
  5. package/dist/client/index.js.map +1 -1
  6. package/dist/component/_generated/component.d.ts +18 -0
  7. package/dist/component/_generated/component.d.ts.map +1 -1
  8. package/dist/component/apiUtils.d.ts +1 -32
  9. package/dist/component/apiUtils.d.ts.map +1 -1
  10. package/dist/component/apiUtils.js.map +1 -1
  11. package/dist/component/lib.d.ts +33 -90
  12. package/dist/component/lib.d.ts.map +1 -1
  13. package/dist/component/lib.js +48 -157
  14. package/dist/component/lib.js.map +1 -1
  15. package/dist/component/schema.d.ts +4 -4
  16. package/dist/component/schema.d.ts.map +1 -1
  17. package/dist/component/schema.js +3 -31
  18. package/dist/component/schema.js.map +1 -1
  19. package/dist/shared/schemas.d.ts +419 -0
  20. package/dist/shared/schemas.d.ts.map +1 -0
  21. package/dist/shared/schemas.js +194 -0
  22. package/dist/shared/schemas.js.map +1 -0
  23. package/dist/test/index.d.ts +4 -4
  24. package/package.json +4 -16
  25. package/src/client/index.ts +68 -123
  26. package/src/component/_generated/component.ts +17 -0
  27. package/src/component/apiUtils.ts +7 -38
  28. package/src/component/lib.test.ts +19 -0
  29. package/src/component/lib.ts +80 -180
  30. package/src/component/schema.ts +3 -31
  31. package/src/shared/schemas.ts +279 -0
  32. package/dist/react/index.d.ts +0 -281
  33. package/dist/react/index.d.ts.map +0 -1
  34. package/dist/react/index.js +0 -784
  35. package/dist/react/index.js.map +0 -1
  36. package/dist/shared/tusUpload.d.ts +0 -13
  37. package/dist/shared/tusUpload.d.ts.map +0 -1
  38. package/dist/shared/tusUpload.js +0 -32
  39. package/dist/shared/tusUpload.js.map +0 -1
  40. package/src/react/index.test.tsx +0 -340
  41. package/src/react/index.tsx +0 -1245
  42. package/src/react/uploadWithTus.test.tsx +0 -192
  43. package/src/shared/tusUpload.ts +0 -59
@@ -1,39 +1,11 @@
1
1
  import { defineSchema, defineTable } from "convex/server";
2
- import { v } from "convex/values";
2
+ import { vAssemblyFields, vAssemblyResultFields } from "../shared/schemas.js";
3
3
  export default defineSchema({
4
- assemblies: defineTable({
5
- assemblyId: v.string(),
6
- status: v.optional(v.string()),
7
- ok: v.optional(v.string()),
8
- message: v.optional(v.string()),
9
- templateId: v.optional(v.string()),
10
- notifyUrl: v.optional(v.string()),
11
- numExpectedUploadFiles: v.optional(v.number()),
12
- fields: v.optional(v.record(v.string(), v.any())),
13
- uploads: v.optional(v.array(v.any())),
14
- results: v.optional(v.record(v.string(), v.array(v.any()))),
15
- error: v.optional(v.any()),
16
- raw: v.optional(v.any()),
17
- createdAt: v.number(),
18
- updatedAt: v.number(),
19
- userId: v.optional(v.string()),
20
- })
4
+ assemblies: defineTable(vAssemblyFields)
21
5
  .index("by_assemblyId", ["assemblyId"])
22
6
  .index("by_status", ["status"])
23
7
  .index("by_userId", ["userId"]),
24
- results: defineTable({
25
- assemblyId: v.string(),
26
- album: v.optional(v.string()),
27
- userId: v.optional(v.string()),
28
- stepName: v.string(),
29
- resultId: v.optional(v.string()),
30
- sslUrl: v.optional(v.string()),
31
- name: v.optional(v.string()),
32
- size: v.optional(v.number()),
33
- mime: v.optional(v.string()),
34
- raw: v.any(),
35
- createdAt: v.number(),
36
- })
8
+ results: defineTable(vAssemblyResultFields)
37
9
  .index("by_assemblyId", ["assemblyId"])
38
10
  .index("by_assemblyId_and_step", ["assemblyId", "stepName"])
39
11
  .index("by_album", ["album"]),
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/component/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,eA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AAM,eAAe,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE9E,eAAe,YAAY,CAAC;IAC1B,UAAU,EAAE,WAAW,CAAC,eAAe,CAAC;SACrC,KAAK,CAAC,eAAe,EAAE,CAAC,YAAY,CAAC,CAAC;SACtC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC;SAC9B,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC;IACjC,OAAO,EAAE,WAAW,CAAC,qBAAqB,CAAC;SACxC,KAAK,CAAC,eAAe,EAAE,CAAC,YAAY,CAAC,CAAC;SACtC,KAAK,CAAC,wBAAwB,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;SAC3D,KAAK,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,CAAC;CAChC,CAAC,CAAC"}
@@ -0,0 +1,419 @@
1
+ import type { AssemblyInstructionsInput } from "@transloadit/zod/v3/template";
2
+ import { type Infer } from "convex/values";
3
+ export declare const vAssemblyFields: {
4
+ assemblyId: import("convex/values").VString<string, "required">;
5
+ status: import("convex/values").VString<string | undefined, "optional">;
6
+ ok: import("convex/values").VString<string | undefined, "optional">;
7
+ message: import("convex/values").VString<string | undefined, "optional">;
8
+ templateId: import("convex/values").VString<string | undefined, "optional">;
9
+ notifyUrl: import("convex/values").VString<string | undefined, "optional">;
10
+ numExpectedUploadFiles: import("convex/values").VFloat64<number | undefined, "optional">;
11
+ fields: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
12
+ uploads: import("convex/values").VArray<any[] | undefined, import("convex/values").VAny<any, "required", string>, "optional">;
13
+ results: import("convex/values").VRecord<Record<string, any[]> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VArray<any[], import("convex/values").VAny<any, "required", string>, "required">, "optional", string>;
14
+ error: import("convex/values").VAny<any, "optional", string>;
15
+ raw: import("convex/values").VAny<any, "optional", string>;
16
+ createdAt: import("convex/values").VFloat64<number, "required">;
17
+ updatedAt: import("convex/values").VFloat64<number, "required">;
18
+ userId: import("convex/values").VString<string | undefined, "optional">;
19
+ };
20
+ export declare const vAssemblyResultFields: {
21
+ assemblyId: import("convex/values").VString<string, "required">;
22
+ album: import("convex/values").VString<string | undefined, "optional">;
23
+ userId: import("convex/values").VString<string | undefined, "optional">;
24
+ stepName: import("convex/values").VString<string, "required">;
25
+ resultId: import("convex/values").VString<string | undefined, "optional">;
26
+ sslUrl: import("convex/values").VString<string | undefined, "optional">;
27
+ name: import("convex/values").VString<string | undefined, "optional">;
28
+ size: import("convex/values").VFloat64<number | undefined, "optional">;
29
+ mime: import("convex/values").VString<string | undefined, "optional">;
30
+ raw: import("convex/values").VAny<any, "required", string>;
31
+ createdAt: import("convex/values").VFloat64<number, "required">;
32
+ };
33
+ export declare const vAssembly: import("convex/values").VObject<{
34
+ status?: string | undefined;
35
+ ok?: string | undefined;
36
+ message?: string | undefined;
37
+ templateId?: string | undefined;
38
+ notifyUrl?: string | undefined;
39
+ numExpectedUploadFiles?: number | undefined;
40
+ fields?: Record<string, any> | undefined;
41
+ uploads?: any[] | undefined;
42
+ results?: Record<string, any[]> | undefined;
43
+ error?: any;
44
+ raw?: any;
45
+ userId?: string | undefined;
46
+ assemblyId: string;
47
+ _id: import("convex/values").GenericId<"assemblies">;
48
+ _creationTime: number;
49
+ createdAt: number;
50
+ updatedAt: number;
51
+ }, {
52
+ assemblyId: import("convex/values").VString<string, "required">;
53
+ status: import("convex/values").VString<string | undefined, "optional">;
54
+ ok: import("convex/values").VString<string | undefined, "optional">;
55
+ message: import("convex/values").VString<string | undefined, "optional">;
56
+ templateId: import("convex/values").VString<string | undefined, "optional">;
57
+ notifyUrl: import("convex/values").VString<string | undefined, "optional">;
58
+ numExpectedUploadFiles: import("convex/values").VFloat64<number | undefined, "optional">;
59
+ fields: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
60
+ uploads: import("convex/values").VArray<any[] | undefined, import("convex/values").VAny<any, "required", string>, "optional">;
61
+ results: import("convex/values").VRecord<Record<string, any[]> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VArray<any[], import("convex/values").VAny<any, "required", string>, "required">, "optional", string>;
62
+ error: import("convex/values").VAny<any, "optional", string>;
63
+ raw: import("convex/values").VAny<any, "optional", string>;
64
+ createdAt: import("convex/values").VFloat64<number, "required">;
65
+ updatedAt: import("convex/values").VFloat64<number, "required">;
66
+ userId: import("convex/values").VString<string | undefined, "optional">;
67
+ _id: import("convex/values").VId<import("convex/values").GenericId<"assemblies">, "required">;
68
+ _creationTime: import("convex/values").VFloat64<number, "required">;
69
+ }, "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}`>;
70
+ export type Assembly = Infer<typeof vAssembly>;
71
+ export declare const vAssemblyResponse: import("convex/values").VObject<{
72
+ status?: string | undefined;
73
+ ok?: string | undefined;
74
+ message?: string | undefined;
75
+ templateId?: string | undefined;
76
+ notifyUrl?: string | undefined;
77
+ numExpectedUploadFiles?: number | undefined;
78
+ fields?: Record<string, any> | undefined;
79
+ uploads?: any[] | undefined;
80
+ results?: Record<string, any[]> | undefined;
81
+ error?: any;
82
+ raw?: any;
83
+ userId?: string | undefined;
84
+ assemblyId: string;
85
+ _id: string;
86
+ _creationTime: number;
87
+ createdAt: number;
88
+ updatedAt: number;
89
+ }, {
90
+ assemblyId: import("convex/values").VString<string, "required">;
91
+ status: import("convex/values").VString<string | undefined, "optional">;
92
+ ok: import("convex/values").VString<string | undefined, "optional">;
93
+ message: import("convex/values").VString<string | undefined, "optional">;
94
+ templateId: import("convex/values").VString<string | undefined, "optional">;
95
+ notifyUrl: import("convex/values").VString<string | undefined, "optional">;
96
+ numExpectedUploadFiles: import("convex/values").VFloat64<number | undefined, "optional">;
97
+ fields: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
98
+ uploads: import("convex/values").VArray<any[] | undefined, import("convex/values").VAny<any, "required", string>, "optional">;
99
+ results: import("convex/values").VRecord<Record<string, any[]> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VArray<any[], import("convex/values").VAny<any, "required", string>, "required">, "optional", string>;
100
+ error: import("convex/values").VAny<any, "optional", string>;
101
+ raw: import("convex/values").VAny<any, "optional", string>;
102
+ createdAt: import("convex/values").VFloat64<number, "required">;
103
+ updatedAt: import("convex/values").VFloat64<number, "required">;
104
+ userId: import("convex/values").VString<string | undefined, "optional">;
105
+ _id: import("convex/values").VString<string, "required">;
106
+ _creationTime: import("convex/values").VFloat64<number, "required">;
107
+ }, "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}`>;
108
+ export type AssemblyResponse = Infer<typeof vAssemblyResponse>;
109
+ export declare const vAssemblyResult: import("convex/values").VObject<{
110
+ userId?: string | undefined;
111
+ album?: string | undefined;
112
+ resultId?: string | undefined;
113
+ sslUrl?: string | undefined;
114
+ name?: string | undefined;
115
+ size?: number | undefined;
116
+ mime?: string | undefined;
117
+ assemblyId: string;
118
+ raw: any;
119
+ stepName: string;
120
+ _id: import("convex/values").GenericId<"results">;
121
+ _creationTime: number;
122
+ createdAt: number;
123
+ }, {
124
+ assemblyId: import("convex/values").VString<string, "required">;
125
+ album: import("convex/values").VString<string | undefined, "optional">;
126
+ userId: import("convex/values").VString<string | undefined, "optional">;
127
+ stepName: import("convex/values").VString<string, "required">;
128
+ resultId: import("convex/values").VString<string | undefined, "optional">;
129
+ sslUrl: import("convex/values").VString<string | undefined, "optional">;
130
+ name: import("convex/values").VString<string | undefined, "optional">;
131
+ size: import("convex/values").VFloat64<number | undefined, "optional">;
132
+ mime: import("convex/values").VString<string | undefined, "optional">;
133
+ raw: import("convex/values").VAny<any, "required", string>;
134
+ createdAt: import("convex/values").VFloat64<number, "required">;
135
+ _id: import("convex/values").VId<import("convex/values").GenericId<"results">, "required">;
136
+ _creationTime: import("convex/values").VFloat64<number, "required">;
137
+ }, "required", "assemblyId" | "raw" | "userId" | "stepName" | "album" | "_id" | "_creationTime" | "createdAt" | `raw.${string}` | "resultId" | "sslUrl" | "name" | "size" | "mime">;
138
+ export type AssemblyResult = Infer<typeof vAssemblyResult>;
139
+ export declare const vAssemblyResultResponse: import("convex/values").VObject<{
140
+ userId?: string | undefined;
141
+ album?: string | undefined;
142
+ resultId?: string | undefined;
143
+ sslUrl?: string | undefined;
144
+ name?: string | undefined;
145
+ size?: number | undefined;
146
+ mime?: string | undefined;
147
+ assemblyId: string;
148
+ raw: any;
149
+ stepName: string;
150
+ _id: string;
151
+ _creationTime: number;
152
+ createdAt: number;
153
+ }, {
154
+ assemblyId: import("convex/values").VString<string, "required">;
155
+ album: import("convex/values").VString<string | undefined, "optional">;
156
+ userId: import("convex/values").VString<string | undefined, "optional">;
157
+ stepName: import("convex/values").VString<string, "required">;
158
+ resultId: import("convex/values").VString<string | undefined, "optional">;
159
+ sslUrl: import("convex/values").VString<string | undefined, "optional">;
160
+ name: import("convex/values").VString<string | undefined, "optional">;
161
+ size: import("convex/values").VFloat64<number | undefined, "optional">;
162
+ mime: import("convex/values").VString<string | undefined, "optional">;
163
+ raw: import("convex/values").VAny<any, "required", string>;
164
+ createdAt: import("convex/values").VFloat64<number, "required">;
165
+ _id: import("convex/values").VString<string, "required">;
166
+ _creationTime: import("convex/values").VFloat64<number, "required">;
167
+ }, "required", "assemblyId" | "raw" | "userId" | "stepName" | "album" | "_id" | "_creationTime" | "createdAt" | `raw.${string}` | "resultId" | "sslUrl" | "name" | "size" | "mime">;
168
+ export type AssemblyResultResponse = Infer<typeof vAssemblyResultResponse>;
169
+ export declare const vTransloaditConfig: import("convex/values").VObject<{
170
+ authSecret: string;
171
+ authKey: string;
172
+ }, {
173
+ authKey: import("convex/values").VString<string, "required">;
174
+ authSecret: import("convex/values").VString<string, "required">;
175
+ }, "required", "authSecret" | "authKey">;
176
+ export type TransloaditConfig = Infer<typeof vTransloaditConfig>;
177
+ export declare const vAssemblyBaseArgs: {
178
+ templateId: import("convex/values").VString<string | undefined, "optional">;
179
+ steps: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
180
+ fields: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
181
+ notifyUrl: import("convex/values").VString<string | undefined, "optional">;
182
+ numExpectedUploadFiles: import("convex/values").VFloat64<number | undefined, "optional">;
183
+ expires: import("convex/values").VString<string | undefined, "optional">;
184
+ additionalParams: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
185
+ userId: import("convex/values").VString<string | undefined, "optional">;
186
+ };
187
+ export declare const vCreateAssemblyArgs: import("convex/values").VObject<{
188
+ templateId?: string | undefined;
189
+ notifyUrl?: string | undefined;
190
+ numExpectedUploadFiles?: number | undefined;
191
+ fields?: Record<string, any> | undefined;
192
+ userId?: string | undefined;
193
+ steps?: Record<string, any> | undefined;
194
+ expires?: string | undefined;
195
+ additionalParams?: Record<string, any> | undefined;
196
+ }, {
197
+ templateId: import("convex/values").VString<string | undefined, "optional">;
198
+ steps: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
199
+ fields: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
200
+ notifyUrl: import("convex/values").VString<string | undefined, "optional">;
201
+ numExpectedUploadFiles: import("convex/values").VFloat64<number | undefined, "optional">;
202
+ expires: import("convex/values").VString<string | undefined, "optional">;
203
+ additionalParams: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
204
+ userId: import("convex/values").VString<string | undefined, "optional">;
205
+ }, "required", "templateId" | "notifyUrl" | "numExpectedUploadFiles" | "fields" | "userId" | "steps" | "expires" | "additionalParams" | `fields.${string}` | `steps.${string}` | `additionalParams.${string}`>;
206
+ export type CreateAssemblyArgs = Omit<Infer<typeof vCreateAssemblyArgs>, "steps" | "fields"> & {
207
+ steps?: AssemblyInstructionsInput["steps"];
208
+ fields?: AssemblyInstructionsInput["fields"];
209
+ };
210
+ export declare const vCreateAssemblyReturn: import("convex/values").VObject<{
211
+ assemblyId: string;
212
+ data: any;
213
+ }, {
214
+ assemblyId: import("convex/values").VString<string, "required">;
215
+ data: import("convex/values").VAny<any, "required", string>;
216
+ }, "required", "assemblyId" | "data" | `data.${string}`>;
217
+ export type CreateAssemblyReturn = Infer<typeof vCreateAssemblyReturn>;
218
+ export declare const vAssemblyOptions: import("convex/values").VObject<{
219
+ fields?: Record<string, any> | undefined;
220
+ signature: string;
221
+ params: string;
222
+ }, {
223
+ params: import("convex/values").VString<string, "required">;
224
+ signature: import("convex/values").VString<string, "required">;
225
+ fields: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
226
+ }, "required", "fields" | "signature" | `fields.${string}` | "params">;
227
+ export type AssemblyOptions = Infer<typeof vAssemblyOptions>;
228
+ export declare const vWebhookArgs: {
229
+ payload: import("convex/values").VAny<any, "required", string>;
230
+ rawBody: import("convex/values").VString<string | undefined, "optional">;
231
+ signature: import("convex/values").VString<string | undefined, "optional">;
232
+ verifySignature: import("convex/values").VBoolean<boolean | undefined, "optional">;
233
+ authSecret: import("convex/values").VString<string | undefined, "optional">;
234
+ };
235
+ export declare const vPublicWebhookArgs: {
236
+ payload: import("convex/values").VAny<any, "required", string>;
237
+ rawBody: import("convex/values").VString<string | undefined, "optional">;
238
+ signature: import("convex/values").VString<string | undefined, "optional">;
239
+ verifySignature: import("convex/values").VBoolean<boolean | undefined, "optional">;
240
+ };
241
+ export declare const vWebhookActionArgs: import("convex/values").VObject<{
242
+ rawBody?: string | undefined;
243
+ signature?: string | undefined;
244
+ payload: any;
245
+ }, {
246
+ payload: import("convex/values").VAny<any, "required", string>;
247
+ rawBody: import("convex/values").VString<string | undefined, "optional">;
248
+ signature: import("convex/values").VString<string | undefined, "optional">;
249
+ }, "required", "payload" | "rawBody" | "signature" | `payload.${string}`>;
250
+ export type WebhookActionArgs = Infer<typeof vWebhookActionArgs>;
251
+ export declare const vWebhookResponse: import("convex/values").VObject<{
252
+ status?: string | undefined;
253
+ ok?: string | undefined;
254
+ assemblyId: string;
255
+ resultCount: number;
256
+ }, {
257
+ assemblyId: import("convex/values").VString<string, "required">;
258
+ resultCount: import("convex/values").VFloat64<number, "required">;
259
+ ok: import("convex/values").VString<string | undefined, "optional">;
260
+ status: import("convex/values").VString<string | undefined, "optional">;
261
+ }, "required", "assemblyId" | "status" | "ok" | "resultCount">;
262
+ export type WebhookResponse = Infer<typeof vWebhookResponse>;
263
+ export declare const vQueueWebhookResponse: import("convex/values").VObject<{
264
+ assemblyId: string;
265
+ queued: boolean;
266
+ }, {
267
+ assemblyId: import("convex/values").VString<string, "required">;
268
+ queued: import("convex/values").VBoolean<boolean, "required">;
269
+ }, "required", "assemblyId" | "queued">;
270
+ export type QueueWebhookResponse = Infer<typeof vQueueWebhookResponse>;
271
+ export declare const vAssemblyIdArgs: {
272
+ assemblyId: import("convex/values").VString<string, "required">;
273
+ };
274
+ export declare const vListAssembliesArgs: {
275
+ status: import("convex/values").VString<string | undefined, "optional">;
276
+ userId: import("convex/values").VString<string | undefined, "optional">;
277
+ limit: import("convex/values").VFloat64<number | undefined, "optional">;
278
+ };
279
+ export declare const vListResultsArgs: {
280
+ assemblyId: import("convex/values").VString<string, "required">;
281
+ stepName: import("convex/values").VString<string | undefined, "optional">;
282
+ limit: import("convex/values").VFloat64<number | undefined, "optional">;
283
+ };
284
+ export declare const vListAlbumResultsArgs: {
285
+ album: import("convex/values").VString<string, "required">;
286
+ limit: import("convex/values").VFloat64<number | undefined, "optional">;
287
+ };
288
+ export declare const vPurgeAlbumArgs: {
289
+ album: import("convex/values").VString<string, "required">;
290
+ deleteAssemblies: import("convex/values").VBoolean<boolean | undefined, "optional">;
291
+ };
292
+ export declare const vPurgeAlbumResponse: import("convex/values").VObject<{
293
+ deletedResults: number;
294
+ deletedAssemblies: number;
295
+ }, {
296
+ deletedResults: import("convex/values").VFloat64<number, "required">;
297
+ deletedAssemblies: import("convex/values").VFloat64<number, "required">;
298
+ }, "required", "deletedResults" | "deletedAssemblies">;
299
+ export type PurgeAlbumResponse = Infer<typeof vPurgeAlbumResponse>;
300
+ export declare const vStoreAssemblyMetadataArgs: {
301
+ assemblyId: import("convex/values").VString<string, "required">;
302
+ userId: import("convex/values").VString<string | undefined, "optional">;
303
+ fields: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
304
+ };
305
+ export declare const vRefreshAssemblyArgs: {
306
+ assemblyId: import("convex/values").VString<string, "required">;
307
+ config: import("convex/values").VObject<{
308
+ authSecret: string;
309
+ authKey: string;
310
+ } | undefined, {
311
+ authKey: import("convex/values").VString<string, "required">;
312
+ authSecret: import("convex/values").VString<string, "required">;
313
+ }, "optional", "authSecret" | "authKey">;
314
+ };
315
+ export declare const vHandleWebhookArgs: {
316
+ config: import("convex/values").VObject<{
317
+ authSecret: string;
318
+ } | undefined, {
319
+ authSecret: import("convex/values").VString<string, "required">;
320
+ }, "optional", "authSecret">;
321
+ payload: import("convex/values").VAny<any, "required", string>;
322
+ rawBody: import("convex/values").VString<string | undefined, "optional">;
323
+ signature: import("convex/values").VString<string | undefined, "optional">;
324
+ verifySignature: import("convex/values").VBoolean<boolean | undefined, "optional">;
325
+ };
326
+ export declare const vProcessWebhookResult: import("convex/values").VObject<{
327
+ status?: string | undefined;
328
+ ok?: string | undefined;
329
+ assemblyId: string;
330
+ resultCount: number;
331
+ }, {
332
+ assemblyId: import("convex/values").VString<string, "required">;
333
+ resultCount: import("convex/values").VFloat64<number, "required">;
334
+ ok: import("convex/values").VString<string | undefined, "optional">;
335
+ status: import("convex/values").VString<string | undefined, "optional">;
336
+ }, "required", "assemblyId" | "status" | "ok" | "resultCount">;
337
+ export type ProcessWebhookResult = Infer<typeof vProcessWebhookResult>;
338
+ export declare const vReplaceResultsArgs: {
339
+ assemblyId: import("convex/values").VString<string, "required">;
340
+ results: import("convex/values").VArray<{
341
+ stepName: string;
342
+ result: any;
343
+ }[], import("convex/values").VObject<{
344
+ stepName: string;
345
+ result: any;
346
+ }, {
347
+ stepName: import("convex/values").VString<string, "required">;
348
+ result: import("convex/values").VAny<any, "required", string>;
349
+ }, "required", "stepName" | "result" | `result.${string}`>, "required">;
350
+ };
351
+ export declare const vUpsertAssemblyArgs: {
352
+ assemblyId: import("convex/values").VString<string, "required">;
353
+ status: import("convex/values").VString<string | undefined, "optional">;
354
+ ok: import("convex/values").VString<string | undefined, "optional">;
355
+ message: import("convex/values").VString<string | undefined, "optional">;
356
+ templateId: import("convex/values").VString<string | undefined, "optional">;
357
+ notifyUrl: import("convex/values").VString<string | undefined, "optional">;
358
+ numExpectedUploadFiles: import("convex/values").VFloat64<number | undefined, "optional">;
359
+ fields: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
360
+ uploads: import("convex/values").VArray<any[] | undefined, import("convex/values").VAny<any, "required", string>, "optional">;
361
+ results: import("convex/values").VRecord<Record<string, any[]> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VArray<any[], import("convex/values").VAny<any, "required", string>, "required">, "optional", string>;
362
+ error: import("convex/values").VAny<any, "optional", string>;
363
+ raw: import("convex/values").VAny<any, "optional", string>;
364
+ userId: import("convex/values").VString<string | undefined, "optional">;
365
+ };
366
+ export declare const vBuildParamsOptions: import("convex/values").VObject<{
367
+ templateId?: string | undefined;
368
+ notifyUrl?: string | undefined;
369
+ numExpectedUploadFiles?: number | undefined;
370
+ fields?: any;
371
+ steps?: any;
372
+ expires?: string | undefined;
373
+ additionalParams?: Record<string, any> | undefined;
374
+ authKey: string;
375
+ }, {
376
+ authKey: import("convex/values").VString<string, "required">;
377
+ templateId: import("convex/values").VString<string | undefined, "optional">;
378
+ steps: import("convex/values").VAny<any, "optional", string>;
379
+ fields: import("convex/values").VAny<any, "optional", string>;
380
+ notifyUrl: import("convex/values").VString<string | undefined, "optional">;
381
+ numExpectedUploadFiles: import("convex/values").VFloat64<number | undefined, "optional">;
382
+ expires: import("convex/values").VString<string | undefined, "optional">;
383
+ additionalParams: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
384
+ }, "required", "templateId" | "notifyUrl" | "numExpectedUploadFiles" | "fields" | "steps" | "expires" | "additionalParams" | `fields.${string}` | "authKey" | `steps.${string}` | `additionalParams.${string}`>;
385
+ export type BuildParamsOptions = Omit<Infer<typeof vBuildParamsOptions>, "steps" | "fields"> & {
386
+ steps?: AssemblyInstructionsInput["steps"];
387
+ fields?: AssemblyInstructionsInput["fields"];
388
+ };
389
+ export declare const vBuildParamsResult: import("convex/values").VObject<{
390
+ params: Record<string, any>;
391
+ paramsString: string;
392
+ }, {
393
+ params: import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>;
394
+ paramsString: import("convex/values").VString<string, "required">;
395
+ }, "required", "params" | "paramsString" | `params.${string}`>;
396
+ export type BuildParamsResult = Infer<typeof vBuildParamsResult>;
397
+ export declare const vParsedWebhookRequest: import("convex/values").VObject<{
398
+ signature?: string | undefined;
399
+ payload: any;
400
+ rawBody: string;
401
+ }, {
402
+ payload: import("convex/values").VAny<any, "required", string>;
403
+ rawBody: import("convex/values").VString<string, "required">;
404
+ signature: import("convex/values").VString<string | undefined, "optional">;
405
+ }, "required", "payload" | "rawBody" | "signature" | `payload.${string}`>;
406
+ export type ParsedWebhookRequest = Infer<typeof vParsedWebhookRequest>;
407
+ export declare const vVerifiedWebhookRequest: import("convex/values").VObject<{
408
+ signature?: string | undefined;
409
+ payload: any;
410
+ rawBody: string;
411
+ verified: boolean;
412
+ }, {
413
+ verified: import("convex/values").VBoolean<boolean, "required">;
414
+ payload: import("convex/values").VAny<any, "required", string>;
415
+ rawBody: import("convex/values").VString<string, "required">;
416
+ signature: import("convex/values").VString<string | undefined, "optional">;
417
+ }, "required", "payload" | "rawBody" | "signature" | `payload.${string}` | "verified">;
418
+ export type VerifiedWebhookRequest = Infer<typeof vVerifiedWebhookRequest>;
419
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/shared/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,KAAK,KAAK,EAAK,MAAM,eAAe,CAAC;AAE9C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;CAgB3B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;CAYjC,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yTAIpB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAE/C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yTAI5B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,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