@devultur/convex 1.4.3 → 1.5.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.
@@ -1,4 +1,4 @@
1
- import { VideoModuleConfig, ObjectLock } from '@devultur/core';
1
+ import { VideoModuleConfig, ObjectLock, Visibility } from '@devultur/core';
2
2
  import * as convex_values from 'convex/values';
3
3
  import { Infer } from 'convex/values';
4
4
  import * as convex_server from 'convex/server';
@@ -163,14 +163,20 @@ declare const _default: convex_server.SchemaDefinition<{
163
163
 
164
164
  interface DevulturComponentConfig {
165
165
  video?: VideoModuleConfig;
166
+ upload?: DevulturUploadConfig;
167
+ }
168
+ /** How the exposed `createUploadUrl` uploads. */
169
+ interface DevulturUploadConfig {
170
+ /**
171
+ * Lock every upload gets (retention and/or hold). Set here, on your server: the browser never chooses a lock. To
172
+ * lock per upload, call `devultur.createUploadUrl(ctx, { lock })` from your own function.
173
+ */
174
+ lock?: ObjectLock;
166
175
  /**
167
- * Lock every upload through the exposed `createUploadUrl` gets (retention and/or hold). Set here, on your server:
168
- * the browser never chooses a lock. To lock per upload, call `devultur.createUploadUrl(ctx, { lock })` from your
169
- * own function.
176
+ * Visibility of an upload whose caller passes none. Without it, the Worker's default by type applies. A default,
177
+ * not a rule: the browser's `visibility` wins over it, and a guard's `args` win over both (see `DevulturGuardResult`).
170
178
  */
171
- upload?: {
172
- lock?: ObjectLock;
173
- };
179
+ visibility?: Visibility;
174
180
  }
175
181
  /**
176
182
  * A media record as the component stores it (without the system fields), inferred from the schema's `media` table so
@@ -187,4 +193,4 @@ interface ProgressRecord {
187
193
  updatedAt: number;
188
194
  }
189
195
 
190
- export type { DevulturComponentConfig as D, MediaRecord as M, ProgressRecord as P };
196
+ export type { DevulturComponentConfig as D, MediaRecord as M, ProgressRecord as P, DevulturUploadConfig as a };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devultur/convex",
3
- "version": "1.4.3",
3
+ "version": "1.5.0",
4
4
  "description": "Convex component for Devultur media: media records, uploads, transcodes, watch progress and React bindings",
5
5
  "keywords": [
6
6
  "convex",
@@ -64,8 +64,8 @@
64
64
  "dist"
65
65
  ],
66
66
  "dependencies": {
67
- "@devultur/core": "1.4.3",
68
- "@devultur/react": "1.4.3"
67
+ "@devultur/core": "1.5.0",
68
+ "@devultur/react": "1.5.0"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "convex": ">=1.25.0",