@inf-monkeys-tech/monkeys 1.0.51 → 1.0.52
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/lib/contracts/file.d.ts +213 -0
- package/lib/contracts/file.d.ts.map +1 -0
- package/lib/contracts/file.js +135 -0
- package/lib/contracts/file.js.map +1 -0
- package/lib/contracts/index.d.ts +1 -0
- package/lib/contracts/index.d.ts.map +1 -1
- package/lib/contracts/index.js +1 -0
- package/lib/contracts/index.js.map +1 -1
- package/lib/esm/contracts/index.mjs +1069 -954
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +1069 -954
- package/lib/esm/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const FilePurposeSchema: z.ZodString;
|
|
3
|
+
export declare const FileStatusSchema: z.ZodEnum<{
|
|
4
|
+
failed: "failed";
|
|
5
|
+
pending: "pending";
|
|
6
|
+
ready: "ready";
|
|
7
|
+
deleted: "deleted";
|
|
8
|
+
}>;
|
|
9
|
+
export declare const FileVariantStatusSchema: z.ZodEnum<{
|
|
10
|
+
queued: "queued";
|
|
11
|
+
failed: "failed";
|
|
12
|
+
ready: "ready";
|
|
13
|
+
processing: "processing";
|
|
14
|
+
}>;
|
|
15
|
+
export declare const FileUsageSchema: z.ZodObject<{
|
|
16
|
+
ownerType: z.ZodString;
|
|
17
|
+
ownerId: z.ZodString;
|
|
18
|
+
field: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
export declare const FileReferenceSchema: z.ZodObject<{
|
|
21
|
+
id: z.ZodOptional<z.ZodString>;
|
|
22
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
23
|
+
thumbnailUri: z.ZodOptional<z.ZodString>;
|
|
24
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
25
|
+
byteSize: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
sha256: z.ZodOptional<z.ZodString>;
|
|
27
|
+
}, z.core.$strict>;
|
|
28
|
+
export declare const FileVariantSchema: z.ZodObject<{
|
|
29
|
+
variantId: z.ZodString;
|
|
30
|
+
kind: z.ZodLiteral<"thumbnail-512">;
|
|
31
|
+
status: z.ZodEnum<{
|
|
32
|
+
queued: "queued";
|
|
33
|
+
failed: "failed";
|
|
34
|
+
ready: "ready";
|
|
35
|
+
processing: "processing";
|
|
36
|
+
}>;
|
|
37
|
+
mimeType: z.ZodLiteral<"image/webp">;
|
|
38
|
+
byteSize: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
42
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, z.core.$strict>;
|
|
44
|
+
export declare const FileRecordSchema: z.ZodObject<{
|
|
45
|
+
contract: z.ZodLiteral<"FileRecord">;
|
|
46
|
+
fileId: z.ZodString;
|
|
47
|
+
teamId: z.ZodString;
|
|
48
|
+
purpose: z.ZodString;
|
|
49
|
+
originalName: z.ZodString;
|
|
50
|
+
mimeType: z.ZodString;
|
|
51
|
+
byteSize: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
sha256: z.ZodOptional<z.ZodString>;
|
|
53
|
+
status: z.ZodEnum<{
|
|
54
|
+
failed: "failed";
|
|
55
|
+
pending: "pending";
|
|
56
|
+
ready: "ready";
|
|
57
|
+
deleted: "deleted";
|
|
58
|
+
}>;
|
|
59
|
+
storage: z.ZodObject<{
|
|
60
|
+
bucketId: z.ZodString;
|
|
61
|
+
objectKey: z.ZodString;
|
|
62
|
+
canonicalUri: z.ZodString;
|
|
63
|
+
etag: z.ZodOptional<z.ZodString>;
|
|
64
|
+
}, z.core.$strict>;
|
|
65
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
66
|
+
variantId: z.ZodString;
|
|
67
|
+
kind: z.ZodLiteral<"thumbnail-512">;
|
|
68
|
+
status: z.ZodEnum<{
|
|
69
|
+
queued: "queued";
|
|
70
|
+
failed: "failed";
|
|
71
|
+
ready: "ready";
|
|
72
|
+
processing: "processing";
|
|
73
|
+
}>;
|
|
74
|
+
mimeType: z.ZodLiteral<"image/webp">;
|
|
75
|
+
byteSize: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
79
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, z.core.$strict>>>;
|
|
81
|
+
createdAt: z.ZodString;
|
|
82
|
+
updatedAt: z.ZodString;
|
|
83
|
+
}, z.core.$strict>;
|
|
84
|
+
export declare const FileUploadCreateRequestSchema: z.ZodObject<{
|
|
85
|
+
purpose: z.ZodString;
|
|
86
|
+
filename: z.ZodString;
|
|
87
|
+
mimeType: z.ZodString;
|
|
88
|
+
byteSize: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
sha256: z.ZodOptional<z.ZodString>;
|
|
90
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
91
|
+
ownerType: z.ZodString;
|
|
92
|
+
ownerId: z.ZodString;
|
|
93
|
+
field: z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, z.core.$strict>>;
|
|
95
|
+
}, z.core.$strict>;
|
|
96
|
+
export declare const FileUploadInstructionSchema: z.ZodObject<{
|
|
97
|
+
url: z.ZodString;
|
|
98
|
+
method: z.ZodString;
|
|
99
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
100
|
+
expiresAt: z.ZodString;
|
|
101
|
+
}, z.core.$strict>;
|
|
102
|
+
export declare const FileUploadCreateResponseSchema: z.ZodObject<{
|
|
103
|
+
file: z.ZodObject<{
|
|
104
|
+
contract: z.ZodLiteral<"FileRecord">;
|
|
105
|
+
fileId: z.ZodString;
|
|
106
|
+
teamId: z.ZodString;
|
|
107
|
+
purpose: z.ZodString;
|
|
108
|
+
originalName: z.ZodString;
|
|
109
|
+
mimeType: z.ZodString;
|
|
110
|
+
byteSize: z.ZodOptional<z.ZodNumber>;
|
|
111
|
+
sha256: z.ZodOptional<z.ZodString>;
|
|
112
|
+
status: z.ZodEnum<{
|
|
113
|
+
failed: "failed";
|
|
114
|
+
pending: "pending";
|
|
115
|
+
ready: "ready";
|
|
116
|
+
deleted: "deleted";
|
|
117
|
+
}>;
|
|
118
|
+
storage: z.ZodObject<{
|
|
119
|
+
bucketId: z.ZodString;
|
|
120
|
+
objectKey: z.ZodString;
|
|
121
|
+
canonicalUri: z.ZodString;
|
|
122
|
+
etag: z.ZodOptional<z.ZodString>;
|
|
123
|
+
}, z.core.$strict>;
|
|
124
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
125
|
+
variantId: z.ZodString;
|
|
126
|
+
kind: z.ZodLiteral<"thumbnail-512">;
|
|
127
|
+
status: z.ZodEnum<{
|
|
128
|
+
queued: "queued";
|
|
129
|
+
failed: "failed";
|
|
130
|
+
ready: "ready";
|
|
131
|
+
processing: "processing";
|
|
132
|
+
}>;
|
|
133
|
+
mimeType: z.ZodLiteral<"image/webp">;
|
|
134
|
+
byteSize: z.ZodOptional<z.ZodNumber>;
|
|
135
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
138
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
139
|
+
}, z.core.$strict>>>;
|
|
140
|
+
createdAt: z.ZodString;
|
|
141
|
+
updatedAt: z.ZodString;
|
|
142
|
+
}, z.core.$strict>;
|
|
143
|
+
upload: z.ZodObject<{
|
|
144
|
+
url: z.ZodString;
|
|
145
|
+
method: z.ZodString;
|
|
146
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
147
|
+
expiresAt: z.ZodString;
|
|
148
|
+
}, z.core.$strict>;
|
|
149
|
+
}, z.core.$strict>;
|
|
150
|
+
export declare const FileUploadCompleteRequestSchema: z.ZodObject<{
|
|
151
|
+
byteSize: z.ZodOptional<z.ZodNumber>;
|
|
152
|
+
sha256: z.ZodOptional<z.ZodString>;
|
|
153
|
+
etag: z.ZodOptional<z.ZodString>;
|
|
154
|
+
}, z.core.$strict>;
|
|
155
|
+
export declare const ResolvedFileSchema: z.ZodObject<{
|
|
156
|
+
fileId: z.ZodOptional<z.ZodString>;
|
|
157
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
158
|
+
failed: "failed";
|
|
159
|
+
pending: "pending";
|
|
160
|
+
ready: "ready";
|
|
161
|
+
deleted: "deleted";
|
|
162
|
+
}>>;
|
|
163
|
+
originalUri: z.ZodOptional<z.ZodString>;
|
|
164
|
+
thumbnailUri: z.ZodOptional<z.ZodString>;
|
|
165
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
166
|
+
byteSize: z.ZodOptional<z.ZodNumber>;
|
|
167
|
+
sha256: z.ZodOptional<z.ZodString>;
|
|
168
|
+
unresolved: z.ZodOptional<z.ZodBoolean>;
|
|
169
|
+
}, z.core.$strict>;
|
|
170
|
+
export declare const FileResolveBatchRequestSchema: z.ZodObject<{
|
|
171
|
+
references: z.ZodArray<z.ZodObject<{
|
|
172
|
+
id: z.ZodOptional<z.ZodString>;
|
|
173
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
174
|
+
thumbnailUri: z.ZodOptional<z.ZodString>;
|
|
175
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
176
|
+
byteSize: z.ZodOptional<z.ZodNumber>;
|
|
177
|
+
sha256: z.ZodOptional<z.ZodString>;
|
|
178
|
+
}, z.core.$strict>>;
|
|
179
|
+
includeOriginal: z.ZodDefault<z.ZodBoolean>;
|
|
180
|
+
includeThumbnail: z.ZodDefault<z.ZodBoolean>;
|
|
181
|
+
}, z.core.$strict>;
|
|
182
|
+
export declare const FileResolveBatchResponseSchema: z.ZodObject<{
|
|
183
|
+
items: z.ZodArray<z.ZodObject<{
|
|
184
|
+
fileId: z.ZodOptional<z.ZodString>;
|
|
185
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
186
|
+
failed: "failed";
|
|
187
|
+
pending: "pending";
|
|
188
|
+
ready: "ready";
|
|
189
|
+
deleted: "deleted";
|
|
190
|
+
}>>;
|
|
191
|
+
originalUri: z.ZodOptional<z.ZodString>;
|
|
192
|
+
thumbnailUri: z.ZodOptional<z.ZodString>;
|
|
193
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
194
|
+
byteSize: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
sha256: z.ZodOptional<z.ZodString>;
|
|
196
|
+
unresolved: z.ZodOptional<z.ZodBoolean>;
|
|
197
|
+
}, z.core.$strict>>;
|
|
198
|
+
}, z.core.$strict>;
|
|
199
|
+
export type FilePurpose = z.infer<typeof FilePurposeSchema>;
|
|
200
|
+
export type FileStatus = z.infer<typeof FileStatusSchema>;
|
|
201
|
+
export type FileVariantStatus = z.infer<typeof FileVariantStatusSchema>;
|
|
202
|
+
export type FileUsage = z.infer<typeof FileUsageSchema>;
|
|
203
|
+
export type FileReference = z.infer<typeof FileReferenceSchema>;
|
|
204
|
+
export type FileVariant = z.infer<typeof FileVariantSchema>;
|
|
205
|
+
export type FileRecord = z.infer<typeof FileRecordSchema>;
|
|
206
|
+
export type FileUploadCreateRequest = z.infer<typeof FileUploadCreateRequestSchema>;
|
|
207
|
+
export type FileUploadInstruction = z.infer<typeof FileUploadInstructionSchema>;
|
|
208
|
+
export type FileUploadCreateResponse = z.infer<typeof FileUploadCreateResponseSchema>;
|
|
209
|
+
export type FileUploadCompleteRequest = z.infer<typeof FileUploadCompleteRequestSchema>;
|
|
210
|
+
export type ResolvedFile = z.infer<typeof ResolvedFileSchema>;
|
|
211
|
+
export type FileResolveBatchRequest = z.infer<typeof FileResolveBatchRequestSchema>;
|
|
212
|
+
export type FileResolveBatchResponse = z.infer<typeof FileResolveBatchResponseSchema>;
|
|
213
|
+
//# sourceMappingURL=file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/contracts/file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,iBAAiB,aAKE,CAAC;AAEjC,eAAO,MAAM,gBAAgB;;;;;EAAoD,CAAC;AAClF,eAAO,MAAM,uBAAuB;;;;;EAAsD,CAAC;AAE3F,eAAO,MAAM,eAAe;;;;kBAMjB,CAAC;AAEZ,eAAO,MAAM,mBAAmB;;;;;;;kBAY5B,CAAC;AAEL,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;kBAYnB,CAAC;AAEZ,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgCzB,CAAC;AAEL,eAAO,MAAM,6BAA6B;;;;;;;;;;;kBAS/B,CAAC;AAEZ,eAAO,MAAM,2BAA2B;;;;;kBAO7B,CAAC;AAEZ,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAKhC,CAAC;AAEZ,eAAO,MAAM,+BAA+B;;;;kBAMjC,CAAC;AAEZ,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;kBAWpB,CAAC;AAEZ,eAAO,MAAM,6BAA6B;;;;;;;;;;;kBAM/B,CAAC;AAEZ,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;kBAIhC,CAAC;AAEZ,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACpF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACpF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileResolveBatchResponseSchema = exports.FileResolveBatchRequestSchema = exports.ResolvedFileSchema = exports.FileUploadCompleteRequestSchema = exports.FileUploadCreateResponseSchema = exports.FileUploadInstructionSchema = exports.FileUploadCreateRequestSchema = exports.FileRecordSchema = exports.FileVariantSchema = exports.FileReferenceSchema = exports.FileUsageSchema = exports.FileVariantStatusSchema = exports.FileStatusSchema = exports.FilePurposeSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("./common");
|
|
6
|
+
exports.FilePurposeSchema = zod_1.z
|
|
7
|
+
.string()
|
|
8
|
+
.trim()
|
|
9
|
+
.min(1)
|
|
10
|
+
.max(64)
|
|
11
|
+
.regex(/^[a-z0-9][a-z0-9-]*$/);
|
|
12
|
+
exports.FileStatusSchema = zod_1.z.enum(['pending', 'ready', 'failed', 'deleted']);
|
|
13
|
+
exports.FileVariantStatusSchema = zod_1.z.enum(['queued', 'processing', 'ready', 'failed']);
|
|
14
|
+
exports.FileUsageSchema = zod_1.z
|
|
15
|
+
.object({
|
|
16
|
+
ownerType: common_1.ContractIdentifierSchema,
|
|
17
|
+
ownerId: common_1.ContractIdentifierSchema,
|
|
18
|
+
field: common_1.ContractIdentifierSchema.optional(),
|
|
19
|
+
})
|
|
20
|
+
.strict();
|
|
21
|
+
exports.FileReferenceSchema = zod_1.z
|
|
22
|
+
.object({
|
|
23
|
+
id: common_1.ContractIdentifierSchema.optional(),
|
|
24
|
+
uri: zod_1.z.string().trim().min(1).optional(),
|
|
25
|
+
thumbnailUri: zod_1.z.string().trim().min(1).optional(),
|
|
26
|
+
mimeType: zod_1.z.string().trim().min(1).max(128).optional(),
|
|
27
|
+
byteSize: zod_1.z.number().int().nonnegative().optional(),
|
|
28
|
+
sha256: common_1.Sha256Schema.optional(),
|
|
29
|
+
})
|
|
30
|
+
.strict()
|
|
31
|
+
.refine((value) => Boolean(value.id || value.uri), {
|
|
32
|
+
message: 'File reference requires id or uri',
|
|
33
|
+
});
|
|
34
|
+
exports.FileVariantSchema = zod_1.z
|
|
35
|
+
.object({
|
|
36
|
+
variantId: common_1.ContractIdentifierSchema,
|
|
37
|
+
kind: zod_1.z.literal('thumbnail-512'),
|
|
38
|
+
status: exports.FileVariantStatusSchema,
|
|
39
|
+
mimeType: zod_1.z.literal('image/webp'),
|
|
40
|
+
byteSize: zod_1.z.number().int().nonnegative().optional(),
|
|
41
|
+
width: zod_1.z.number().int().positive().optional(),
|
|
42
|
+
height: zod_1.z.number().int().positive().optional(),
|
|
43
|
+
uri: zod_1.z.string().trim().min(1).optional(),
|
|
44
|
+
errorCode: common_1.ContractIdentifierSchema.optional(),
|
|
45
|
+
})
|
|
46
|
+
.strict();
|
|
47
|
+
exports.FileRecordSchema = zod_1.z
|
|
48
|
+
.object({
|
|
49
|
+
contract: zod_1.z.literal('FileRecord'),
|
|
50
|
+
fileId: common_1.ContractIdentifierSchema,
|
|
51
|
+
teamId: common_1.ContractIdentifierSchema,
|
|
52
|
+
purpose: exports.FilePurposeSchema,
|
|
53
|
+
originalName: zod_1.z.string().trim().min(1).max(255),
|
|
54
|
+
mimeType: zod_1.z.string().trim().min(1).max(128),
|
|
55
|
+
byteSize: zod_1.z.number().int().nonnegative().optional(),
|
|
56
|
+
sha256: common_1.Sha256Schema.optional(),
|
|
57
|
+
status: exports.FileStatusSchema,
|
|
58
|
+
storage: zod_1.z
|
|
59
|
+
.object({
|
|
60
|
+
bucketId: common_1.ContractIdentifierSchema,
|
|
61
|
+
objectKey: zod_1.z.string().trim().min(1).max(1024),
|
|
62
|
+
canonicalUri: zod_1.z.string().trim().min(1),
|
|
63
|
+
etag: zod_1.z.string().trim().min(1).optional(),
|
|
64
|
+
})
|
|
65
|
+
.strict(),
|
|
66
|
+
variants: zod_1.z.array(exports.FileVariantSchema).default([]),
|
|
67
|
+
createdAt: common_1.IsoDateTimeSchema,
|
|
68
|
+
updatedAt: common_1.IsoDateTimeSchema,
|
|
69
|
+
})
|
|
70
|
+
.strict()
|
|
71
|
+
.superRefine((value, context) => {
|
|
72
|
+
if (value.storage.canonicalUri !== `file://${value.fileId}`) {
|
|
73
|
+
context.addIssue({
|
|
74
|
+
code: 'custom',
|
|
75
|
+
path: ['storage', 'canonicalUri'],
|
|
76
|
+
message: 'Canonical file URI must match fileId',
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
exports.FileUploadCreateRequestSchema = zod_1.z
|
|
81
|
+
.object({
|
|
82
|
+
purpose: exports.FilePurposeSchema,
|
|
83
|
+
filename: zod_1.z.string().trim().min(1).max(255),
|
|
84
|
+
mimeType: zod_1.z.string().trim().min(1).max(128),
|
|
85
|
+
byteSize: zod_1.z.number().int().nonnegative().optional(),
|
|
86
|
+
sha256: common_1.Sha256Schema.optional(),
|
|
87
|
+
usage: exports.FileUsageSchema.optional(),
|
|
88
|
+
})
|
|
89
|
+
.strict();
|
|
90
|
+
exports.FileUploadInstructionSchema = zod_1.z
|
|
91
|
+
.object({
|
|
92
|
+
url: zod_1.z.string().url(),
|
|
93
|
+
method: zod_1.z.string().trim().min(1),
|
|
94
|
+
headers: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
|
|
95
|
+
expiresAt: common_1.IsoDateTimeSchema,
|
|
96
|
+
})
|
|
97
|
+
.strict();
|
|
98
|
+
exports.FileUploadCreateResponseSchema = zod_1.z
|
|
99
|
+
.object({
|
|
100
|
+
file: exports.FileRecordSchema,
|
|
101
|
+
upload: exports.FileUploadInstructionSchema,
|
|
102
|
+
})
|
|
103
|
+
.strict();
|
|
104
|
+
exports.FileUploadCompleteRequestSchema = zod_1.z
|
|
105
|
+
.object({
|
|
106
|
+
byteSize: zod_1.z.number().int().nonnegative().optional(),
|
|
107
|
+
sha256: common_1.Sha256Schema.optional(),
|
|
108
|
+
etag: zod_1.z.string().trim().min(1).max(512).optional(),
|
|
109
|
+
})
|
|
110
|
+
.strict();
|
|
111
|
+
exports.ResolvedFileSchema = zod_1.z
|
|
112
|
+
.object({
|
|
113
|
+
fileId: common_1.ContractIdentifierSchema.optional(),
|
|
114
|
+
status: exports.FileStatusSchema.optional(),
|
|
115
|
+
originalUri: zod_1.z.string().trim().min(1).optional(),
|
|
116
|
+
thumbnailUri: zod_1.z.string().trim().min(1).optional(),
|
|
117
|
+
mimeType: zod_1.z.string().trim().min(1).max(128).optional(),
|
|
118
|
+
byteSize: zod_1.z.number().int().nonnegative().optional(),
|
|
119
|
+
sha256: common_1.Sha256Schema.optional(),
|
|
120
|
+
unresolved: zod_1.z.boolean().optional(),
|
|
121
|
+
})
|
|
122
|
+
.strict();
|
|
123
|
+
exports.FileResolveBatchRequestSchema = zod_1.z
|
|
124
|
+
.object({
|
|
125
|
+
references: zod_1.z.array(exports.FileReferenceSchema).min(1).max(1000),
|
|
126
|
+
includeOriginal: zod_1.z.boolean().default(false),
|
|
127
|
+
includeThumbnail: zod_1.z.boolean().default(true),
|
|
128
|
+
})
|
|
129
|
+
.strict();
|
|
130
|
+
exports.FileResolveBatchResponseSchema = zod_1.z
|
|
131
|
+
.object({
|
|
132
|
+
items: zod_1.z.array(exports.ResolvedFileSchema),
|
|
133
|
+
})
|
|
134
|
+
.strict();
|
|
135
|
+
//# sourceMappingURL=file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/contracts/file.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,qCAAqF;AAExE,QAAA,iBAAiB,GAAG,OAAC;KAC/B,MAAM,EAAE;KACR,IAAI,EAAE;KACN,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,EAAE,CAAC;KACP,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAEpB,QAAA,gBAAgB,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;AACrE,QAAA,uBAAuB,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;AAE9E,QAAA,eAAe,GAAG,OAAC;KAC7B,MAAM,CAAC;IACN,SAAS,EAAE,iCAAwB;IACnC,OAAO,EAAE,iCAAwB;IACjC,KAAK,EAA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3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
|
package/lib/contracts/index.js
CHANGED
|
@@ -22,6 +22,7 @@ __exportStar(require("./common"), exports);
|
|
|
22
22
|
__exportStar(require("./context"), exports);
|
|
23
23
|
__exportStar(require("./continuity"), exports);
|
|
24
24
|
__exportStar(require("./data"), exports);
|
|
25
|
+
__exportStar(require("./file"), exports);
|
|
25
26
|
__exportStar(require("./menu"), exports);
|
|
26
27
|
__exportStar(require("./page"), exports);
|
|
27
28
|
__exportStar(require("./render"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,6CAA2B;AAC3B,0CAAwB;AACxB,+CAA6B;AAC7B,2CAAyB;AACzB,4CAA0B;AAC1B,+CAA6B;AAC7B,yCAAuB;AACvB,yCAAuB;AACvB,yCAAuB;AACvB,2CAAyB;AACzB,6CAA2B;AAC3B,2CAAyB;AACzB,0CAAwB;AACxB,0CAAwB;AACxB,wDAAsC;AACtC,qDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,6CAA2B;AAC3B,0CAAwB;AACxB,+CAA6B;AAC7B,2CAAyB;AACzB,4CAA0B;AAC1B,+CAA6B;AAC7B,yCAAuB;AACvB,yCAAuB;AACvB,yCAAuB;AACvB,yCAAuB;AACvB,2CAAyB;AACzB,6CAA2B;AAC3B,2CAAyB;AACzB,0CAAwB;AACxB,0CAAwB;AACxB,wDAAsC;AACtC,qDAAmC"}
|