feat: 기능 추가 과정중
This commit is contained in:
@@ -11,19 +11,25 @@ export const OPTIONAL_RECIPE_RUNTIME_SENTINEL =
|
||||
export type CapabilityFailureCode =
|
||||
| "ABORTED"
|
||||
| "AUTH_EXPIRED"
|
||||
| "BLOCKED"
|
||||
| "CONFLICT"
|
||||
| "CONSENT_DENIED"
|
||||
| "CONTRACT_DRIFT"
|
||||
| "CORRUPT_DATA"
|
||||
| "DISCONNECTED"
|
||||
| "EXPIRED_RESOURCE"
|
||||
| "INTEGRITY_FAILED"
|
||||
| "INVALID_INPUT"
|
||||
| "LIMIT_EXCEEDED"
|
||||
| "MIGRATION_FAILED"
|
||||
| "NOT_FOUND"
|
||||
| "NOT_READABLE"
|
||||
| "PERMISSION_DENIED"
|
||||
| "POLICY_REJECTED"
|
||||
| "PROVIDER_UNAVAILABLE"
|
||||
| "QUOTA_EXCEEDED"
|
||||
| "STALE_RESULT"
|
||||
| "STORAGE_EVICTED"
|
||||
| "UNSUPPORTED";
|
||||
|
||||
export type CapabilityFailure = Readonly<{
|
||||
@@ -85,13 +91,29 @@ export interface ServiceWorkerUpdatePort {
|
||||
}
|
||||
|
||||
export type TransferProgress = Readonly<{
|
||||
phase?:
|
||||
| "VALIDATING"
|
||||
| "PREPARING"
|
||||
| "TRANSFERRING"
|
||||
| "VERIFYING"
|
||||
| "FINALIZING";
|
||||
transferredBytes: number;
|
||||
totalBytes: number | null;
|
||||
}>;
|
||||
|
||||
export type TransferByteSource = Readonly<{
|
||||
byteLength: number | null;
|
||||
chunks: AsyncIterable<Uint8Array>;
|
||||
}>;
|
||||
|
||||
export interface FileTransferPort {
|
||||
upload(input: {
|
||||
file: Readonly<{ name: string; size: number; type: string }>;
|
||||
file: Readonly<{
|
||||
name: string;
|
||||
size: number;
|
||||
type: string;
|
||||
content: TransferByteSource;
|
||||
}>;
|
||||
signal: AbortSignal;
|
||||
onProgress(progress: TransferProgress): void;
|
||||
}): Promise<CapabilityResult<Readonly<{ resourceId: string }>>>;
|
||||
@@ -99,7 +121,15 @@ export interface FileTransferPort {
|
||||
resourceId: string;
|
||||
signal: AbortSignal;
|
||||
onProgress(progress: TransferProgress): void;
|
||||
}): Promise<CapabilityResult<Uint8Array>>;
|
||||
}): Promise<
|
||||
CapabilityResult<
|
||||
Readonly<{
|
||||
fileName: string;
|
||||
mediaType: string;
|
||||
content: TransferByteSource;
|
||||
}>
|
||||
>
|
||||
>;
|
||||
}
|
||||
|
||||
export interface GeneratedApiFacade {
|
||||
|
||||
Reference in New Issue
Block a user