graphile-presigned-url-plugin 0.6.5 → 0.7.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.
- package/esm/plugin.js +4 -0
- package/esm/types.d.ts +2 -0
- package/package.json +2 -2
- package/plugin.js +4 -0
- package/types.d.ts +2 -0
package/esm/plugin.js
CHANGED
|
@@ -145,6 +145,8 @@ export function createPresignedUrlPlugin(options) {
|
|
|
145
145
|
deduplicated: Boolean!
|
|
146
146
|
"""Presigned URL expiry time (null if deduplicated)"""
|
|
147
147
|
expiresAt: Datetime
|
|
148
|
+
"""File status — 'pending' for fresh uploads, 'ready' or 'processed' for deduplicated files. Clients can use this to know immediately whether the file is usable."""
|
|
149
|
+
status: String!
|
|
148
150
|
}
|
|
149
151
|
|
|
150
152
|
input ConfirmUploadInput {
|
|
@@ -285,6 +287,7 @@ export function createPresignedUrlPlugin(options) {
|
|
|
285
287
|
key: s3Key,
|
|
286
288
|
deduplicated: true,
|
|
287
289
|
expiresAt: null,
|
|
290
|
+
status: existingFile.status,
|
|
288
291
|
};
|
|
289
292
|
}
|
|
290
293
|
// --- Create file record (status=pending) ---
|
|
@@ -339,6 +342,7 @@ export function createPresignedUrlPlugin(options) {
|
|
|
339
342
|
key: s3Key,
|
|
340
343
|
deduplicated: false,
|
|
341
344
|
expiresAt,
|
|
345
|
+
status: 'pending',
|
|
342
346
|
};
|
|
343
347
|
});
|
|
344
348
|
});
|
package/esm/types.d.ts
CHANGED
|
@@ -92,6 +92,8 @@ export interface RequestUploadUrlPayload {
|
|
|
92
92
|
deduplicated: boolean;
|
|
93
93
|
/** Presigned URL expiry time (null if deduplicated) */
|
|
94
94
|
expiresAt: string | null;
|
|
95
|
+
/** File status — 'pending' for fresh uploads, 'ready' or 'processed' for deduplicated files */
|
|
96
|
+
status: string;
|
|
95
97
|
}
|
|
96
98
|
/**
|
|
97
99
|
* Input for the confirmUpload mutation.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphile-presigned-url-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Presigned URL upload plugin for PostGraphile v5 — requestUploadUrl, confirmUpload mutations and downloadUrl computed field",
|
|
5
5
|
"author": "Constructive <developers@constructive.io>",
|
|
6
6
|
"homepage": "https://github.com/constructive-io/constructive",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"@types/node": "^22.19.11",
|
|
61
61
|
"makage": "^0.1.10"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "058b8200e99eb505477d1599ee0d5ab795aa0123"
|
|
64
64
|
}
|
package/plugin.js
CHANGED
|
@@ -149,6 +149,8 @@ function createPresignedUrlPlugin(options) {
|
|
|
149
149
|
deduplicated: Boolean!
|
|
150
150
|
"""Presigned URL expiry time (null if deduplicated)"""
|
|
151
151
|
expiresAt: Datetime
|
|
152
|
+
"""File status — 'pending' for fresh uploads, 'ready' or 'processed' for deduplicated files. Clients can use this to know immediately whether the file is usable."""
|
|
153
|
+
status: String!
|
|
152
154
|
}
|
|
153
155
|
|
|
154
156
|
input ConfirmUploadInput {
|
|
@@ -289,6 +291,7 @@ function createPresignedUrlPlugin(options) {
|
|
|
289
291
|
key: s3Key,
|
|
290
292
|
deduplicated: true,
|
|
291
293
|
expiresAt: null,
|
|
294
|
+
status: existingFile.status,
|
|
292
295
|
};
|
|
293
296
|
}
|
|
294
297
|
// --- Create file record (status=pending) ---
|
|
@@ -343,6 +346,7 @@ function createPresignedUrlPlugin(options) {
|
|
|
343
346
|
key: s3Key,
|
|
344
347
|
deduplicated: false,
|
|
345
348
|
expiresAt,
|
|
349
|
+
status: 'pending',
|
|
346
350
|
};
|
|
347
351
|
});
|
|
348
352
|
});
|
package/types.d.ts
CHANGED
|
@@ -92,6 +92,8 @@ export interface RequestUploadUrlPayload {
|
|
|
92
92
|
deduplicated: boolean;
|
|
93
93
|
/** Presigned URL expiry time (null if deduplicated) */
|
|
94
94
|
expiresAt: string | null;
|
|
95
|
+
/** File status — 'pending' for fresh uploads, 'ready' or 'processed' for deduplicated files */
|
|
96
|
+
status: string;
|
|
95
97
|
}
|
|
96
98
|
/**
|
|
97
99
|
* Input for the confirmUpload mutation.
|