@epcc-sdk/sdks-files 0.2.0 → 0.3.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/README.md +1 -1
- package/dist/client/zod.gen.cjs +160 -70
- package/dist/client/zod.gen.cjs.map +1 -1
- package/dist/client/zod.gen.d.cts +83 -769
- package/dist/client/zod.gen.d.ts +83 -769
- package/dist/client/zod.gen.mjs +113 -33
- package/dist/client/zod.gen.mjs.map +1 -1
- package/dist/zod.cjs.map +1 -1
- package/dist/zod.mjs.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -173,7 +173,7 @@ interceptor: an interceptor cannot see the response, so it can never retry a 401
|
|
|
173
173
|
## Validation schemas
|
|
174
174
|
|
|
175
175
|
Zod schemas for every request body, path and response are published under the `/zod`
|
|
176
|
-
subpath. `zod` is an optional peer dependency (
|
|
176
|
+
subpath. `zod` is an optional peer dependency (4.x), so the root entry never imports it.
|
|
177
177
|
|
|
178
178
|
```ts
|
|
179
179
|
import { zFile } from "@epcc-sdk/sdks-files/zod";
|
package/dist/client/zod.gen.cjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
var zod_gen_exports = {};
|
|
20
30
|
__export(zod_gen_exports, {
|
|
@@ -40,103 +50,183 @@ __export(zod_gen_exports, {
|
|
|
40
50
|
zUuid: () => zUuid
|
|
41
51
|
});
|
|
42
52
|
module.exports = __toCommonJS(zod_gen_exports);
|
|
43
|
-
var
|
|
44
|
-
const zFileMeta =
|
|
45
|
-
timestamps:
|
|
46
|
-
created_at:
|
|
53
|
+
var z = __toESM(require("zod"), 1);
|
|
54
|
+
const zFileMeta = z.object({
|
|
55
|
+
timestamps: z.object({
|
|
56
|
+
created_at: z.string().register(z.globalRegistry, {
|
|
57
|
+
description: "The date and time the file was created."
|
|
58
|
+
}).optional()
|
|
59
|
+
}).register(z.globalRegistry, {
|
|
60
|
+
description: "The date and time the file was created."
|
|
47
61
|
}).optional(),
|
|
48
|
-
dimensions:
|
|
49
|
-
width:
|
|
50
|
-
|
|
62
|
+
dimensions: z.object({
|
|
63
|
+
width: z.int().register(z.globalRegistry, {
|
|
64
|
+
description: "The width of the file."
|
|
65
|
+
}).optional(),
|
|
66
|
+
height: z.int().register(z.globalRegistry, {
|
|
67
|
+
description: "The height of the file."
|
|
68
|
+
}).optional()
|
|
69
|
+
}).register(z.globalRegistry, {
|
|
70
|
+
description: "The file dimensions."
|
|
51
71
|
}).optional()
|
|
52
72
|
});
|
|
53
|
-
const zResultsMeta =
|
|
54
|
-
page:
|
|
55
|
-
limit:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
73
|
+
const zResultsMeta = z.object({
|
|
74
|
+
page: z.object({
|
|
75
|
+
limit: z.int().register(z.globalRegistry, {
|
|
76
|
+
description: "The maximum number of records for all pages."
|
|
77
|
+
}).optional(),
|
|
78
|
+
offset: z.int().register(z.globalRegistry, {
|
|
79
|
+
description: "The current offset by number of pages."
|
|
80
|
+
}).optional(),
|
|
81
|
+
current: z.int().register(z.globalRegistry, {
|
|
82
|
+
description: "The current number of pages."
|
|
83
|
+
}).optional(),
|
|
84
|
+
total: z.int().register(z.globalRegistry, {
|
|
85
|
+
description: "The total number of records for the entire collection."
|
|
86
|
+
}).optional()
|
|
87
|
+
}).register(z.globalRegistry, {
|
|
88
|
+
description: "Contains the results for the entire collection."
|
|
59
89
|
}).optional(),
|
|
60
|
-
results:
|
|
61
|
-
total:
|
|
90
|
+
results: z.object({
|
|
91
|
+
total: z.int().register(z.globalRegistry, {
|
|
92
|
+
description: "The total number of records for the entire collection."
|
|
93
|
+
}).optional()
|
|
94
|
+
}).register(z.globalRegistry, {
|
|
95
|
+
description: "Contains the results for the entire collection."
|
|
62
96
|
}).optional()
|
|
63
97
|
});
|
|
64
|
-
const zLinks =
|
|
65
|
-
self:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
98
|
+
const zLinks = z.object({
|
|
99
|
+
self: z.string().register(z.globalRegistry, {
|
|
100
|
+
description: "Single entities use a self parameter with a link to that specific resource."
|
|
101
|
+
}).optional()
|
|
102
|
+
}).register(z.globalRegistry, {
|
|
103
|
+
description: "Links are used to allow you to move between requests."
|
|
104
|
+
});
|
|
105
|
+
const zResultsLinks = z.object({
|
|
106
|
+
self: z.string().nullish(),
|
|
107
|
+
current: z.string().nullish(),
|
|
108
|
+
first: z.string().nullish(),
|
|
109
|
+
last: z.string().nullish(),
|
|
110
|
+
prev: z.string().nullish(),
|
|
111
|
+
next: z.string().nullish()
|
|
112
|
+
}).register(z.globalRegistry, {
|
|
113
|
+
description: "Links are used to allow you to move between requests."
|
|
114
|
+
});
|
|
115
|
+
const zFileLink = z.object({
|
|
116
|
+
href: z.string().register(z.globalRegistry, {
|
|
117
|
+
description: "The publicly available URL for this file."
|
|
118
|
+
}).optional()
|
|
119
|
+
}).register(z.globalRegistry, {
|
|
120
|
+
description: "The publicly available URL for this file."
|
|
77
121
|
});
|
|
78
|
-
const zUuid =
|
|
79
|
-
const zFile =
|
|
122
|
+
const zUuid = z.uuid();
|
|
123
|
+
const zFile = z.object({
|
|
80
124
|
id: zUuid.optional(),
|
|
81
|
-
type:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
125
|
+
type: z.string().register(z.globalRegistry, {
|
|
126
|
+
description: "The type represents the object being returned."
|
|
127
|
+
}).optional(),
|
|
128
|
+
file_name: z.string().register(z.globalRegistry, {
|
|
129
|
+
description: "The name of the file."
|
|
130
|
+
}).optional(),
|
|
131
|
+
mime_type: z.string().register(z.globalRegistry, {
|
|
132
|
+
description: "The mime type of the file."
|
|
133
|
+
}).optional(),
|
|
134
|
+
file_size: z.int().register(z.globalRegistry, {
|
|
135
|
+
description: "The size of the file. Required when uploading files."
|
|
136
|
+
}).optional(),
|
|
137
|
+
public: z.boolean().register(z.globalRegistry, {
|
|
138
|
+
description: "DEPRECATED Whether the file public or not. Required when uploading files."
|
|
139
|
+
}).optional(),
|
|
86
140
|
meta: zFileMeta.optional(),
|
|
87
141
|
links: zLinks.optional(),
|
|
88
142
|
link: zFileLink.optional()
|
|
89
143
|
});
|
|
90
|
-
const zError =
|
|
91
|
-
status:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
144
|
+
const zError = z.object({
|
|
145
|
+
status: z.int().register(z.globalRegistry, {
|
|
146
|
+
description: "The HTTP response code of the error."
|
|
147
|
+
}),
|
|
148
|
+
title: z.string().register(z.globalRegistry, {
|
|
149
|
+
description: "A brief summary of the error."
|
|
150
|
+
}),
|
|
151
|
+
detail: z.string().register(z.globalRegistry, {
|
|
152
|
+
description: "Optional additional detail about the error."
|
|
153
|
+
}).optional(),
|
|
154
|
+
request_id: z.string().register(z.globalRegistry, {
|
|
155
|
+
description: "Internal request ID."
|
|
156
|
+
}).optional(),
|
|
157
|
+
meta: z.record(z.string(), z.unknown()).register(z.globalRegistry, {
|
|
158
|
+
description: "Additional supporting meta data for the error."
|
|
159
|
+
}).optional()
|
|
160
|
+
});
|
|
161
|
+
const zErrorResponse = z.object({
|
|
162
|
+
errors: z.array(zError)
|
|
96
163
|
});
|
|
97
|
-
const
|
|
98
|
-
|
|
164
|
+
const zFilter = z.string().register(z.globalRegistry, {
|
|
165
|
+
description: "\nFiltering is available for this endpoint. See [Filtering](/docs/api/pxm/files/get-all-files#filtering).\n"
|
|
99
166
|
});
|
|
100
|
-
const
|
|
101
|
-
const zPageOffset = import_zod.z.preprocess(
|
|
167
|
+
const zPageOffset = z.preprocess(
|
|
102
168
|
(v) => typeof v === "string" ? Number(v) : v,
|
|
103
|
-
|
|
104
|
-
)
|
|
105
|
-
|
|
169
|
+
z.number().int().gte(0).lte(1e4)
|
|
170
|
+
).register(z.globalRegistry, {
|
|
171
|
+
description: "The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used."
|
|
172
|
+
});
|
|
173
|
+
const zPageLimit = z.preprocess(
|
|
106
174
|
(v) => typeof v === "string" ? Number(v) : v,
|
|
107
|
-
|
|
108
|
-
)
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
175
|
+
z.number().int().gte(0).lte(1e4)
|
|
176
|
+
).register(z.globalRegistry, {
|
|
177
|
+
description: "The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used."
|
|
178
|
+
});
|
|
179
|
+
const zGetAllFilesQuery = z.object({
|
|
180
|
+
filter: z.string().register(z.globalRegistry, {
|
|
181
|
+
description: "\nFiltering is available for this endpoint. See [Filtering](/docs/api/pxm/files/get-all-files#filtering).\n"
|
|
182
|
+
}).optional(),
|
|
183
|
+
"page[limit]": z.preprocess(
|
|
112
184
|
(v) => typeof v === "string" ? Number(v) : v,
|
|
113
|
-
|
|
114
|
-
).
|
|
115
|
-
|
|
185
|
+
z.number().int().gte(0).lte(1e4)
|
|
186
|
+
).register(z.globalRegistry, {
|
|
187
|
+
description: "The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used."
|
|
188
|
+
}).optional(),
|
|
189
|
+
"page[offset]": z.preprocess(
|
|
116
190
|
(v) => typeof v === "string" ? Number(v) : v,
|
|
117
|
-
|
|
118
|
-
).
|
|
191
|
+
z.number().int().gte(0).lte(1e4)
|
|
192
|
+
).register(z.globalRegistry, {
|
|
193
|
+
description: "The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used."
|
|
194
|
+
}).optional()
|
|
119
195
|
});
|
|
120
|
-
const zGetAllFilesResponse =
|
|
121
|
-
data:
|
|
196
|
+
const zGetAllFilesResponse = z.object({
|
|
197
|
+
data: z.array(zFile).optional(),
|
|
122
198
|
meta: zResultsMeta.optional(),
|
|
123
199
|
links: zResultsLinks.optional()
|
|
200
|
+
}).register(z.globalRegistry, {
|
|
201
|
+
description: "OK"
|
|
124
202
|
});
|
|
125
|
-
const zCreateAFileBody =
|
|
126
|
-
file:
|
|
127
|
-
|
|
203
|
+
const zCreateAFileBody = z.object({
|
|
204
|
+
file: z.string().register(z.globalRegistry, {
|
|
205
|
+
description: "Indicates the file you want to upload."
|
|
206
|
+
}).optional(),
|
|
207
|
+
file_location: z.string().register(z.globalRegistry, {
|
|
208
|
+
description: "Use this parameter to reference a file stored at a specific location. This must be the URL that points to an image file."
|
|
209
|
+
}).optional()
|
|
128
210
|
});
|
|
129
|
-
const zCreateAFileResponse =
|
|
211
|
+
const zCreateAFileResponse = z.object({
|
|
130
212
|
data: zFile.optional()
|
|
213
|
+
}).register(z.globalRegistry, {
|
|
214
|
+
description: "Created"
|
|
215
|
+
});
|
|
216
|
+
const zDeleteAFilePath = z.object({
|
|
217
|
+
fileID: z.string().register(z.globalRegistry, {
|
|
218
|
+
description: "The unique identifier of the file you want to delete."
|
|
219
|
+
})
|
|
131
220
|
});
|
|
132
|
-
const
|
|
133
|
-
|
|
221
|
+
const zDeleteAFileResponse = z.void().register(z.globalRegistry, {
|
|
222
|
+
description: "No Content"
|
|
134
223
|
});
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
|
|
224
|
+
const zGetAFilePath = z.object({
|
|
225
|
+
fileID: z.string().register(z.globalRegistry, {
|
|
226
|
+
description: "The unique identifier for a file."
|
|
227
|
+
})
|
|
138
228
|
});
|
|
139
|
-
const zGetAFileResponse =
|
|
229
|
+
const zGetAFileResponse = z.object({
|
|
140
230
|
data: zFile.optional()
|
|
141
231
|
});
|
|
142
232
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/client/zod.gen.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport { z } from \"zod\"\n\nexport const zFileMeta = z.object({\n timestamps: z\n .object({\n created_at: z.string().optional(),\n })\n .optional(),\n dimensions: z\n .object({\n width: z.number().int().optional(),\n height: z.number().int().optional(),\n })\n .optional(),\n})\n\nexport const zResultsMeta = z.object({\n page: z\n .object({\n limit: z.number().int().optional(),\n offset: z.number().int().optional(),\n current: z.number().int().optional(),\n total: z.number().int().optional(),\n })\n .optional(),\n results: z\n .object({\n total: z.number().int().optional(),\n })\n .optional(),\n})\n\n/**\n * Links are used to allow you to move between requests.\n */\nexport const zLinks = z.object({\n self: z.string().optional(),\n})\n\n/**\n * Links are used to allow you to move between requests.\n */\nexport const zResultsLinks = z.object({\n self: z.string().nullish(),\n current: z.string().nullish(),\n first: z.string().nullish(),\n last: z.string().nullish(),\n prev: z.string().nullish(),\n next: z.string().nullish(),\n})\n\n/**\n * The publicly available URL for this file.\n */\nexport const zFileLink = z.object({\n href: z.string().optional(),\n})\n\nexport const zUuid = z.string().uuid()\n\nexport const zFile = z.object({\n id: zUuid.optional(),\n type: z.string().optional(),\n file_name: z.string().optional(),\n mime_type: z.string().optional(),\n file_size: z.number().int().optional(),\n public: z.boolean().optional(),\n meta: zFileMeta.optional(),\n links: zLinks.optional(),\n link: zFileLink.optional(),\n})\n\nexport const zError = z.object({\n status: z.number().int(),\n title: z.string(),\n detail: z.string().optional(),\n request_id: z.string().optional(),\n meta: z.record(z.unknown()).optional(),\n})\n\nexport const zErrorResponse = z.object({\n errors: z.array(zError),\n})\n\n/**\n *\n * Filtering is available for this endpoint. See [Filtering](/docs/api/pxm/files/get-all-files#filtering).\n *\n */\nexport const zFilter = z.string()\n\n/**\n * The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\n */\nexport const zPageOffset = z.preprocess(\n (v) => (typeof v === \"string\" ? Number(v) : v),\n z.number().int().gte(0).lte(10000),\n)\n\n/**\n * The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\n */\nexport const zPageLimit = z.preprocess(\n (v) => (typeof v === \"string\" ? Number(v) : v),\n z.number().int().gte(0).lte(10000),\n)\n\nexport const zGetAllFilesQuery = z.object({\n filter: z.string().optional(),\n \"page[limit]\": z\n .preprocess(\n (v) => (typeof v === \"string\" ? Number(v) : v),\n z.number().int().gte(0).lte(10000),\n )\n .optional(),\n \"page[offset]\": z\n .preprocess(\n (v) => (typeof v === \"string\" ? Number(v) : v),\n z.number().int().gte(0).lte(10000),\n )\n .optional(),\n})\n\n/**\n * OK\n */\nexport const zGetAllFilesResponse = z.object({\n data: z.array(zFile).optional(),\n meta: zResultsMeta.optional(),\n links: zResultsLinks.optional(),\n})\n\nexport const zCreateAFileBody = z.object({\n file: z.string().optional(),\n file_location: z.string().optional(),\n})\n\n/**\n * Created\n */\nexport const zCreateAFileResponse = z.object({\n data: zFile.optional(),\n})\n\nexport const zDeleteAFilePath = z.object({\n fileID: z.string(),\n})\n\n/**\n * No Content\n */\nexport const zDeleteAFileResponse = z.void()\n\nexport const zGetAFilePath = z.object({\n fileID: z.string(),\n})\n\nexport const zGetAFileResponse = z.object({\n data: zFile.optional(),\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iBAAkB;AAEX,MAAM,YAAY,aAAE,OAAO;AAAA,EAChC,YAAY,aACT,OAAO;AAAA,IACN,YAAY,aAAE,OAAO,EAAE,SAAS;AAAA,EAClC,CAAC,EACA,SAAS;AAAA,EACZ,YAAY,aACT,OAAO;AAAA,IACN,OAAO,aAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AAAA,IACjC,QAAQ,aAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AAAA,EACpC,CAAC,EACA,SAAS;AACd,CAAC;AAEM,MAAM,eAAe,aAAE,OAAO;AAAA,EACnC,MAAM,aACH,OAAO;AAAA,IACN,OAAO,aAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AAAA,IACjC,QAAQ,aAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AAAA,IAClC,SAAS,aAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AAAA,IACnC,OAAO,aAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AAAA,EACnC,CAAC,EACA,SAAS;AAAA,EACZ,SAAS,aAC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AKM,MAAM,uBAAuB,aAAE,OAAO;AAAA,EAC3C,MAAM,MAAM,SAAS;AACvB,CAAC;AAEM,MAAM,mBAAmB,aAAE,OAAO;AAAA,EACvC,QAAQ,aAAE,OAAO;AACnB,CAAC;AAKM,MAAM,uBAAuB,aAAE,KAAK;AAEpC,MAAM,gBAAgB,aAAE,OAAO;AAAA,EACpC,QAAQ,aAAE,OAAO;AACnB,CAAC;AAEM,MAAM,oBAAoB,aAAE,OAAO;AAAA,EACxC,MAAM,MAAM,SAAS;AACvB,CAAC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/client/zod.gen.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport * as z from \"zod\"\n\nexport const zFileMeta = z.object({\n timestamps: z\n .object({\n created_at: z\n .string()\n .register(z.globalRegistry, {\n description: \"The date and time the file was created.\",\n })\n .optional(),\n })\n .register(z.globalRegistry, {\n description: \"The date and time the file was created.\",\n })\n .optional(),\n dimensions: z\n .object({\n width: z\n .int()\n .register(z.globalRegistry, {\n description: \"The width of the file.\",\n })\n .optional(),\n height: z\n .int()\n .register(z.globalRegistry, {\n description: \"The height of the file.\",\n })\n .optional(),\n })\n .register(z.globalRegistry, {\n description: \"The file dimensions.\",\n })\n .optional(),\n})\n\nexport const zResultsMeta = z.object({\n page: z\n .object({\n limit: z\n .int()\n .register(z.globalRegistry, {\n description: \"The maximum number of records for all pages.\",\n })\n .optional(),\n offset: z\n .int()\n .register(z.globalRegistry, {\n description: \"The current offset by number of pages.\",\n })\n .optional(),\n current: z\n .int()\n .register(z.globalRegistry, {\n description: \"The current number of pages.\",\n })\n .optional(),\n total: z\n .int()\n .register(z.globalRegistry, {\n description: \"The total number of records for the entire collection.\",\n })\n .optional(),\n })\n .register(z.globalRegistry, {\n description: \"Contains the results for the entire collection.\",\n })\n .optional(),\n results: z\n .object({\n total: z\n .int()\n .register(z.globalRegistry, {\n description: \"The total number of records for the entire collection.\",\n })\n .optional(),\n })\n .register(z.globalRegistry, {\n description: \"Contains the results for the entire collection.\",\n })\n .optional(),\n})\n\n/**\n * Links are used to allow you to move between requests.\n */\nexport const zLinks = z\n .object({\n self: z\n .string()\n .register(z.globalRegistry, {\n description:\n \"Single entities use a self parameter with a link to that specific resource.\",\n })\n .optional(),\n })\n .register(z.globalRegistry, {\n description: \"Links are used to allow you to move between requests.\",\n })\n\n/**\n * Links are used to allow you to move between requests.\n */\nexport const zResultsLinks = z\n .object({\n self: z.string().nullish(),\n current: z.string().nullish(),\n first: z.string().nullish(),\n last: z.string().nullish(),\n prev: z.string().nullish(),\n next: z.string().nullish(),\n })\n .register(z.globalRegistry, {\n description: \"Links are used to allow you to move between requests.\",\n })\n\n/**\n * The publicly available URL for this file.\n */\nexport const zFileLink = z\n .object({\n href: z\n .string()\n .register(z.globalRegistry, {\n description: \"The publicly available URL for this file.\",\n })\n .optional(),\n })\n .register(z.globalRegistry, {\n description: \"The publicly available URL for this file.\",\n })\n\nexport const zUuid = z.uuid()\n\nexport const zFile = z.object({\n id: zUuid.optional(),\n type: z\n .string()\n .register(z.globalRegistry, {\n description: \"The type represents the object being returned.\",\n })\n .optional(),\n file_name: z\n .string()\n .register(z.globalRegistry, {\n description: \"The name of the file.\",\n })\n .optional(),\n mime_type: z\n .string()\n .register(z.globalRegistry, {\n description: \"The mime type of the file.\",\n })\n .optional(),\n file_size: z\n .int()\n .register(z.globalRegistry, {\n description: \"The size of the file. Required when uploading files.\",\n })\n .optional(),\n public: z\n .boolean()\n .register(z.globalRegistry, {\n description:\n \"DEPRECATED Whether the file public or not. Required when uploading files.\",\n })\n .optional(),\n meta: zFileMeta.optional(),\n links: zLinks.optional(),\n link: zFileLink.optional(),\n})\n\nexport const zError = z.object({\n status: z.int().register(z.globalRegistry, {\n description: \"The HTTP response code of the error.\",\n }),\n title: z.string().register(z.globalRegistry, {\n description: \"A brief summary of the error.\",\n }),\n detail: z\n .string()\n .register(z.globalRegistry, {\n description: \"Optional additional detail about the error.\",\n })\n .optional(),\n request_id: z\n .string()\n .register(z.globalRegistry, {\n description: \"Internal request ID.\",\n })\n .optional(),\n meta: z\n .record(z.string(), z.unknown())\n .register(z.globalRegistry, {\n description: \"Additional supporting meta data for the error.\",\n })\n .optional(),\n})\n\nexport const zErrorResponse = z.object({\n errors: z.array(zError),\n})\n\n/**\n *\n * Filtering is available for this endpoint. See [Filtering](/docs/api/pxm/files/get-all-files#filtering).\n *\n */\nexport const zFilter = z.string().register(z.globalRegistry, {\n description:\n \"\\nFiltering is available for this endpoint. See [Filtering](/docs/api/pxm/files/get-all-files#filtering).\\n\",\n})\n\n/**\n * The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\n */\nexport const zPageOffset = z\n .preprocess(\n (v) => (typeof v === \"string\" ? Number(v) : v),\n z.number().int().gte(0).lte(10000),\n )\n .register(z.globalRegistry, {\n description:\n \"The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\",\n })\n\n/**\n * The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\n */\nexport const zPageLimit = z\n .preprocess(\n (v) => (typeof v === \"string\" ? Number(v) : v),\n z.number().int().gte(0).lte(10000),\n )\n .register(z.globalRegistry, {\n description:\n \"The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\",\n })\n\nexport const zGetAllFilesQuery = z.object({\n filter: z\n .string()\n .register(z.globalRegistry, {\n description:\n \"\\nFiltering is available for this endpoint. See [Filtering](/docs/api/pxm/files/get-all-files#filtering).\\n\",\n })\n .optional(),\n \"page[limit]\": z\n .preprocess(\n (v) => (typeof v === \"string\" ? Number(v) : v),\n z.number().int().gte(0).lte(10000),\n )\n .register(z.globalRegistry, {\n description:\n \"The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\",\n })\n .optional(),\n \"page[offset]\": z\n .preprocess(\n (v) => (typeof v === \"string\" ? Number(v) : v),\n z.number().int().gte(0).lte(10000),\n )\n .register(z.globalRegistry, {\n description:\n \"The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\",\n })\n .optional(),\n})\n\n/**\n * OK\n */\nexport const zGetAllFilesResponse = z\n .object({\n data: z.array(zFile).optional(),\n meta: zResultsMeta.optional(),\n links: zResultsLinks.optional(),\n })\n .register(z.globalRegistry, {\n description: \"OK\",\n })\n\nexport const zCreateAFileBody = z.object({\n file: z\n .string()\n .register(z.globalRegistry, {\n description: \"Indicates the file you want to upload.\",\n })\n .optional(),\n file_location: z\n .string()\n .register(z.globalRegistry, {\n description:\n \"Use this parameter to reference a file stored at a specific location. This must be the URL that points to an image file.\",\n })\n .optional(),\n})\n\n/**\n * Created\n */\nexport const zCreateAFileResponse = z\n .object({\n data: zFile.optional(),\n })\n .register(z.globalRegistry, {\n description: \"Created\",\n })\n\nexport const zDeleteAFilePath = z.object({\n fileID: z.string().register(z.globalRegistry, {\n description: \"The unique identifier of the file you want to delete.\",\n }),\n})\n\n/**\n * No Content\n */\nexport const zDeleteAFileResponse = z.void().register(z.globalRegistry, {\n description: \"No Content\",\n})\n\nexport const zGetAFilePath = z.object({\n fileID: z.string().register(z.globalRegistry, {\n description: \"The unique identifier for a file.\",\n }),\n})\n\nexport const zGetAFileResponse = z.object({\n data: zFile.optional(),\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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