@plyaz/types 1.41.1 → 1.41.3
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/dist/api/endpoints/files/schemas.d.ts +6 -22
- package/dist/api/index.cjs +8 -1
- package/dist/api/index.cjs.map +1 -1
- package/dist/api/index.js +8 -1
- package/dist/api/index.js.map +1 -1
- package/dist/core/domain/files/schemas.d.ts +4 -3
- package/dist/core/index.cjs +20 -2
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +20 -2
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +2221 -2219
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2221 -2219
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Single source of truth - types are inferred from schemas.
|
|
7
7
|
*/
|
|
8
8
|
import { z } from 'zod';
|
|
9
|
-
import { FILE_CATEGORY, ENTITY_TYPE } from '../../../storage/enums';
|
|
9
|
+
import { FILE_CATEGORY, ENTITY_TYPE, FILE_ACCESS_LEVEL } from '../../../storage/enums';
|
|
10
10
|
/**
|
|
11
11
|
* File category schema - uses storage enum values
|
|
12
12
|
*/
|
|
@@ -28,13 +28,9 @@ export declare const OutputFormatSchema: z.ZodEnum<{
|
|
|
28
28
|
}>;
|
|
29
29
|
export type OutputFormat = z.infer<typeof OutputFormatSchema>;
|
|
30
30
|
/**
|
|
31
|
-
* Access level for files
|
|
31
|
+
* Access level for files - uses storage enum values
|
|
32
32
|
*/
|
|
33
|
-
export declare const AccessLevelSchema: z.ZodEnum<
|
|
34
|
-
public: "public";
|
|
35
|
-
private: "private";
|
|
36
|
-
protected: "protected";
|
|
37
|
-
}>;
|
|
33
|
+
export declare const AccessLevelSchema: z.ZodEnum<typeof FILE_ACCESS_LEVEL>;
|
|
38
34
|
export type AccessLevel = z.infer<typeof AccessLevelSchema>;
|
|
39
35
|
/**
|
|
40
36
|
* PDF render options
|
|
@@ -101,11 +97,7 @@ export declare const UploadFileRequestSchema: z.ZodObject<{
|
|
|
101
97
|
category: z.ZodEnum<typeof FILE_CATEGORY>;
|
|
102
98
|
entityType: z.ZodEnum<typeof ENTITY_TYPE>;
|
|
103
99
|
entityId: z.ZodString;
|
|
104
|
-
accessLevel: z.ZodOptional<z.ZodEnum<
|
|
105
|
-
public: "public";
|
|
106
|
-
private: "private";
|
|
107
|
-
protected: "protected";
|
|
108
|
-
}>>;
|
|
100
|
+
accessLevel: z.ZodOptional<z.ZodEnum<typeof FILE_ACCESS_LEVEL>>;
|
|
109
101
|
customMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
110
102
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
111
103
|
customPath: z.ZodOptional<z.ZodString>;
|
|
@@ -191,11 +183,7 @@ export declare const UploadFileItemSchema: z.ZodObject<{
|
|
|
191
183
|
category: z.ZodEnum<typeof FILE_CATEGORY>;
|
|
192
184
|
entityType: z.ZodEnum<typeof ENTITY_TYPE>;
|
|
193
185
|
entityId: z.ZodString;
|
|
194
|
-
accessLevel: z.ZodOptional<z.ZodEnum<
|
|
195
|
-
public: "public";
|
|
196
|
-
private: "private";
|
|
197
|
-
protected: "protected";
|
|
198
|
-
}>>;
|
|
186
|
+
accessLevel: z.ZodOptional<z.ZodEnum<typeof FILE_ACCESS_LEVEL>>;
|
|
199
187
|
customMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
200
188
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
201
189
|
customPath: z.ZodOptional<z.ZodString>;
|
|
@@ -246,11 +234,7 @@ export declare const UploadFilesRequestSchema: z.ZodObject<{
|
|
|
246
234
|
category: z.ZodEnum<typeof FILE_CATEGORY>;
|
|
247
235
|
entityType: z.ZodEnum<typeof ENTITY_TYPE>;
|
|
248
236
|
entityId: z.ZodString;
|
|
249
|
-
accessLevel: z.ZodOptional<z.ZodEnum<
|
|
250
|
-
public: "public";
|
|
251
|
-
private: "private";
|
|
252
|
-
protected: "protected";
|
|
253
|
-
}>>;
|
|
237
|
+
accessLevel: z.ZodOptional<z.ZodEnum<typeof FILE_ACCESS_LEVEL>>;
|
|
254
238
|
customMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
255
239
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
256
240
|
customPath: z.ZodOptional<z.ZodString>;
|
package/dist/api/index.cjs
CHANGED
|
@@ -555,6 +555,13 @@ var ENTITY_TYPE = /* @__PURE__ */ ((ENTITY_TYPE2) => {
|
|
|
555
555
|
ENTITY_TYPE2["SYSTEM"] = "system";
|
|
556
556
|
return ENTITY_TYPE2;
|
|
557
557
|
})(ENTITY_TYPE || {});
|
|
558
|
+
var FILE_ACCESS_LEVEL = /* @__PURE__ */ ((FILE_ACCESS_LEVEL2) => {
|
|
559
|
+
FILE_ACCESS_LEVEL2["PUBLIC"] = "public";
|
|
560
|
+
FILE_ACCESS_LEVEL2["PRIVATE"] = "private";
|
|
561
|
+
FILE_ACCESS_LEVEL2["SHARED"] = "shared";
|
|
562
|
+
FILE_ACCESS_LEVEL2["RESTRICTED"] = "restricted";
|
|
563
|
+
return FILE_ACCESS_LEVEL2;
|
|
564
|
+
})(FILE_ACCESS_LEVEL || {});
|
|
558
565
|
|
|
559
566
|
// src/api/endpoints/files/schemas.ts
|
|
560
567
|
var FileCategorySchema = zod.z.nativeEnum(FILE_CATEGORY);
|
|
@@ -563,7 +570,7 @@ var PDF_SCALE_MIN = 0.1;
|
|
|
563
570
|
var PDF_SCALE_MAX = 2;
|
|
564
571
|
var MAX_BULK_UPLOAD_CONCURRENCY = 10;
|
|
565
572
|
var OutputFormatSchema = zod.z.enum(["pdf", "docx", "xlsx", "html"]);
|
|
566
|
-
var AccessLevelSchema = zod.z.
|
|
573
|
+
var AccessLevelSchema = zod.z.nativeEnum(FILE_ACCESS_LEVEL);
|
|
567
574
|
var PdfOptionsSchema = zod.z.object({
|
|
568
575
|
format: zod.z.enum(["A4", "Letter", "Legal"]).optional(),
|
|
569
576
|
landscape: zod.z.boolean().optional(),
|