@plyaz/types 1.40.1 → 1.41.1

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.
@@ -16,10 +16,10 @@ import { z } from 'zod';
16
16
  * Use this for DB operations and validation
17
17
  */
18
18
  export declare const MediaTypeSchema: z.ZodEnum<{
19
+ DOCUMENT: "DOCUMENT";
19
20
  IMAGE: "IMAGE";
20
21
  VIDEO: "VIDEO";
21
22
  AUDIO: "AUDIO";
22
- DOCUMENT: "DOCUMENT";
23
23
  }>;
24
24
  export type MediaType = z.infer<typeof MediaTypeSchema>;
25
25
  /**
@@ -28,11 +28,11 @@ export type MediaType = z.infer<typeof MediaTypeSchema>;
28
28
  * Note: OTHER is not in the DB ENUM, mapper should convert to DOCUMENT for DB ops.
29
29
  */
30
30
  export declare const FileTypeSchema: z.ZodEnum<{
31
+ DOCUMENT: "DOCUMENT";
32
+ OTHER: "OTHER";
31
33
  IMAGE: "IMAGE";
32
34
  VIDEO: "VIDEO";
33
35
  AUDIO: "AUDIO";
34
- DOCUMENT: "DOCUMENT";
35
- OTHER: "OTHER";
36
36
  }>;
37
37
  export type FileType = z.infer<typeof FileTypeSchema>;
38
38
  /**
@@ -89,10 +89,10 @@ export type FilesDatabaseRow = z.infer<typeof FilesDatabaseRowSchema>;
89
89
  export declare const CreateFilesSchema: z.ZodObject<{
90
90
  user_id: z.ZodDefault<z.ZodString>;
91
91
  type: z.ZodDefault<z.ZodEnum<{
92
+ DOCUMENT: "DOCUMENT";
92
93
  IMAGE: "IMAGE";
93
94
  VIDEO: "VIDEO";
94
95
  AUDIO: "AUDIO";
95
- DOCUMENT: "DOCUMENT";
96
96
  }>>;
97
97
  filename: z.ZodString;
98
98
  original_filename: z.ZodString;
@@ -127,10 +127,10 @@ export type FilesCreateOutput = z.output<typeof CreateFilesSchema>;
127
127
  export declare const PatchFilesSchema: z.ZodObject<{
128
128
  user_id: z.ZodOptional<z.ZodDefault<z.ZodString>>;
129
129
  type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
130
+ DOCUMENT: "DOCUMENT";
130
131
  IMAGE: "IMAGE";
131
132
  VIDEO: "VIDEO";
132
133
  AUDIO: "AUDIO";
133
- DOCUMENT: "DOCUMENT";
134
134
  }>>>;
135
135
  filename: z.ZodOptional<z.ZodString>;
136
136
  original_filename: z.ZodOptional<z.ZodString>;
@@ -5,6 +5,7 @@
5
5
  * Uses Pick to extend from existing API types where applicable.
6
6
  */
7
7
  import type { UploadFileRequest, GenerateDocumentRequest } from '../../../api';
8
+ import type { FILE_CATEGORY, ENTITY_TYPE } from '../../../storage/enums';
8
9
  /**
9
10
  * Options for useFileUpload hook - direct file upload
10
11
  *
@@ -14,11 +15,11 @@ import type { UploadFileRequest, GenerateDocumentRequest } from '../../../api';
14
15
  */
15
16
  export interface CoreFileUploadOptions {
16
17
  /** Entity type for file organization */
17
- entityType?: string;
18
+ entityType?: ENTITY_TYPE;
18
19
  /** Entity ID for file organization */
19
20
  entityId?: string;
20
21
  /** File category */
21
- category?: string;
22
+ category?: FILE_CATEGORY;
22
23
  /** Whether file is public */
23
24
  isPublic?: boolean;
24
25
  }
@@ -27,12 +28,12 @@ export interface CoreFileUploadOptions {
27
28
  * Extended from UploadFileRequest API type for consistency.
28
29
  */
29
30
  export interface CoreTemplateUploadOptions extends Required<Pick<UploadFileRequest, 'templateId'>>, Pick<UploadFileRequest, 'templateData' | 'outputFormat' | 'locale' | 'pdfOptions'> {
30
- /** Entity type for file organization (default: 'default') */
31
- entityType?: string;
31
+ /** Entity type for file organization (default: ENTITY_TYPE.SYSTEM) */
32
+ entityType?: ENTITY_TYPE;
32
33
  /** Entity ID for file organization (default: 'default') */
33
34
  entityId?: string;
34
- /** File category (default: 'documents') */
35
- category?: string;
35
+ /** File category (default: FILE_CATEGORY.DOCUMENT) */
36
+ category?: FILE_CATEGORY;
36
37
  }
37
38
  /**
38
39
  * Options for generate-only (returns buffer, no upload)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plyaz/types",
3
- "version": "1.40.1",
3
+ "version": "1.41.1",
4
4
  "author": "Redeemer Pace",
5
5
  "license": "ISC",
6
6
  "description": "Provides shared TypeScript types and schema utilities for validation and parsing in the @playz ecosystem.",